# Makefile - MULCP v1.1 # # Ju Li PROG = mulcp OPFLAGS = # Xolas options: don't know why v8plus architecture don't work for the code. # MACHLIB = -lF77_mt -lsunmath_mt -lm -mt -L/opt/SUNWspro/SC4.0/lib/v8plus # MACHFLAGS = -xO5 -native -xdepend -xchip=ultra -xarch=v8plus -dalign # MACHFLAGS = -native -xdepend -xchip=ultra -xarch=v8plus -mt # SGI options MACHFLAGS = -64 -mips4 -O3 -Ofast=IP27 -IPA -TARG:platform=IP27 -r10000 CC = cc CFLAGS = $(OPFLAGS) $(MACHFLAGS) COBJS = shm.o watch.o FC = f77 FFLAGS = $(OPFLAGS) $(MACHFLAGS) FHEADER = mulcp.fh FOBJS = mulcp.o tersoff_dynamical.o utils.o all: $(PROG) $(PROG): $(FOBJS) $(COBJS) $(FC) $(OPFLAGS) $(MACHFLAGS) -o $@ $(FOBJS) $(COBJS) $(COBJS): mulcp.o: mulcp.fh mulcp.F $(FC) $(OPFLAGS) $(MACHFLAGS) -c mulcp.F -o mulcp.o tersoff_dynamical.o: mulcp.fh tersoff_dynamical.F $(FC) $(OPFLAGS) $(MACHFLAGS) -c tersoff_dynamical.F -o tersoff_dynamical.o utils.o: mulcp.fh utils.F $(FC) $(OPFLAGS) $(MACHFLAGS) -c utils.F -o utils.o clean: rm -f *.o *~ run: $(PROG) @echo \\n ================== OUTPUT OF $(PROG) \< con ==================\\n $(PROG) < con SCREEN_OUTPUT = output longrun: $(PROG) @if test -f $(SCREEN_OUTPUT);\ then \ mv $(SCREEN_OUTPUT) $(SCREEN_OUTPUT).old; \ fi @echo start time = `date` | tee $(SCREEN_OUTPUT) @echo \\n ================== OUTPUT OF $(PROG) \< con ==================\\n | tee -a $(SCREEN_OUTPUT) @timex nohup nice $(PROG) < con | tee -a $(SCREEN_OUTPUT); echo end time = `date` | tee -a $(SCREEN_OUTPUT) & kill: kill -9 `ps -e | grep $(PROG) | cut -c1-6` COMPARE_PROG = mulc compare: $(COMPARE_PROG) $(COMPARE_PROG): mulc.o watch.o $(FC) $(OPFLAGS) $(MACHFLAGS) -o $@ mulc.o watch.o mulc.o: mulc.F $(FC) $(OPFLAGS) $(MACHFLAGS) -c mulc.F shm.o: shm.c watch.o: watch.c