forked from refresh-bio/DSRC
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.c++11
45 lines (33 loc) · 810 Bytes
/
Makefile.c++11
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
.PHONY: all lib bin examples clean
all: lib bin examples
export
CXX = g++
CXXFLAGS = -O2 -m64
CXXFLAGS += -DNDEBUG -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
CXXFLAGS += -Wall
# there are problems when statically linking with pthreads and libstdc++
# so use only shared linking
#CXXFLAGS += -static
# compile using c++11
CXXFLAGS += -std=c++11
DEP_LIBS += -lpthread
APP_NAME = dsrc
LIB_NAME = libdsrc.a
LIB_DIR = lib
BIN_DIR = bin
SRC_DIR = src
bin:
cd src; ${MAKE} bin
test -d $(BIN_DIR) || mkdir $(BIN_DIR)
mv $(SRC_DIR)/$(APP_NAME) $(BIN_DIR)/
lib:
cd src; ${MAKE} lib
test -d $(LIB_DIR) || mkdir $(LIB_DIR)
mv $(SRC_DIR)/$(LIB_NAME) $(LIB_DIR)/
examples:
cd examples/cpplib; ${MAKE}
clean:
cd src; ${MAKE} clean
cd examples/cpplib; ${MAKE} clean
-rm -r $(LIB_DIR)
-rm -r $(BIN_DIR)