-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcpprestMakefile
executable file
·121 lines (108 loc) · 2.53 KB
/
cpprestMakefile
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
exec=execute
platform=linux
srcs=$(wildcard *.cpp)
objs=$(patsubst %.cpp,out/$(platform)/%.o,$(srcs))
CC=gcc
CXX=g++ -static
RM=rm
MKDIR=mkdir
LIB_DIR_PREFIX=/opt
LIBS_NAME:= boost_1_69_0 apr-util-1_5_4 zinclude-1_2_11 lua51 apr-1_5_2 pcre-8_42 readline-7_0
LIBS_NAME+= openssl-1_1_1 vc xml2-2_9_8 cpprestsdk-master gdal-2_3_0 geos-3_7_1 freexl-1_0_5 expat-2_2_5
#$(foreach <var>;,<list>;,<text>;)
INCS_DIR:=$(foreach LIB_N,$(LIBS_NAME),-I$(LIB_DIR_PREFIX)/$(LIB_N)/include)
LIBS_DIR:=$(foreach LIB_N,$(LIBS_NAME),-L$(LIB_DIR_PREFIX)/$(LIB_N)/lib)
LIBS+=-lcpprest
LIBS+=-lboost_math_tr1l
LIBS+=-lboost_log_setup
#LIBS+=-lboost_python27
LIBS+=-lboost_unit_test_framework
LIBS+=-lboost_log
LIBS+=-lboost_math_c99
LIBS+=-lboost_prg_exec_monitor
LIBS+=-lboost_coroutine
LIBS+=-lboost_test_exec_monitor
LIBS+=-lboost_timer
LIBS+=-lboost_graph
#LIBS+=-lboost_numpy27
LIBS+=-lboost_system
LIBS+=-lboost_fiber
LIBS+=-lboost_wave
LIBS+=-lboost_locale
LIBS+=-lboost_contract
LIBS+=-lboost_math_tr1
LIBS+=-lboost_stacktrace_addr2line
LIBS+=-lboost_program_options
LIBS+=-lboost_thread
LIBS+=-lboost_stacktrace_basic
LIBS+=-lboost_math_tr1f
LIBS+=-lboost_random
LIBS+=-lboost_stacktrace_backtrace
LIBS+=-lboost_regex
LIBS+=-lboost_wserialization
LIBS+=-lboost_context
LIBS+=-lboost_math_c99f
LIBS+=-lboost_iostreams
LIBS+=-lboost_atomic
LIBS+=-lboost_date_time
LIBS+=-lboost_container
LIBS+=-lboost_type_erasure
LIBS+=-lboost_serialization
LIBS+=-lboost_stacktrace_noop
LIBS+=-lboost_chrono
LIBS+=-lboost_filesystem
LIBS+=-lboost_math_c99l
LIBS+=-lboost_exception
LIBS+=-laprutil-1
LIBS+=-lgdal
LIBS+=-lfreexl
LIBS+=-lexpat
LIBS+=-lz
LIBS+=-llua
LIBS+=-lapr-1
LIBS+=-lpcre
LIBS+=-lpcreposix
LIBS+=-lpcrecpp
#LIBS+=-lhistory
#LIBS+=-lreadline
LIBS+=-lcrypto
LIBS+=-lssl
LIBS+=-ldebug_sym_static
#LIBS+=-lvchostif
#LIBS+=-lkhrn_static
#LIBS+=-lvcilcs
#LIBS+=-lGLESv2_static
#LIBS+=-lEGL_static
#LIBS+=-lvcfiled_check
#LIBS+=-lkhrn_client
LIBS+=-lgeos
LIBS+=-lxml2
LIBS+=-lz
LIBS+=-lpng16
LIBS+=-lpthread
LIBS+=-lm
LIBS+=-ldl
CPPFLAGS=-std=c++11
#SHARED=ON
ifneq ($(SHARED),)
CPPFLAGS+=-fPIC
LDFLAGS+=-shared
else
#sudo yum install libstdc++-static.x86_64
LDFLAGS+=-static
endif
all:$(objs)
$(CXX) -g -o $(exec) $(objs) $(LIBS) $(INCS_DIR) $(LIBS_DIR)
run:
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(shell pwd) && \
./$(exec)
out/${platform}/%.o:%.cpp
$(MKDIR) -p $(dir $@)
#$(MKDIR) -p $(shell dirname $@)
$(CXX) -g -o $@ -c $< $(INCS_DIR)
clean:
$(RM) $(objs) out -rf
show:
@echo "INCS_DIR = $(INCS_DIR)"
@echo "LIBS_DIR = $(LIBS_DIR)"
@echo "LIBS = $(LIBS)"