X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=Makefile;h=d1b78ec592d6e0209976e969efb23f7c6419348d;hb=c4955791a40a7eae203b43e71b1d46c89986fc3c;hp=ff3fbe3ad5efb511ad2c2d4009cbc211975491c6;hpb=3ffe2a08e25fc091b6241885055450009267e2d8;p=physik%2Fposic.git diff --git a/Makefile b/Makefile index ff3fbe3..d1b78ec 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,61 @@ -CC=gcc -CFLAGS=-Wall +CC = gcc -OBJS=init/init.o visual/visual.o math/math.o random/random.o moldyn.o +CFLAGS = -Wall -Winline +#CFLAGS += -Wextra -pedantic +CFLAGS += -O3 -march=native -msse2 -mfpmath=sse +CFLAGS += -g +#CFLAGS += -ffloat-store -all: moldyn.o posic +#CFLAGS+= -DPARALLEL -fopenmp -posic: moldyn.o $(OBJS) - $(CC) $(CFLAGS) -lm -o $@ $(OBJS) $(LIBS) posic.c +CFLAGS += -DALBE +CFLAGS += -DALBE_FAST +#CFLAGS += -DTERSOFF_ORIG +#CFLAGS += -DSTATIC_LISTS + +#CFLAGS += -DDEBUG +#CFLAGS += -DDSTART=-1 -DDEND=40 -DDATOM=0 +#CFLAGS += -DVDEBUG + +LDFLAGS = -lm +#LDFLAGS += -lefence + +DEPS = moldyn.o random/random.o list/list.o +DEPS += potentials/lennard_jones.o potentials/harmonic_oscillator.o +DEPS += potentials/tersoff.o potentials/albe.o +DEPS += potentials/albe_fast.o + +SRC = moldyn.c random/random.c list/list.c +SRC += potentials/lennard_jones.c potentials/harmonic_oscillator.c +SRC += potentials/tersoff.c potentials/albe.c +SRC += potentials/albe_fast.c + +ALL = mdrun sic fluctuation_calc postproc pair_correlation_calc diffusion_calc +ALL += bond_analyze search_bonds visual_atoms display_atom_data + +all: $(ALL) + +# main code. using SRC, much more efficient code is produced! +mdrun: $(SRC) +#mdrun: $(DEPS) + +sic: $(DEPS) config.h + +postproc: $(DEPS) + +pair_correlation_calc: $(DEPS) + +diffusion_calc: $(DEPS) + +bond_analyze: $(DEPS) + +search_bonds: $(DEPS) + +visual_atoms: $(DEPS) + +display_atom_data: $(DEPS) + +.PHONY:clean clean: - rm -f *.o posic + rm -vf $(ALL) *.o */*.o