forked from Cell-veto/postlhc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
58 lines (44 loc) · 1013 Bytes
/
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
50
51
52
53
54
55
56
57
58
CXXFLAGS += -std=c++11 -g -Wall -Wextra
EXTRA_CXXFLAGS += -DNDEBUG -O3
GSL_LDFLAGS =
-include features.mk
CXXFLAGS += $(EXTRA_CXXFLAGS)
MAKEFILES = \
Makefile \
features.mk \
SOURCES = \
storage.cpp \
chainrunner.cpp \
ipl.cpp \
lj.cpp \
ljg.cpp \
harddisk.cpp \
io.cpp \
paircorrel.cpp \
tools.cpp \
jellium3.cpp \
jellium4.cpp \
MAIN_SOURCES = \
main.cpp \
OBJECTS = $(SOURCES:%.cpp=%.o)
MAIN_OBJECTS = $(MAIN_SOURCES:%.cpp=%.o)
BINARIES = \
postlhc \
# default target
all: ts.mk.hpp dep $(BINARIES)
if [ -x ./push ]; then ./push; else true; fi
# depend on Makefiles
ts.mk.hpp: $(MAKEFILES)
@touch $@
# create features.mk if absent
features.mk:
@touch $@
# automagic dependencies
dep: $(OBJECTS) $(MAKEFILES)
$(CXX) $(CXXFLAGS) -MM $(SOURCES) >.depend
-include .depend
postlhc: main.o $(OBJECTS)
$(CXX) $(LDFLAGS) -o $@ $< $(OBJECTS) $(GSL_LDFLAGS)
clean:
rm -f $(BINARIES) $(OBJECTS) $(MAIN_OBJECTS) .depend
.PHONY: all clean dep