blob: 8cd3805a2e75e19bbe339425af706bc0ea98eaab [file] [log] [blame]
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -08001# GRPC global makefile
2# This currently builds C and C++ code.
3<%!
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -08004 import re
Craig Tillerf5371ef2015-01-12 16:40:18 -08005 import os
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -08006
nnoblec87b1c52015-01-05 17:15:18 -08007 proto_re = re.compile('(.*)\\.proto')
nnoble72309c62014-12-12 11:42:26 -08008
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -08009 def excluded(filename, exclude_res):
10 for r in exclude_res:
11 if r.match(filename):
12 return True
13 return False
nnoble72309c62014-12-12 11:42:26 -080014
15 def proto_to_cc(filename):
16 m = proto_re.match(filename)
17 if not m:
18 return filename
19 return 'gens/' + m.group(1) + '.pb.cc'
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -080020%>
21
ctiller8cfebb92015-01-06 15:02:12 -080022# Configurations
23
24VALID_CONFIG_opt = 1
25CC_opt = gcc
26CXX_opt = g++
27LD_opt = gcc
28LDXX_opt = g++
29CPPFLAGS_opt = -O2
30LDFLAGS_opt =
31DEFINES_opt = NDEBUG
32
33VALID_CONFIG_dbg = 1
34CC_dbg = gcc
35CXX_dbg = g++
36LD_dbg = gcc
37LDXX_dbg = g++
38CPPFLAGS_dbg = -O0
39LDFLAGS_dbg =
40DEFINES_dbg = _DEBUG DEBUG
41
42VALID_CONFIG_tsan = 1
43CC_tsan = clang
44CXX_tsan = clang++
45LD_tsan = clang
46LDXX_tsan = clang++
47CPPFLAGS_tsan = -O1 -fsanitize=thread -fno-omit-frame-pointer
48LDFLAGS_tsan = -fsanitize=thread
49DEFINES_tsan = NDEBUG
50
51VALID_CONFIG_asan = 1
52CC_asan = clang
53CXX_asan = clang++
54LD_asan = clang
55LDXX_asan = clang++
56CPPFLAGS_asan = -O1 -fsanitize=address -fno-omit-frame-pointer
57LDFLAGS_asan = -fsanitize=address
58DEFINES_asan = NDEBUG
59
60VALID_CONFIG_msan = 1
61CC_msan = clang
62CXX_msan = clang++
63LD_msan = clang
64LDXX_msan = clang++
65CPPFLAGS_msan = -O1 -fsanitize=memory -fno-omit-frame-pointer
66LDFLAGS_msan = -fsanitize=memory
67DEFINES_msan = NDEBUG
68
Craig Tiller699ba212015-01-13 17:02:20 -080069VALID_CONFIG_gcov = 1
70CC_gcov = gcc
71CXX_gcov = g++
72LD_gcov = gcc
73LDXX_gcov = g++
74CPPFLAGS_gcov = -O0 -fprofile-arcs -ftest-coverage
75LDFLAGS_gcov = -fprofile-arcs -ftest-coverage
76DEFINES_gcov = NDEBUG
77
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -080078# General settings.
79# You may want to change these depending on your system.
80
81prefix ?= /usr/local
82
83PROTOC = protoc
yangg102e4fe2015-01-06 16:02:50 -080084CONFIG ?= opt
ctiller8cfebb92015-01-06 15:02:12 -080085CC = $(CC_$(CONFIG))
86CXX = $(CXX_$(CONFIG))
87LD = $(LD_$(CONFIG))
88LDXX = $(LDXX_$(CONFIG))
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -080089AR = ar
90STRIP = strip --strip-unneeded
91INSTALL = install -D
92RM = rm -f
93
yangg102e4fe2015-01-06 16:02:50 -080094ifndef VALID_CONFIG_$(CONFIG)
95$(error Invalid CONFIG value '$(CONFIG)')
96endif
97
nnoble72309c62014-12-12 11:42:26 -080098HOST_CC = $(CC)
99HOST_CXX = $(CXX)
100HOST_LD = $(LD)
101HOST_LDXX = $(LDXX)
102
ctillercab52e72015-01-06 13:10:23 -0800103CPPFLAGS += $(CPPFLAGS_$(CONFIG))
104DEFINES += $(DEFINES_$(CONFIG))
ctiller8cfebb92015-01-06 15:02:12 -0800105LDFLAGS += $(LDFLAGS_$(CONFIG))
ctillercab52e72015-01-06 13:10:23 -0800106
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800107CFLAGS += -std=c89 -pedantic
108CXXFLAGS += -std=c++11
109CPPFLAGS += -g -fPIC -Wall -Werror -Wno-long-long
110LDFLAGS += -g -pthread -fPIC
111
112INCLUDES = . include gens
ctillerc008ae52015-01-07 15:33:00 -0800113LIBS = rt m z pthread
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800114LIBSXX = protobuf
nnoblec78b3402014-12-11 16:06:57 -0800115LIBS_PROTOC = protoc protobuf
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800116
117ifneq ($(wildcard /usr/src/gtest/src/gtest-all.cc),)
118GTEST_LIB = /usr/src/gtest/src/gtest-all.cc -I/usr/src/gtest
119else
120GTEST_LIB = -lgtest
121endif
chenwa8fd44a2014-12-10 15:13:55 -0800122GTEST_LIB += -lgflags
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800123ifeq ($(V),1)
124E = @:
125Q =
126else
127E = @echo
128Q = @
129endif
130
131VERSION = ${settings.version.major}.${settings.version.minor}.${settings.version.micro}.${settings.version.build}
132
133CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES))
134CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS)
135
136LDFLAGS += $(ARCH_FLAGS)
137LDLIBS += $(addprefix -l, $(LIBS))
138LDLIBSXX += $(addprefix -l, $(LIBSXX))
nnoble72309c62014-12-12 11:42:26 -0800139HOST_LDLIBS_PROTOC += $(addprefix -l, $(LIBS_PROTOC))
140
141HOST_CPPFLAGS = $(CPPFLAGS)
142HOST_CFLAGS = $(CFLAGS)
143HOST_CXXFLAGS = $(CXXFLAGS)
144HOST_LDFLAGS = $(LDFLAGS)
145HOST_LDLIBS = $(LDLIBS)
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800146
nnoble69ac39f2014-12-12 15:43:38 -0800147
148# These are automatically computed variables.
149# There shouldn't be any need to change anything from now on.
150
151HOST_SYSTEM = $(shell uname | cut -f 1 -d_)
152ifeq ($(SYSTEM),)
153SYSTEM = $(HOST_SYSTEM)
154endif
155
nnoble5b7f32a2014-12-22 08:12:44 -0800156ifeq ($(SYSTEM),MINGW32)
157SHARED_EXT = dll
158endif
159ifeq ($(SYSTEM),Darwin)
160SHARED_EXT = dylib
161endif
162ifeq ($(SHARED_EXT),)
163SHARED_EXT = so.$(VERSION)
164endif
165
nnoble69ac39f2014-12-12 15:43:38 -0800166ifeq ($(wildcard .git),)
167IS_GIT_FOLDER = false
168else
169IS_GIT_FOLDER = true
170endif
171
nnoble7e012cf2014-12-22 17:53:44 -0800172OPENSSL_ALPN_CHECK_CMD = $(CC) $(CFLAGS) $(CPPFLAGS) -o /dev/null test/build/openssl-alpn.c -lssl -lcrypto -ldl $(LDFLAGS)
173ZLIB_CHECK_CMD = $(CC) $(CFLAGS) $(CPPFLAGS) -o /dev/null test/build/zlib.c -lz $(LDFLAGS)
nnoble69ac39f2014-12-12 15:43:38 -0800174
nnoble60825402014-12-15 14:43:51 -0800175HAS_SYSTEM_OPENSSL_ALPN = $(shell $(OPENSSL_ALPN_CHECK_CMD) 2> /dev/null && echo true || echo false)
176HAS_SYSTEM_ZLIB = $(shell $(ZLIB_CHECK_CMD) 2> /dev/null && echo true || echo false)
nnoble69ac39f2014-12-12 15:43:38 -0800177
nnoble69ac39f2014-12-12 15:43:38 -0800178ifeq ($(wildcard third_party/openssl/ssl/ssl.h),)
179HAS_EMBEDDED_OPENSSL_ALPN = false
180else
181HAS_EMBEDDED_OPENSSL_ALPN = true
182endif
183
184ifeq ($(wildcard third_party/zlib/zlib.h),)
185HAS_EMBEDDED_ZLIB = false
186else
187HAS_EMBEDDED_ZLIB = true
188endif
189
nnoble69ac39f2014-12-12 15:43:38 -0800190ifeq ($(HAS_SYSTEM_ZLIB),false)
191ifeq ($(HAS_EMBEDDED_ZLIB),true)
192ZLIB_DEP = third_party/zlib/libz.a
193CPPFLAGS += -Ithird_party/zlib
194LDFLAGS += -Lthird_party/zlib
195else
196DEP_MISSING += zlib
197endif
198endif
199
200ifeq ($(HAS_SYSTEM_OPENSSL_ALPN),false)
201ifeq ($(HAS_EMBEDDED_OPENSSL_ALPN),true)
202OPENSSL_DEP = third_party/openssl/libssl.a
nnoble20e2e3f2014-12-16 15:37:57 -0800203OPENSSL_MERGE_LIBS += third_party/openssl/libssl.a third_party/openssl/libcrypto.a
nnoble69ac39f2014-12-12 15:43:38 -0800204CPPFLAGS += -Ithird_party/openssl/include
205LDFLAGS += -Lthird_party/openssl
nnoble5b7f32a2014-12-22 08:12:44 -0800206LIBS_SECURE = dl
nnoble69ac39f2014-12-12 15:43:38 -0800207else
208NO_SECURE = true
209endif
nnoble5b7f32a2014-12-22 08:12:44 -0800210else
211LIBS_SECURE = ssl crypto dl
nnoble69ac39f2014-12-12 15:43:38 -0800212endif
213
nnoble5b7f32a2014-12-22 08:12:44 -0800214LDLIBS_SECURE += $(addprefix -l, $(LIBS_SECURE))
215
Craig Tiller12c82092015-01-15 08:45:56 -0800216ifeq ($(MAKECMDGOALS),clean)
nnoble69ac39f2014-12-12 15:43:38 -0800217NO_DEPS = true
218endif
219
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800220.SECONDARY = %.pb.h %.pb.cc
221
Craig Tillerf58b9ef2015-01-15 09:09:12 -0800222PROTOC_PLUGINS=\
223% for tgt in targets:
224% if tgt.build == 'protoc':
225 bins/$(CONFIG)/${tgt.name}\
226% endif
227% endfor
228
nnoble69ac39f2014-12-12 15:43:38 -0800229ifeq ($(DEP_MISSING),)
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800230all: static shared\
231% for tgt in targets:
232% if tgt.build == 'all':
ctillercab52e72015-01-06 13:10:23 -0800233 bins/$(CONFIG)/${tgt.name}\
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800234% endif
235% endfor
236
nnoble69ac39f2014-12-12 15:43:38 -0800237dep_error:
238 @echo "You shouldn't see this message - all of your dependencies are correct."
239else
240all: dep_error git_update stop
241
242dep_error:
243 @echo
244 @echo "DEPENDENCY ERROR"
245 @echo
246 @echo "You are missing system dependencies that are essential to build grpc,"
247 @echo "and the third_party directory doesn't have them:"
248 @echo
249 @echo " $(DEP_MISSING)"
250 @echo
251 @echo "Installing the development packages for your system will solve"
252 @echo "this issue. Please consult INSTALL to get more information."
253 @echo
254 @echo "If you need information about why these tests failed, run:"
255 @echo
256 @echo " make run_dep_checks"
257 @echo
258endif
259
260git_update:
261ifeq ($(IS_GIT_FOLDER),true)
262 @echo "Additionally, since you are in a git clone, you can download the"
263 @echo "missing dependencies in third_party by running the following command:"
264 @echo
ctiller64f29102014-12-15 10:40:59 -0800265 @echo " git submodule update --init"
nnoble69ac39f2014-12-12 15:43:38 -0800266 @echo
267endif
268
269openssl_dep_error: openssl_dep_message git_update stop
270
271openssl_dep_message:
272 @echo
273 @echo "DEPENDENCY ERROR"
274 @echo
275 @echo "The target you are trying to run requires OpenSSL with ALPN support."
276 @echo "Your system doesn't have it, and neither does the third_party directory."
277 @echo
278 @echo "Please consult INSTALL to get more information."
279 @echo
280 @echo "If you need information about why these tests failed, run:"
281 @echo
282 @echo " make run_dep_checks"
283 @echo
284
285stop:
286 @false
287
ctiller09cb6d52014-12-19 17:38:22 -0800288% for tgt in targets:
ctillercab52e72015-01-06 13:10:23 -0800289${tgt.name}: bins/$(CONFIG)/${tgt.name}
ctiller09cb6d52014-12-19 17:38:22 -0800290% endfor
291
nnoble69ac39f2014-12-12 15:43:38 -0800292run_dep_checks:
nnoble69ac39f2014-12-12 15:43:38 -0800293 $(OPENSSL_ALPN_CHECK_CMD) || true
294 $(ZLIB_CHECK_CMD) || true
295
296third_party/zlib/libz.a:
297 (cd third_party/zlib ; CFLAGS="-fPIC -fvisibility=hidden" ./configure --static)
298 $(MAKE) -C third_party/zlib
299
300third_party/openssl/libssl.a:
301 (cd third_party/openssl ; CC="$(CC) -fPIC -fvisibility=hidden" ./config)
302 $(MAKE) -C third_party/openssl build_crypto build_ssl
303
nnoble29e1d292014-12-01 10:27:40 -0800304static: static_c static_cxx
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800305
Craig Tiller12c82092015-01-15 08:45:56 -0800306static_c: \
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800307% for lib in libs:
nnoble29e1d292014-12-01 10:27:40 -0800308% if lib.build == 'all' and not lib.get('c++', False):
ctillercab52e72015-01-06 13:10:23 -0800309 libs/$(CONFIG)/lib${lib.name}.a\
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800310% endif
311% endfor
312
313
Craig Tiller12c82092015-01-15 08:45:56 -0800314static_cxx: \
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800315% for lib in libs:
nnoble29e1d292014-12-01 10:27:40 -0800316% if lib.build == 'all' and lib.get('c++', False):
ctillercab52e72015-01-06 13:10:23 -0800317 libs/$(CONFIG)/lib${lib.name}.a\
nnoble29e1d292014-12-01 10:27:40 -0800318% endif
319% endfor
320
321
322shared: shared_c shared_cxx
323
Craig Tiller12c82092015-01-15 08:45:56 -0800324shared_c: \
nnoble29e1d292014-12-01 10:27:40 -0800325% for lib in libs:
326% if lib.build == 'all' and not lib.get('c++', False):
ctillercab52e72015-01-06 13:10:23 -0800327 libs/$(CONFIG)/lib${lib.name}.$(SHARED_EXT)\
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800328% endif
329% endfor
330
331
Craig Tiller12c82092015-01-15 08:45:56 -0800332shared_cxx: \
nnoble29e1d292014-12-01 10:27:40 -0800333% for lib in libs:
334% if lib.build == 'all' and lib.get('c++', False):
ctillercab52e72015-01-06 13:10:23 -0800335 libs/$(CONFIG)/lib${lib.name}.$(SHARED_EXT)\
nnoble29e1d292014-12-01 10:27:40 -0800336% endif
337% endfor
338
339
340privatelibs: privatelibs_c privatelibs_cxx
341
Craig Tiller12c82092015-01-15 08:45:56 -0800342privatelibs_c: \
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800343% for lib in libs:
Nicolas Noble9e475522015-01-13 16:56:18 -0800344% if lib.build == 'private' and not lib.get('c++', False):
ctillercab52e72015-01-06 13:10:23 -0800345 libs/$(CONFIG)/lib${lib.name}.a\
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800346% endif
347% endfor
348
349
Craig Tiller12c82092015-01-15 08:45:56 -0800350privatelibs_cxx: \
nnoble29e1d292014-12-01 10:27:40 -0800351% for lib in libs:
Nicolas Noble9e475522015-01-13 16:56:18 -0800352% if lib.build == 'private' and lib.get('c++', False):
ctillercab52e72015-01-06 13:10:23 -0800353 libs/$(CONFIG)/lib${lib.name}.a\
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800354% endif
355% endfor
356
357
nnoble29e1d292014-12-01 10:27:40 -0800358buildtests: buildtests_c buildtests_cxx
359
Craig Tiller12c82092015-01-15 08:45:56 -0800360buildtests_c: privatelibs_c\
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800361% for tgt in targets:
362% if tgt.build == 'test' and not tgt.get('c++', False):
ctillercab52e72015-01-06 13:10:23 -0800363 bins/$(CONFIG)/${tgt.name}\
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800364% endif
365% endfor
366
367
Craig Tiller12c82092015-01-15 08:45:56 -0800368buildtests_cxx: privatelibs_cxx\
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800369% for tgt in targets:
nnoble29e1d292014-12-01 10:27:40 -0800370% if tgt.build == 'test' and tgt.get('c++', False):
Craig Tillerf5371ef2015-01-12 16:40:18 -0800371 bins/$(CONFIG)/${tgt.name}\
nnoble29e1d292014-12-01 10:27:40 -0800372% endif
373% endfor
374
375
nnoble85a49262014-12-08 18:14:03 -0800376test: test_c test_cxx
nnoble29e1d292014-12-01 10:27:40 -0800377
nnoble85a49262014-12-08 18:14:03 -0800378test_c: buildtests_c
nnoble29e1d292014-12-01 10:27:40 -0800379% for tgt in targets:
380% if tgt.build == 'test' and tgt.get('run', True) and not tgt.get('c++', False):
381 $(E) "[RUN] Testing ${tgt.name}"
ctillercab52e72015-01-06 13:10:23 -0800382 $(Q) ./bins/$(CONFIG)/${tgt.name} || ( echo test ${tgt.name} failed ; exit 1 )
nnoble29e1d292014-12-01 10:27:40 -0800383% endif
384% endfor
385
386
nnoble85a49262014-12-08 18:14:03 -0800387test_cxx: buildtests_cxx
nnoble29e1d292014-12-01 10:27:40 -0800388% for tgt in targets:
389% if tgt.build == 'test' and tgt.get('run', True) and tgt.get('c++', False):
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800390 $(E) "[RUN] Testing ${tgt.name}"
ctillercab52e72015-01-06 13:10:23 -0800391 $(Q) ./bins/$(CONFIG)/${tgt.name} || ( echo test ${tgt.name} failed ; exit 1 )
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800392% endif
393% endfor
394
395
396tools: privatelibs\
397% for tgt in targets:
398% if tgt.build == 'tool':
ctillercab52e72015-01-06 13:10:23 -0800399 bins/$(CONFIG)/${tgt.name}\
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800400% endif
401% endfor
402
403
404buildbenchmarks: privatelibs\
405% for tgt in targets:
406% if tgt.build == 'benchmark':
ctillercab52e72015-01-06 13:10:23 -0800407 bins/$(CONFIG)/${tgt.name}\
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800408% endif
409% endfor
410
411
412benchmarks: buildbenchmarks
413
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800414strip: strip-static strip-shared
415
nnoble20e2e3f2014-12-16 15:37:57 -0800416strip-static: strip-static_c strip-static_cxx
417
418strip-shared: strip-shared_c strip-shared_cxx
419
nnoble85a49262014-12-08 18:14:03 -0800420strip-static_c: static_c
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800421% for lib in libs:
nnoble85a49262014-12-08 18:14:03 -0800422% if not lib.get("c++", False):
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800423% if lib.build == "all":
424 $(E) "[STRIP] Stripping lib${lib.name}.a"
ctillercab52e72015-01-06 13:10:23 -0800425 $(Q) $(STRIP) libs/$(CONFIG)/lib${lib.name}.a
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800426% endif
nnoble85a49262014-12-08 18:14:03 -0800427% endif
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800428% endfor
429
nnoble85a49262014-12-08 18:14:03 -0800430strip-static_cxx: static_cxx
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800431% for lib in libs:
nnoble85a49262014-12-08 18:14:03 -0800432% if lib.get("c++", False):
433% if lib.build == "all":
434 $(E) "[STRIP] Stripping lib${lib.name}.a"
ctillercab52e72015-01-06 13:10:23 -0800435 $(Q) $(STRIP) libs/$(CONFIG)/lib${lib.name}.a
nnoble85a49262014-12-08 18:14:03 -0800436% endif
437% endif
438% endfor
439
440strip-shared_c: shared_c
441% for lib in libs:
442% if not lib.get("c++", False):
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800443% if lib.build == "all":
444 $(E) "[STRIP] Stripping lib${lib.name}.so"
ctillercab52e72015-01-06 13:10:23 -0800445 $(Q) $(STRIP) libs/$(CONFIG)/lib${lib.name}.$(SHARED_EXT)
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800446% endif
nnoble85a49262014-12-08 18:14:03 -0800447% endif
448% endfor
449
450strip-shared_cxx: shared_cxx
451% for lib in libs:
452% if lib.get("c++", False):
453% if lib.build == "all":
454 $(E) "[STRIP] Stripping lib${lib.name}.so"
ctillercab52e72015-01-06 13:10:23 -0800455 $(Q) $(STRIP) libs/$(CONFIG)/lib${lib.name}.$(SHARED_EXT)
nnoble85a49262014-12-08 18:14:03 -0800456% endif
457% endif
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800458% endfor
459
nnoble72309c62014-12-12 11:42:26 -0800460% for p in protos:
Craig Tillerf58b9ef2015-01-15 09:09:12 -0800461gens/${p}.pb.cc: ${p}.proto $(PROTOC_PLUGINS)
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800462 $(E) "[PROTOC] Generating protobuf CC file from $<"
463 $(Q) mkdir -p `dirname $@`
ctillercab52e72015-01-06 13:10:23 -0800464 $(Q) $(PROTOC) --cpp_out=gens --grpc_out=gens --plugin=protoc-gen-grpc=bins/$(CONFIG)/cpp_plugin $<
nnoble72309c62014-12-12 11:42:26 -0800465
466% endfor
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800467
ctillercab52e72015-01-06 13:10:23 -0800468objs/$(CONFIG)/%.o : %.c
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800469 $(E) "[C] Compiling $<"
470 $(Q) mkdir -p `dirname $@`
Craig Tiller12c82092015-01-15 08:45:56 -0800471 $(Q) $(CC) $(CFLAGS) $(CPPFLAGS) -MMD -MF $(addsuffix .dep, $(basename $@)) -c -o $@ $<
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800472
ctillercab52e72015-01-06 13:10:23 -0800473objs/$(CONFIG)/%.o : gens/%.pb.cc
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800474 $(E) "[CXX] Compiling $<"
475 $(Q) mkdir -p `dirname $@`
Craig Tiller12c82092015-01-15 08:45:56 -0800476 $(Q) $(CXX) $(CXXFLAGS) $(CPPFLAGS) -MMD -MF $(addsuffix .dep, $(basename $@)) -c -o $@ $<
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800477
ctillercab52e72015-01-06 13:10:23 -0800478objs/$(CONFIG)/src/compiler/%.o : src/compiler/%.cc
nnoble72309c62014-12-12 11:42:26 -0800479 $(E) "[HOSTCXX] Compiling $<"
480 $(Q) mkdir -p `dirname $@`
Craig Tiller12c82092015-01-15 08:45:56 -0800481 $(Q) $(HOST_CXX) $(HOST_CXXFLAGS) $(HOST_CPPFLAGS) -MMD -MF $(addsuffix .dep, $(basename $@)) -c -o $@ $<
nnoble72309c62014-12-12 11:42:26 -0800482
ctillercab52e72015-01-06 13:10:23 -0800483objs/$(CONFIG)/%.o : %.cc
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800484 $(E) "[CXX] Compiling $<"
485 $(Q) mkdir -p `dirname $@`
Craig Tiller12c82092015-01-15 08:45:56 -0800486 $(Q) $(CXX) $(CXXFLAGS) $(CPPFLAGS) -MMD -MF $(addsuffix .dep, $(basename $@)) -c -o $@ $<
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800487
488
nnoble85a49262014-12-08 18:14:03 -0800489install: install_c install_cxx
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800490
nnoble85a49262014-12-08 18:14:03 -0800491install_c: install-headers_c install-static_c install-shared_c
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800492
nnoble85a49262014-12-08 18:14:03 -0800493install_cxx: install-headers_cxx install-static_cxx install-shared_cxx
494
495install-headers: install-headers_c install-headers_cxx
496
497install-headers_c:
498 $(E) "[INSTALL] Installing public C headers"
499 $(Q) $(foreach h, $(PUBLIC_HEADERS_C), $(INSTALL) $(h) $(prefix)/$(h) && ) exit 0 || exit 1
500
501install-headers_cxx:
502 $(E) "[INSTALL] Installing public C++ headers"
503 $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) $(h) $(prefix)/$(h) && ) exit 0 || exit 1
504
505install-static: install-static_c install-static_cxx
506
507install-static_c: static_c strip-static_c
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800508% for lib in libs:
nnoble85a49262014-12-08 18:14:03 -0800509% if not lib.get("c++", False):
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800510% if lib.build == "all":
511 $(E) "[INSTALL] Installing lib${lib.name}.a"
ctillercab52e72015-01-06 13:10:23 -0800512 $(Q) $(INSTALL) libs/$(CONFIG)/lib${lib.name}.a $(prefix)/lib/lib${lib.name}.a
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800513% endif
nnoble85a49262014-12-08 18:14:03 -0800514% endif
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800515% endfor
516
nnoble85a49262014-12-08 18:14:03 -0800517install-static_cxx: static_cxx strip-static_cxx
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800518% for lib in libs:
nnoble85a49262014-12-08 18:14:03 -0800519% if lib.get("c++", False):
520% if lib.build == "all":
521 $(E) "[INSTALL] Installing lib${lib.name}.a"
ctillercab52e72015-01-06 13:10:23 -0800522 $(Q) $(INSTALL) libs/$(CONFIG)/lib${lib.name}.a $(prefix)/lib/lib${lib.name}.a
nnoble85a49262014-12-08 18:14:03 -0800523% endif
524% endif
525% endfor
526
527install-shared_c: shared_c strip-shared_c
528% for lib in libs:
529% if not lib.get("c++", False):
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800530% if lib.build == "all":
nnoble5b7f32a2014-12-22 08:12:44 -0800531ifeq ($(SYSTEM),MINGW32)
532 $(E) "[INSTALL] Installing ${lib.name}.$(SHARED_EXT)"
ctillercab52e72015-01-06 13:10:23 -0800533 $(Q) $(INSTALL) libs/$(CONFIG)/${lib.name}.$(SHARED_EXT) $(prefix)/lib/${lib.name}.$(SHARED_EXT)
534 $(Q) $(INSTALL) libs/$(CONFIG)/lib${lib.name}-imp.a $(prefix)/lib/lib${lib.name}-imp.a
nnoble5b7f32a2014-12-22 08:12:44 -0800535else
536 $(E) "[INSTALL] Installing lib${lib.name}.$(SHARED_EXT)"
ctillercab52e72015-01-06 13:10:23 -0800537 $(Q) $(INSTALL) libs/$(CONFIG)/lib${lib.name}.$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.$(SHARED_EXT)
nnoble5b7f32a2014-12-22 08:12:44 -0800538ifneq ($(SYSTEM),Darwin)
539 $(Q) ln -sf lib${lib.name}.$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.so
540endif
541endif
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800542% endif
nnoble85a49262014-12-08 18:14:03 -0800543% endif
544% endfor
nnoble5b7f32a2014-12-22 08:12:44 -0800545ifneq ($(SYSTEM),MINGW32)
546ifneq ($(SYSTEM),Darwin)
547 $(Q) ldconfig
548endif
549endif
nnoble85a49262014-12-08 18:14:03 -0800550
551install-shared_cxx: shared_cxx strip-shared_cxx
552% for lib in libs:
553% if lib.get("c++", False):
554% if lib.build == "all":
nnoble5b7f32a2014-12-22 08:12:44 -0800555ifeq ($(SYSTEM),MINGW32)
556 $(E) "[INSTALL] Installing ${lib.name}.$(SHARED_EXT)"
ctillercab52e72015-01-06 13:10:23 -0800557 $(Q) $(INSTALL) libs/$(CONFIG)/${lib.name}.$(SHARED_EXT) $(prefix)/lib/${lib.name}.$(SHARED_EXT)
558 $(Q) $(INSTALL) libs/$(CONFIG)/lib${lib.name}-imp.a $(prefix)/lib/lib${lib.name}-imp.a
nnoble5b7f32a2014-12-22 08:12:44 -0800559else
560 $(E) "[INSTALL] Installing lib${lib.name}.$(SHARED_EXT)"
ctillercab52e72015-01-06 13:10:23 -0800561 $(Q) $(INSTALL) libs/$(CONFIG)/lib${lib.name}.$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.$(SHARED_EXT)
nnoble5b7f32a2014-12-22 08:12:44 -0800562ifneq ($(SYSTEM),Darwin)
563 $(Q) ln -sf lib${lib.name}.$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.so
564endif
565endif
nnoble85a49262014-12-08 18:14:03 -0800566% endif
567% endif
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800568% endfor
nnoble5b7f32a2014-12-22 08:12:44 -0800569ifneq ($(SYSTEM),MINGW32)
570ifneq ($(SYSTEM),Darwin)
571 $(Q) ldconfig
572endif
573endif
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800574
Craig Tiller3759e6f2015-01-15 08:13:11 -0800575clean:
Craig Tiller12c82092015-01-15 08:45:56 -0800576 $(Q) $(RM) -rf objs libs bins gens
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800577
578
579# The various libraries
580
581% for lib in libs:
582${makelib(lib)}
583% endfor
584
585
nnoble69ac39f2014-12-12 15:43:38 -0800586# All of the test targets, and protoc plugins
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800587
588% for tgt in targets:
589${maketarget(tgt)}
590% endfor
591
592<%def name="makelib(lib)">
593LIB${lib.name.upper()}_SRC = \\
594
595% for src in lib.src:
nnoble72309c62014-12-12 11:42:26 -0800596 ${proto_to_cc(src)} \\
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800597
598% endfor
599
600% if "public_headers" in lib:
nnoble85a49262014-12-08 18:14:03 -0800601% if lib.get("c++", False):
602PUBLIC_HEADERS_CXX += \\
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800603
nnoble85a49262014-12-08 18:14:03 -0800604% else:
605PUBLIC_HEADERS_C += \\
606
607% endif
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800608% for hdr in lib.public_headers:
609 ${hdr} \\
610
611% endfor
612% endif
613
ctillercab52e72015-01-06 13:10:23 -0800614LIB${lib.name.upper()}_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(LIB${lib.name.upper()}_SRC))))
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800615
nnoble69ac39f2014-12-12 15:43:38 -0800616% if lib.get('secure', True):
nnoble69ac39f2014-12-12 15:43:38 -0800617ifeq ($(NO_SECURE),true)
618
ctillercab52e72015-01-06 13:10:23 -0800619libs/$(CONFIG)/lib${lib.name}.a: openssl_dep_error
nnoble69ac39f2014-12-12 15:43:38 -0800620
nnoble5b7f32a2014-12-22 08:12:44 -0800621% if lib.build == "all":
622ifeq ($(SYSTEM),MINGW32)
ctillercab52e72015-01-06 13:10:23 -0800623libs/$(CONFIG)/${lib.name}.$(SHARED_EXT): openssl_dep_error
nnoble5b7f32a2014-12-22 08:12:44 -0800624else
ctillercab52e72015-01-06 13:10:23 -0800625libs/$(CONFIG)/lib${lib.name}.$(SHARED_EXT): openssl_dep_error
nnoble5b7f32a2014-12-22 08:12:44 -0800626endif
627% endif
628
nnoble69ac39f2014-12-12 15:43:38 -0800629else
630
ctillercab52e72015-01-06 13:10:23 -0800631libs/$(CONFIG)/lib${lib.name}.a: $(OPENSSL_DEP) $(LIB${lib.name.upper()}_OBJS)
nnoble20e2e3f2014-12-16 15:37:57 -0800632% else:
ctillercab52e72015-01-06 13:10:23 -0800633libs/$(CONFIG)/lib${lib.name}.a: $(LIB${lib.name.upper()}_OBJS)
nnoble20e2e3f2014-12-16 15:37:57 -0800634% endif
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800635 $(E) "[AR] Creating $@"
nnoble85a49262014-12-08 18:14:03 -0800636 $(Q) mkdir -p `dirname $@`
ctillercab52e72015-01-06 13:10:23 -0800637 $(Q) $(AR) rcs libs/$(CONFIG)/lib${lib.name}.a $(LIB${lib.name.upper()}_OBJS)
nnoble20e2e3f2014-12-16 15:37:57 -0800638% if lib.get('baselib', False):
639% if lib.get('secure', True):
Craig Tillerf5371ef2015-01-12 16:40:18 -0800640 $(Q) rm -rf tmp-merge
nnoble20e2e3f2014-12-16 15:37:57 -0800641 $(Q) mkdir tmp-merge
ctillercab52e72015-01-06 13:10:23 -0800642 $(Q) ( cd tmp-merge ; $(AR) x ../libs/$(CONFIG)/lib${lib.name}.a )
nnoble20e2e3f2014-12-16 15:37:57 -0800643 $(Q) for l in $(OPENSSL_MERGE_LIBS) ; do ( cd tmp-merge ; <%text>ar x ../$${l}</%text> ) ; done
ctillercab52e72015-01-06 13:10:23 -0800644 $(Q) rm -f libs/$(CONFIG)/lib${lib.name}.a tmp-merge/__.SYMDEF*
645 $(Q) ar rcs libs/$(CONFIG)/lib${lib.name}.a tmp-merge/*
nnoble20e2e3f2014-12-16 15:37:57 -0800646 $(Q) rm -rf tmp-merge
647% endif
648% endif
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800649
nnoble5b7f32a2014-12-22 08:12:44 -0800650<%
651 if lib.get('c++', False):
652 ld = '$(LDXX)'
653 else:
654 ld = '$(LD)'
655
ctillercab52e72015-01-06 13:10:23 -0800656 out_base = 'libs/$(CONFIG)/' + lib.name
657 out_libbase = 'libs/$(CONFIG)/lib' + lib.name
nnoble5b7f32a2014-12-22 08:12:44 -0800658
659 common = '$(LIB' + lib.name.upper() + '_OBJS) $(LDLIBS)'
660
661 libs = ''
662 lib_deps = ''
663 mingw_libs = ''
664 mingw_lib_deps = ''
665 for dep in lib.get('deps', []):
666 libs = libs + ' -l' + dep
ctillercab52e72015-01-06 13:10:23 -0800667 lib_deps = lib_deps + 'libs/$(CONFIG)/lib' + dep + '.$(SHARED_EXT)'
nnoble5b7f32a2014-12-22 08:12:44 -0800668 mingw_libs = mingw_libs + ' -l' + dep + '-imp'
ctillercab52e72015-01-06 13:10:23 -0800669 mingw_lib_deps = mingw_lib_deps + 'libs/$(CONFIG)/' + dep + '.$(SHARED_EXT)'
nnoble5b7f32a2014-12-22 08:12:44 -0800670
671 if lib.get('secure', True):
672 common = common + ' $(LDLIBS_SECURE) $(OPENSSL_MERGE_LIBS)'
673 lib_deps = lib_deps + ' $(OPENSSL_DEP)'
674 mingw_lib_deps = mingw_lib_deps + ' $(OPENSSL_DEP)'
675
676%>
677
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800678% if lib.build == "all":
nnoble5b7f32a2014-12-22 08:12:44 -0800679ifeq ($(SYSTEM),MINGW32)
680${out_base}.$(SHARED_EXT): $(LIB${lib.name.upper()}_OBJS) ${mingw_lib_deps}
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800681 $(E) "[LD] Linking $@"
nnoble85a49262014-12-08 18:14:03 -0800682 $(Q) mkdir -p `dirname $@`
ctillercab52e72015-01-06 13:10:23 -0800683 $(Q) ${ld} $(LDFLAGS) -Llibs/$(CONFIG) -shared -Wl,--output-def=${out_base}.def -Wl,--out-implib=${out_libbase}-imp.a -o ${out_base}.$(SHARED_EXT) ${common}${mingw_libs}
nnoble5b7f32a2014-12-22 08:12:44 -0800684else
685${out_libbase}.$(SHARED_EXT): $(LIB${lib.name.upper()}_OBJS) ${lib_deps}
686 $(E) "[LD] Linking $@"
687 $(Q) mkdir -p `dirname $@`
688ifeq ($(SYSTEM),Darwin)
ctillercab52e72015-01-06 13:10:23 -0800689 $(Q) ${ld} $(LDFLAGS) -Llibs/$(CONFIG) -dynamiclib -o ${out_libbase}.$(SHARED_EXT) ${common}${libs}
nnoble5b7f32a2014-12-22 08:12:44 -0800690else
ctillercab52e72015-01-06 13:10:23 -0800691 $(Q) ${ld} $(LDFLAGS) -Llibs/$(CONFIG) -shared -Wl,-soname,lib${lib.name}.so.${settings.version.major} -o ${out_libbase}.$(SHARED_EXT) ${common}${libs}
nnoble5b7f32a2014-12-22 08:12:44 -0800692 $(Q) ln -sf lib${lib.name}.$(SHARED_EXT) ${out_libbase}.so
693endif
694endif
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800695% endif
696
nnoble69ac39f2014-12-12 15:43:38 -0800697% if lib.get('secure', True):
698
699endif
700% endif
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800701
nnoble69ac39f2014-12-12 15:43:38 -0800702% if lib.get('secure', True):
703ifneq ($(NO_SECURE),true)
704% endif
705ifneq ($(NO_DEPS),true)
Craig Tiller8f126a62015-01-15 08:50:19 -0800706-include $(LIB${lib.name.upper()}_OBJS:.o=.dep)
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800707endif
nnoble69ac39f2014-12-12 15:43:38 -0800708% if lib.get('secure', True):
709endif
710% endif
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800711
Craig Tiller27715ca2015-01-12 16:55:59 -0800712% for src in lib.src:
713% if not proto_re.match(src):
714objs/$(CONFIG)/${os.path.splitext(src)[0]}.o: \
715% for src2 in lib.src:
716% if proto_re.match(src2):
717 ${proto_to_cc(src2)}\
718% endif
719% endfor
720% endif
721
722% endfor
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800723</%def>
724
725<%def name="maketarget(tgt)">
726${tgt.name.upper()}_SRC = \\
727
728% for src in tgt.src:
nnoble72309c62014-12-12 11:42:26 -0800729 ${proto_to_cc(src)} \\
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800730
731% endfor
732
ctillercab52e72015-01-06 13:10:23 -0800733${tgt.name.upper()}_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(${tgt.name.upper()}_SRC))))
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800734
nnoble69ac39f2014-12-12 15:43:38 -0800735% if tgt.get('secure', True):
736ifeq ($(NO_SECURE),true)
737
ctillercab52e72015-01-06 13:10:23 -0800738bins/$(CONFIG)/${tgt.name}: openssl_dep_error
nnoble69ac39f2014-12-12 15:43:38 -0800739
740else
741
742% endif
ctillercab52e72015-01-06 13:10:23 -0800743bins/$(CONFIG)/${tgt.name}: $(${tgt.name.upper()}_OBJS)\
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800744% for dep in tgt.deps:
ctillercab52e72015-01-06 13:10:23 -0800745 libs/$(CONFIG)/lib${dep}.a\
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800746% endfor
747
nnoble72309c62014-12-12 11:42:26 -0800748% if tgt.get("c++", False):
749% if tgt.build == 'protoc':
750 $(E) "[HOSTLD] Linking $@"
751 $(Q) mkdir -p `dirname $@`
752 $(Q) $(HOST_LDXX) $(HOST_LDFLAGS) $(${tgt.name.upper()}_OBJS)\
753% else:
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800754 $(E) "[LD] Linking $@"
nnoble85a49262014-12-08 18:14:03 -0800755 $(Q) mkdir -p `dirname $@`
nnoblec78b3402014-12-11 16:06:57 -0800756 $(Q) $(LDXX) $(LDFLAGS) $(${tgt.name.upper()}_OBJS)\
nnoble72309c62014-12-12 11:42:26 -0800757% endif
nnoblec78b3402014-12-11 16:06:57 -0800758% if tgt.build == 'test':
759 $(GTEST_LIB)\
760% endif
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800761% else:
nnoble72309c62014-12-12 11:42:26 -0800762 $(E) "[LD] Linking $@"
763 $(Q) mkdir -p `dirname $@`
nnoble5b7f32a2014-12-22 08:12:44 -0800764 $(Q) $(LD) $(LDFLAGS) $(${tgt.name.upper()}_OBJS)\
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800765% endif
766% for dep in tgt.deps:
ctillercab52e72015-01-06 13:10:23 -0800767 libs/$(CONFIG)/lib${dep}.a\
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800768% endfor
769% if tgt.get("c++", False):
nnoble72309c62014-12-12 11:42:26 -0800770% if tgt.build == 'protoc':
771 $(HOST_LDLIBSXX)\
772% else:
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800773 $(LDLIBSXX)\
774% endif
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800775% endif
nnoblec78b3402014-12-11 16:06:57 -0800776% if tgt.build == 'protoc':
nnoble72309c62014-12-12 11:42:26 -0800777 $(HOST_LDLIBS)\
778% else:
779 $(LDLIBS)\
780% endif
781% if tgt.build == 'protoc':
782 $(HOST_LDLIBS_PROTOC)\
783% elif tgt.get('secure', True):
784 $(LDLIBS_SECURE)\
nnoblec78b3402014-12-11 16:06:57 -0800785% endif
ctillercab52e72015-01-06 13:10:23 -0800786 -o bins/$(CONFIG)/${tgt.name}
nnoble69ac39f2014-12-12 15:43:38 -0800787% if tgt.get('secure', True):
788
789endif
790% endif
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800791
Craig Tillerf5371ef2015-01-12 16:40:18 -0800792% for src in tgt.src:
793objs/$(CONFIG)/${os.path.splitext(src)[0]}.o: \
794% for dep in tgt.deps:
795 libs/$(CONFIG)/lib${dep}.a\
796% endfor
797
798% endfor
799
Craig Tiller8f126a62015-01-15 08:50:19 -0800800deps_${tgt.name}: $(${tgt.name.upper()}_OBJS:.o=.dep)
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800801
nnoble69ac39f2014-12-12 15:43:38 -0800802% if tgt.get('secure', True):
803ifneq ($(NO_SECURE),true)
804% endif
805ifneq ($(NO_DEPS),true)
Craig Tiller8f126a62015-01-15 08:50:19 -0800806-include $(${tgt.name.upper()}_OBJS:.o=.dep)
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800807endif
nnoble69ac39f2014-12-12 15:43:38 -0800808% if tgt.get('secure', True):
809endif
810% endif
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800811</%def>
812
nnoble85a49262014-12-08 18:14:03 -0800813.PHONY: all strip tools \
nnoble69ac39f2014-12-12 15:43:38 -0800814dep_error openssl_dep_error openssl_dep_message git_update stop \
nnoble85a49262014-12-08 18:14:03 -0800815buildtests buildtests_c buildtests_cxx \
816test test_c test_cxx \
817install install_c install_cxx \
818install-headers install-headers_c install-headers_cxx \
819install-shared install-shared_c install-shared_cxx \
820install-static install-static_c install-static_cxx \
821strip strip-shared strip-static \
822strip_c strip-shared_c strip-static_c \
823strip_cxx strip-shared_cxx strip-static_cxx \
Craig Tillerf0afe502015-01-15 09:04:49 -0800824dep_c dep_cxx bins_dep_c bins_dep_cxx \
Craig Tiller12c82092015-01-15 08:45:56 -0800825clean
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800826