File tree 1 file changed +22
-2
lines changed
1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change 1
1
all : phist matcher subsystem ng_zlib
2
2
3
+ ifdef MSVC # Avoid the MingW/Cygwin sections
4
+ uname_S := Windows
5
+ uname_M := "x86_64"
6
+ else # If uname not available => 'not'
7
+ uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
8
+ uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
9
+ endif
10
+
11
+ CFLAGS =-O3 -std=c++11
12
+
13
+ ifeq ($(uname_S ) ,Linux)
14
+ CFLAGS+=-fabi-version=6
15
+ CFLAGS+=-static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive
16
+ endif
17
+
18
+ ifeq ($(uname_S ) ,Darwin)
19
+ CFLAGS+= -lc -static-libgcc
20
+ endif
21
+
22
+
3
23
ZLIB_DIR =./3rd_party/zlib-ng
4
24
5
25
phist : utils/phist.cpp ng_zlib subsystem
6
- $(CXX ) -std=c++11 -O3 utils/phist.cpp -o utils/phist
26
+ $(CXX ) $( CFLAGS ) utils/phist.cpp -o utils/phist
7
27
8
28
matcher : utils/matcher.cpp utils/input_file.cpp ng_zlib
9
- $(CXX ) -std=c++11 -o utils/matcher -I${ZLIB_DIR} -O3 utils/matcher.cpp utils/input_file.cpp $(ZLIB_DIR ) /libz.a
29
+ $(CXX ) $( CFLAGS ) -o utils/matcher -I${ZLIB_DIR} utils/matcher.cpp utils/input_file.cpp $(ZLIB_DIR ) /libz.a
10
30
11
31
ng_zlib :
12
32
cd $(ZLIB_DIR ) && ./configure --zlib-compat && $(MAKE ) libz.a
You can’t perform that action at this time.
0 commit comments