############################################################################## # MAKEFILE: compile and link treecode executable files # # Copyright (c) 1999 by Joshua E. Barnes, Tokyo, JAPAN. # ############################################################################## ######################################################################## # DIRECTIONS: to tune this Makefile to your system, edit the definitions # of CC, CCFLAGS, LDFLAGS, and PRECISION below. Suggested definitions # are provided for SGI, IBM, and Sun systems. ######################################################################## # Compiler. # SGI O2, IBM AIX: CC = cc # Sun: # CC = gcc ######################################################################## # Compiler options. # SGI O2: CCFLAGS = -n32 LDFLAGS = -n32 # IBM AIX: # CCFLAGS = -DIBMAIX # LDFLAGS = # Sun: # CCFLAGS = # LDFLAGS = ######################################################################## # Precision. Possible values are SINGLEPREC, MIXEDPREC, or DOUBLEPREC. # SGI O2: PRECISION = SINGLEPREC # IBM AIX, Sun: # PRECISION = MIXEDPREC ######################################################################## # Vanila treecode: treecode: treecode.o treeio.o treeload.o treegrav.o libZeno.a $(CC) $(LDFLAGS) -o treecode \ treecode.o treeio.o treeload.o treegrav.o libZeno.a -lm treecode.o: treecode.c treecode.h treedefs.h $(CC) $(CCFLAGS) -D$(PRECISION) -c treecode.c treeio.o: treeio.c treecode.h treedefs.h $(CC) $(CCFLAGS) -D$(PRECISION) -c treeio.c treeload.o: treeload.c treedefs.h $(CC) $(CCFLAGS) -D$(PRECISION) -c treeload.c treegrav.o: treegrav.c treedefs.h $(CC) $(CCFLAGS) -D$(PRECISION) -O3 -c treegrav.c ######################################################################## # Quick-scan treecode: treecode_q: treecode_q.o treeio_q.o treeload_q.o treegrav_q.o libZeno.a $(CC) $(LDFLAGS) -o treecode_q \ treecode_q.o treeio_q.o treeload_q.o treegrav_q.o libZeno.a -lm treecode_q.o: treecode.c treecode.h treedefs.h $(CC) $(CCFLAGS) -D$(PRECISION) -DQUICKSCAN -c \ -o treecode_q.o treecode.c treeio_q.o: treeio.c treecode.h treedefs.h $(CC) $(CCFLAGS) -D$(PRECISION) -DQUICKSCAN -c \ -o treeio_q.o treeio.c treeload_q.o: treeload.c treedefs.h $(CC) $(CCFLAGS) -D$(PRECISION) -DQUICKSCAN -c \ -o treeload_q.o treeload.c treegrav_q.o: treegrav.c treedefs.h $(CC) $(CCFLAGS) -D$(PRECISION) -DQUICKSCAN -O3 -c \ -o treegrav_q.o treegrav.c ######################################################################## # Zeno library: libZeno.a: clib.o getparam.o mathfns.o ar ruv libZeno.a clib.o getparam.o mathfns.o clib.o: clib.c stdinc.h $(CC) $(CCFLAGS) -D$(PRECISION) -c clib.c getparam.o: getparam.c stdinc.h getparam.h $(CC) $(CCFLAGS) -D$(PRECISION) -c getparam.c mathfns.o: mathfns.c stdinc.h mathfns.h $(CC) $(CCFLAGS) -D$(PRECISION) -c mathfns.c