-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (30 loc) · 1.29 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
FC = gfortran
NESTLIBDIR = $(MULTINEST)/lib/
LIBS := -L$(NESTLIBDIR) -lmultinest $(LAPACKLIB) -lstdc++ -ldl -lcrypt -llapack
INCS := -I $(MULTINEST)/include/
OBJFILES = rbridge.o
all: rbridge
$(NESTLIBDIR)/multinest.so:
@echo "ERROR ----"
@echo "You should have built multinest.so in $(NESTLIBDIR)"
@echo "Set MULTINEST to point to the directory you compiled MultiNest in ..."
@echo "${MULTINEST}/lib should contain libmultinest.so."
$(MULTINEST)/includes/multinest.h:
@echo "ERROR ----"
@echo "Set MULTINEST to point to the directory you compiled MultiNest in."
@echo "${MULTINEST}/includes should contain multinest.h."
Rserve/configure:
wget https://www.rforge.net/Rserve/snapshot/Rserve_1.7-0.tar.gz -O - | tar -xvz
Rserve/clients/cxx/config.h: Rserve/configure
cd Rserve && ./configure
cd Rserve/clients/cxx/ && ./configure
Rserve/clients/cxx/Rconnection.o: Rserve/clients/cxx/config.h
cd Rserve/clients/cxx/ && make Rconnection.o
rbridge: $(OBJFILES) Rserve/clients/cxx/Rconnection.o $(NESTLIBDIR)/libmultinest.so
$(FC) $(FFLAGS) -o rbridge Rserve/clients/cxx/Rconnection.o $(OBJFILES) $(INCS) $(LIBS)
%.o: %.cc Rserve/clients/cxx/config.h
$(CXX) $(CFLAGS) -c -I Rserve/clients/cxx/ -Wall -Wextra -pedantic $(INCS) $*.cc
clean:
rm -f *.o *.mod rbridge
test: rbridge
bash runtest.sh