forked from j-faria/kima
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexamples.mk
More file actions
42 lines (31 loc) · 1.03 KB
/
examples.mk
File metadata and controls
42 lines (31 loc) · 1.03 KB
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
SRC_DIR = $(KIMA_DIR)/src
DNEST4_PATH = $(KIMA_DIR)/DNest4/code
EIGEN_PATH = $(KIMA_DIR)/eigen
CELERITE_PATH = $(KIMA_DIR)/celerite/cpp/include
includes = -I$(SRC_DIR) -I$(DNEST4_PATH) -I$(EIGEN_PATH) -I$(CELERITE_PATH)
CXXFLAGS = -pthread -std=c++11 -O3 -DNDEBUG -w -DEIGEN_MPL2_ONLY
default_pie := $(shell $(CXX) -v 2>&1 >/dev/null | grep enable-default-pie)
ifneq ($(default_pie),)
CXXFLAGS += -no-pie
endif
LIBS = -ldnest4 -L/usr/local/lib
KIMA_SRCS =\
$(wildcard $(SRC_DIR)/distributions/*.cpp) \
$(SRC_DIR)/RVConditionalPrior.cpp \
$(SRC_DIR)/Data.cpp \
$(SRC_DIR)/RVmodel.cpp \
kima_setup.cpp
KIMA_OBJS = $(subst .cpp,.o,$(KIMA_SRCS))
%.o: %.cpp
$(CXX) -c $(includes) -o $@ $< $(CXXFLAGS)
kima: $(KIMA_OBJS)
$(CXX) -o kima $(KIMA_OBJS) -L$(DNEST4_PATH) $(LIBS) $(CXXFLAGS)
clean:
@rm -f kima_setup.o kima
cleanout:
@echo "Cleaning kima outputs "
@rm -f sample.txt sample_info.txt levels.txt \
kima_model_setup.txt \
weights.txt posterior_sample.txt sampler_state.txt \
posterior_sample_info.txt
cleanall: clean cleanout