-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
49 lines (32 loc) · 1.11 KB
/
Makefile
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
45
46
47
48
49
#***************************************************************************
# user configuration
# set mpi = yes for the parallel version
# set debug = yes to debug
DEBUG ?= no
# end user configuration;
#***************************************************************************
#SHELL = /bin/sh
CC = g++
ifeq ($(strip $(DEBUG)), yes)
CFLAGS += -ggdb -DDEBUG
else
CFLAGS += -O2
endif
CFLAGS += -Wall -m64 -std=c++11
STATICLIBS += /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a
CPPFLAGS = CFLAGS
LIBS += -lm -lz #-lgsl -lgslcblas
OBJS = model.o
SRCS = model.cpp
all: model $(OBJS)
.cpp.o : ; $(CC) $(CFLAGS) -c $<
## static link to gsl libs.
## note it's crutial to use -static-libgcc instead of static;
model: model.o $(OBJS); $(CC) -static-libgcc $(CFLAGS) $(OBJS) $(STATICLIBS) $(LIBS) -o nubeam
#fp: fp.o $(OBJS); $(CC) -static-libgcc $(CFLAGS) $(OBJS) fp.o $(LIBS) -o bimbam
#fp: fp.o $(OBJS); $(CC) $(CFLAGS) $(OBJS) fp.o $(STATICLIBS) $(LIBS) -o bimbam
# the following dependence generated by make showdep
showdep:
@$(CC) -MM $(SRCS)
clean:
rm -f *.o