-CC=gcc
-CFLAGS=-Wall
-CFLAGS+=-O3
-#CFLAGS+=-ffloat-store
-CFLAGS+=-g
-#CFLAGS+=-DDEBUG
-#CFLAGS+=-DVDEBUG
-#CFLAGS+=-DTERSOFF_ORIG
-CFLAGS+=-DALBE
-LDFLAGS=-lm
+CC = gcc
+
+CFLAGS = -Wall
+CFLAGS += -O3
+CFLAGS += -g
+#CFLAGS += -ffloat-store
-SOURCE=moldyn.c visual/visual.c random/random.c list/list.c
+CFLAGS += -DALBE
+#CFLAGS += -DDEBUG
+#CFLAGS += -DVDEBUG
+#CFLAGS += -DTERSOFF_ORIG
+
+LDFLAGS=-lm
-#POT_SRC=potentials/tersoff_orig.c
-POT_SRC=potentials/tersoff.c
-POT_SRC+=potentials/albe.c
-POT_SRC+= potentials/lennard_jones.c potentials/harmonic_oscillator.c
+DEPS = moldyn.o visual/visual.o random/random.o list/list.o
+DEPS += potentials/lennard_jones.o potentials/harmonic_oscillator.o
+DEPS += potentials/tersoff.o potentials/albe.o
all: sic fluctuation_calc postproc
-sic:
- $(CC) $(CFLAGS) $(LDFLAGS) $(POT_SRC) $(SOURCE) sic.c -o sic
+sic: $(DEPS)
-postproc:
- $(CC) $(CFLAGS) $(LDFLAGS) $(POT_SRC) $(SOURCE) postproc.c -o postproc
+postproc: $(DEPS)
.PHONY:clean
clean:
- rm -f sic postproc
+ rm -f sic postproc fluctuation_calc