-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
44 lines (31 loc) · 984 Bytes
/
makefile
File metadata and controls
44 lines (31 loc) · 984 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#compiling option
CFLAGS = -O3 # the default is performance release
CFLAGS_INTEL = -fp-model source -fp-model precise # enable accurate arithematics on floating numbers in intel C compiler
#other flags go here
#CPPFLAGS =
#objects
objects=main.o numerical.o netsim.o lib.o RngStream.o mutation.o cellular_activity.o
%.o: %.c
ifeq ($(CC),icc)
$(CC) $(CFLAGS) $(CFLAGS_INTEL) $(CPPFLAGS) -c $< -o $@ -qopenmp
else
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ -fopenmp
endif
#target
simulator: $(objects)
ifeq ($(CC),icc)
$(CC) $(CFLAGS) $(CFLAGS_INTEL) $(CPPFLAGS) -o simulator $(objects) -qopenmp
else
$(CC) $(CFLAGS) $(CPPFLAGS) -o simulator $(objects) -fopenmp -lm
endif
main.o: netsim.h RngStream.h lib.h
numerical.o: netsim.h RngStream.h
RngStream.o: RngStream.h
mutation.o: netsim.h RngStream.h numerical.h mutation.h
cellular_activity.o: cellular_activity.h lib.h numerical.h
lib.o: lib.h
netsim.o: netsim.c
#clean
.PHONY:clean
clean:
-rm simulator $(objects)