-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makevars.in
48 lines (30 loc) · 1.35 KB
/
Makevars.in
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
# Copyright 2019 Fred Hutchinson Cancer Research Center
# See the included LICENSE file for details on the licence that is granted to the user of this software.
# GNUMakefile
# Just a snippet to stop executing under other make(1) commands
# that won't understand these lines
ifneq (,)
This makefile requires GNU Make.
endif
CXX_STD = CXX11
boost_sys_src=${wildcard boost/libs/system/src/*.cpp}
boost_sys_objs=${boost_sys_src:.cpp=.o}
boost_fs_src=${wildcard boost/libs/filesystem/src/*.cpp}
boost_fs_objs=${boost_fs_src:.cpp=.o}
PKG_CPPFLAGS =-DROUT -I../inst/include -w -Wfatal-errors -DBOOST_NO_AUTO_PTR -DBOOST_FILESYSTEM_NO_CXX20_ATOMIC_REF -DBOOST_FILESYSTEM_SINGLE_THREADED #the last to flagsare needed to compile bundled boost file system library 1.78
cytolib_src=${wildcard *.cpp}
cytolib_objs=${cytolib_src:.cpp=.o}
BOOSTFSLIB = libboost_fs.a
USERDIR = ${R_PACKAGE_DIR}/lib${R_ARCH}
USERLIB = ${USERDIR}/libcytolib.a
OBJECTS=dummy.o
#needs to wrap in $(shell) to strip the quotes returned by rhdf5lib::pkgconfig
FSLIB = ${boost_fs_objs} ${boost_sys_objs}
all: $(SHLIB)
$(SHLIB): $(USERLIB)
$(USERLIB): ${boost_fs_objs} ${cytolib_objs}
mkdir -p "${USERDIR}"
$(AR) rs "${USERLIB}" ${cytolib_objs} ${boost_fs_objs} ${boost_sys_objs}
$(boost_fs_objs): ${boost_sys_objs}
clean:
rm -f $(OBJECTS) ${cytolib_objs} ${boost_fs_objs} ${boost_sys_objs} $(SHLIB)