-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile.defs
60 lines (38 loc) · 1.72 KB
/
makefile.defs
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
59
60
# If you already have your own Makefile you can
# replace all of this, but you need to keep this line
# at the top:
include ${COSMOSIS_SRC_DIR}/config/compilers.mk
MODULE = ../modules
COLIB = ../modules/libcolib.a
USER_CXXFLAGS += -I${GSL_INC} -D COSEBIS_DIR="\"${PWD}/../\""
USER_LDFLAGS += -lcosmosis -L${GSL_LIB} -lgsl -lgslcblas -lm -L$(MODULE) -lcolib -lstdc++ -lz -Wno-deprecated -I$(MODULE)
ifneq (Darwin, $(OS))
USER_CXXFLAGS+=-Wl,-rpath,${PWD}
endif
%.so: %.cc $(COLIB)
$(CXX) $(CXXFLAGS) $*.cc -shared -o $*.so $(LDFLAGS) $(USER_LDFLAGS)
#-----------------------------------
#--- linker
#-----------------------------------
# COLIB = libcolib.a
# #-----------------------------------
# #--- rules
# #-----------------------------------
# all: $(MODULE)/$(COLIB) libcosebis.so libcosebis_cov.so libbandpower.so libxipm_binned.so libcosebis_2pcfs.so
# # tells how to make my library (another makefile)
# $(MODULE)/$(COLIB)::
# cd $(MODULE) && $(MAKE)
# *.so: COSEBIs_2PCFs_interface.cc
# $(CXX) $(CXXFLAGS) COSEBIs_2PCFs_interface.cc -shared -o libcosebis_2pcfs.so $(LDFLAGS) $(USER_LDFLAGS)
# libcosebis.so: COSEBIs_interface.cc
# $(CXX) $(CXXFLAGS) COSEBIs_interface.cc -shared -o libcosebis.so $(LDFLAGS) $(USER_LDFLAGS)
# libcosebis_cov.so: COSEBIs_covariance_interface.cc
# $(CXX) $(CXXFLAGS) COSEBIs_covariance_interface.cc -shared -o libcosebis_cov.so $(LDFLAGS) $(USER_LDFLAGS)
# libbandpower.so: BandPower_interface.cc
# $(CXX) $(CXXFLAGS) BandPower_interface.cc -shared -o libbandpower.so $(LDFLAGS) $(USER_LDFLAGS)
# libxipm_binned.so: xipm_binned.cc
# $(CXX) $(CXXFLAGS) xipm_binned.cc -shared -o libxipm_binned.so $(LDFLAGS) $(USER_LDFLAGS)
# # Clean up
.PHONY: clean all
clean:
rm -rf *.so *.so.dSYM