added optimization flags + none-module compilation (speedup!)
[physik/posic.git] / Makefile
1 CC = gcc
2
3 CFLAGS = -Wall -Winline
4 #CFLAGS += -Wextra -pedantic
5 CFLAGS += -O3 -march=native -msse2 -mfpmath=sse
6 CFLAGS += -g
7 #CFLAGS += -ffloat-store
8
9 #CFLAGS+= -DPARALLEL -fopenmp
10
11 CFLAGS += -DALBE
12 CFLAGS += -DALBE_FAST
13 #CFLAGS += -DTERSOFF_ORIG
14
15 #CFLAGS += -DSTATIC_LISTS
16
17 #CFLAGS += -DDEBUG
18 #CFLAGS += -DDSTART=-1 -DDEND=40 -DDATOM=0
19 #CFLAGS += -DVDEBUG
20
21 LDFLAGS = -lm
22 #LDFLAGS += -lefence
23
24 DEPS = moldyn.o random/random.o list/list.o
25 DEPS += potentials/lennard_jones.o potentials/harmonic_oscillator.o
26 DEPS += potentials/tersoff.o potentials/albe.o
27 DEPS += potentials/albe_fast.o
28
29 SRC = moldyn.c random/random.c list/list.c
30 SRC += potentials/lennard_jones.c potentials/harmonic_oscillator.c
31 SRC += potentials/tersoff.c potentials/albe.c
32 SRC += potentials/albe_fast.c
33
34 ALL = mdrun sic fluctuation_calc postproc pair_correlation_calc diffusion_calc
35 ALL += bond_analyze search_bonds visual_atoms display_atom_data
36
37 all: $(ALL)
38
39 # main code. using SRC, much more efficient code is produced!
40 mdrun: $(SRC)
41 #mdrun: $(DEPS)
42
43 sic: $(DEPS) config.h
44
45 postproc: $(DEPS)
46
47 pair_correlation_calc: $(DEPS)
48
49 diffusion_calc: $(DEPS)
50
51 bond_analyze: $(DEPS)
52
53 search_bonds: $(DEPS)
54
55 visual_atoms: $(DEPS)
56
57 display_atom_data: $(DEPS)
58
59 .PHONY:clean
60 clean:
61         rm -vf $(ALL) *.o */*.o