[go: up one dir, main page]

blob: 0b4df5a21863c7945f54c74e6336609fe6f01ee9 [file] [log] [blame]
John Koleszar0ea50ce2010-05-18 15:58:331##
John Koleszarc2140b82010-09-09 12:16:392## Copyright (c) 2010 The WebM project authors. All Rights Reserved.
John Koleszar0ea50ce2010-05-18 15:58:333##
John Koleszar94c52e42010-06-18 16:39:214## Use of this source code is governed by a BSD-style license
John Koleszar09202d82010-06-04 20:19:405## that can be found in the LICENSE file in the root of the source
6## tree. An additional intellectual property rights grant can be found
John Koleszar94c52e42010-06-18 16:39:217## in the file PATENTS. All contributing project authors may
John Koleszar09202d82010-06-04 20:19:408## be found in the AUTHORS file in the root of the source tree.
John Koleszar0ea50ce2010-05-18 15:58:339##
10
John Koleszar7dfec962012-03-01 20:50:4011LIBYUV_SRCS += third_party/libyuv/include/libyuv/basic_types.h \
James Zern3a7d4672014-08-10 23:15:1812 third_party/libyuv/include/libyuv/convert.h \
13 third_party/libyuv/include/libyuv/convert_argb.h \
14 third_party/libyuv/include/libyuv/convert_from.h \
John Koleszar7dfec962012-03-01 20:50:4015 third_party/libyuv/include/libyuv/cpu_id.h \
Deb Mukherjee47031c02014-05-17 01:52:0116 third_party/libyuv/include/libyuv/planar_functions.h \
James Zern3a7d4672014-08-10 23:15:1817 third_party/libyuv/include/libyuv/rotate.h \
Deb Mukherjee47031c02014-05-17 01:52:0118 third_party/libyuv/include/libyuv/row.h \
John Koleszar7dfec962012-03-01 20:50:4019 third_party/libyuv/include/libyuv/scale.h \
Deb Mukherjee47031c02014-05-17 01:52:0120 third_party/libyuv/include/libyuv/scale_row.h \
21 third_party/libyuv/source/cpu_id.cc \
22 third_party/libyuv/source/planar_functions.cc \
23 third_party/libyuv/source/row_any.cc \
24 third_party/libyuv/source/row_common.cc \
James Zernfcb42532015-07-24 23:54:5125 third_party/libyuv/source/row_gcc.cc \
Deb Mukherjee47031c02014-05-17 01:52:0126 third_party/libyuv/source/row_mips.cc \
27 third_party/libyuv/source/row_neon.cc \
James Zern3a7d4672014-08-10 23:15:1828 third_party/libyuv/source/row_neon64.cc \
Deb Mukherjee47031c02014-05-17 01:52:0129 third_party/libyuv/source/row_win.cc \
James Zern3a7d4672014-08-10 23:15:1830 third_party/libyuv/source/scale.cc \
James Zernfcb42532015-07-24 23:54:5131 third_party/libyuv/source/scale_any.cc \
Deb Mukherjee47031c02014-05-17 01:52:0132 third_party/libyuv/source/scale_common.cc \
James Zernfcb42532015-07-24 23:54:5133 third_party/libyuv/source/scale_gcc.cc \
Deb Mukherjee47031c02014-05-17 01:52:0134 third_party/libyuv/source/scale_mips.cc \
35 third_party/libyuv/source/scale_neon.cc \
James Zern2f5e0fa2014-08-23 01:16:4436 third_party/libyuv/source/scale_neon64.cc \
James Zern3a7d4672014-08-10 23:15:1837 third_party/libyuv/source/scale_win.cc \
John Koleszar0ea50ce2010-05-18 15:58:3338
Vignesh Venkatasubramaniandd551072015-09-10 18:02:4039LIBWEBM_COMMON_SRCS += third_party/libwebm/webmids.hpp
40
Vignesh Venkatasubramanian2dcbf8c2014-03-19 18:56:0241LIBWEBM_MUXER_SRCS += third_party/libwebm/mkvmuxer.cpp \
42 third_party/libwebm/mkvmuxerutil.cpp \
43 third_party/libwebm/mkvwriter.cpp \
44 third_party/libwebm/mkvmuxer.hpp \
45 third_party/libwebm/mkvmuxertypes.hpp \
46 third_party/libwebm/mkvmuxerutil.hpp \
47 third_party/libwebm/mkvparser.hpp \
Vignesh Venkatasubramaniandd551072015-09-10 18:02:4048 third_party/libwebm/mkvwriter.hpp
Vignesh Venkatasubramanian2dcbf8c2014-03-19 18:56:0249
Vignesh Venkatasubramaniandbd24712014-04-03 07:41:1450LIBWEBM_PARSER_SRCS = third_party/libwebm/mkvparser.cpp \
51 third_party/libwebm/mkvreader.cpp \
52 third_party/libwebm/mkvparser.hpp \
53 third_party/libwebm/mkvreader.hpp
54
James Zern77bbcab2014-02-06 00:55:0155# List of examples to build. UTILS are tools meant for distribution
56# while EXAMPLES demonstrate specific portions of the API.
John Koleszarea68ee02010-10-21 19:02:1057UTILS-$(CONFIG_DECODERS) += vpxdec.c
58vpxdec.SRCS += md5_utils.c md5_utils.h
Dmitry Kovalev4334c072014-02-27 00:32:0959vpxdec.SRCS += vpx_ports/mem_ops.h
60vpxdec.SRCS += vpx_ports/mem_ops_aligned.h
Johanncad0eca2015-05-07 23:41:3361vpxdec.SRCS += vpx_ports/msvc.h
John Koleszarea68ee02010-10-21 19:02:1062vpxdec.SRCS += vpx_ports/vpx_timer.h
63vpxdec.SRCS += vpx/vpx_integer.h
Attila Nagy1a7d25a2011-09-15 12:34:1264vpxdec.SRCS += args.c args.h
Tom Finegan00a35aa2013-11-14 20:37:4265vpxdec.SRCS += ivfdec.c ivfdec.h
John Koleszarc377bf02010-11-02 13:11:5766vpxdec.SRCS += tools_common.c tools_common.h
Dmitry Kovalev5ab63582014-01-18 01:02:3767vpxdec.SRCS += y4menc.c y4menc.h
Deb Mukherjee47031c02014-05-17 01:52:0168ifeq ($(CONFIG_LIBYUV),yes)
69 vpxdec.SRCS += $(LIBYUV_SRCS)
70endif
Vignesh Venkatasubramanian0ffa3832014-03-14 15:10:3571ifeq ($(CONFIG_WEBM_IO),yes)
Vignesh Venkatasubramaniandd551072015-09-10 18:02:4072 vpxdec.SRCS += $(LIBWEBM_COMMON_SRCS)
Vignesh Venkatasubramaniandbd24712014-04-03 07:41:1473 vpxdec.SRCS += $(LIBWEBM_PARSER_SRCS)
74 vpxdec.SRCS += webmdec.cc webmdec.h
Vignesh Venkatasubramanian0ffa3832014-03-14 15:10:3575endif
John Koleszarea68ee02010-10-21 19:02:1076vpxdec.GUID = BA5FE66F-38DD-E034-F542-B1578C5FB950
77vpxdec.DESCRIPTION = Full featured decoder
78UTILS-$(CONFIG_ENCODERS) += vpxenc.c
Tom Finegan49dc9ca2013-11-22 00:46:4079vpxenc.SRCS += args.c args.h y4minput.c y4minput.h vpxenc.h
Tom Finegan00a35aa2013-11-14 20:37:4280vpxenc.SRCS += ivfdec.c ivfdec.h
81vpxenc.SRCS += ivfenc.c ivfenc.h
Dmitry Kovalevf11da2b2014-01-29 20:28:2982vpxenc.SRCS += rate_hist.c rate_hist.h
John Koleszarc377bf02010-11-02 13:11:5783vpxenc.SRCS += tools_common.c tools_common.h
Tom Finegan249366b2013-11-25 20:05:1984vpxenc.SRCS += warnings.c warnings.h
Attila Nagy1a7d25a2011-09-15 12:34:1285vpxenc.SRCS += vpx_ports/mem_ops.h
John Koleszarea68ee02010-10-21 19:02:1086vpxenc.SRCS += vpx_ports/mem_ops_aligned.h
Johanncad0eca2015-05-07 23:41:3387vpxenc.SRCS += vpx_ports/msvc.h
Johannc459d372012-04-02 22:08:1888vpxenc.SRCS += vpx_ports/vpx_timer.h
Tom Finegan78cb2e62013-11-08 05:28:4589vpxenc.SRCS += vpxstats.c vpxstats.h
Deb Mukherjee47031c02014-05-17 01:52:0190ifeq ($(CONFIG_LIBYUV),yes)
91 vpxenc.SRCS += $(LIBYUV_SRCS)
92endif
Vignesh Venkatasubramanian0ffa3832014-03-14 15:10:3593ifeq ($(CONFIG_WEBM_IO),yes)
Vignesh Venkatasubramaniandd551072015-09-10 18:02:4094 vpxenc.SRCS += $(LIBWEBM_COMMON_SRCS)
Vignesh Venkatasubramanian2dcbf8c2014-03-19 18:56:0295 vpxenc.SRCS += $(LIBWEBM_MUXER_SRCS)
96 vpxenc.SRCS += webmenc.cc webmenc.h
Vignesh Venkatasubramanian0ffa3832014-03-14 15:10:3597endif
John Koleszarea68ee02010-10-21 19:02:1098vpxenc.GUID = 548DEC74-7A15-4B2B-AFC3-AA102E7C25C1
99vpxenc.DESCRIPTION = Full featured encoder
Deb Mukherjeecacea002014-01-23 22:53:53100
Tom Finegana77d6d02014-05-14 18:21:15101EXAMPLES-$(CONFIG_ENCODERS) += vpx_temporal_svc_encoder.c
102vpx_temporal_svc_encoder.SRCS += ivfenc.c ivfenc.h
103vpx_temporal_svc_encoder.SRCS += tools_common.c tools_common.h
104vpx_temporal_svc_encoder.SRCS += video_common.h
105vpx_temporal_svc_encoder.SRCS += video_writer.h video_writer.c
Johanncad0eca2015-05-07 23:41:33106vpx_temporal_svc_encoder.SRCS += vpx_ports/msvc.h
Tom Finegana77d6d02014-05-14 18:21:15107vpx_temporal_svc_encoder.GUID = B18C08F2-A439-4502-A78E-849BE3D60947
108vpx_temporal_svc_encoder.DESCRIPTION = Temporal SVC Encoder
Dmitry Kovalev5ba8c792014-09-11 22:46:37109EXAMPLES-$(CONFIG_DECODERS) += simple_decoder.c
James Zern77bbcab2014-02-06 00:55:01110simple_decoder.GUID = D3BBF1E9-2427-450D-BBFF-B2843C1D44CC
Dmitry Kovalev7ec27692014-01-27 21:40:29111simple_decoder.SRCS += ivfdec.h ivfdec.c
112simple_decoder.SRCS += tools_common.h tools_common.c
Dmitry Kovalev37e6fd32014-02-06 02:34:46113simple_decoder.SRCS += video_common.h
114simple_decoder.SRCS += video_reader.h video_reader.c
Dmitry Kovalev4334c072014-02-27 00:32:09115simple_decoder.SRCS += vpx_ports/mem_ops.h
116simple_decoder.SRCS += vpx_ports/mem_ops_aligned.h
Johanncad0eca2015-05-07 23:41:33117simple_decoder.SRCS += vpx_ports/msvc.h
James Zern77bbcab2014-02-06 00:55:01118simple_decoder.DESCRIPTION = Simplified decoder loop
Dmitry Kovalev5ba8c792014-09-11 22:46:37119EXAMPLES-$(CONFIG_DECODERS) += decode_to_md5.c
Dmitry Kovalevc2b33682014-01-24 19:20:09120decode_to_md5.SRCS += md5_utils.h md5_utils.c
121decode_to_md5.SRCS += ivfdec.h ivfdec.c
122decode_to_md5.SRCS += tools_common.h tools_common.c
Dmitry Kovalev37e6fd32014-02-06 02:34:46123decode_to_md5.SRCS += video_common.h
124decode_to_md5.SRCS += video_reader.h video_reader.c
Dmitry Kovalev4334c072014-02-27 00:32:09125decode_to_md5.SRCS += vpx_ports/mem_ops.h
126decode_to_md5.SRCS += vpx_ports/mem_ops_aligned.h
Johanncad0eca2015-05-07 23:41:33127decode_to_md5.SRCS += vpx_ports/msvc.h
James Zern77bbcab2014-02-06 00:55:01128decode_to_md5.GUID = 59120B9B-2735-4BFE-B022-146CA340FE42
129decode_to_md5.DESCRIPTION = Frame by frame MD5 checksum
Dmitry Kovalev5ba8c792014-09-11 22:46:37130EXAMPLES-$(CONFIG_ENCODERS) += simple_encoder.c
Dmitry Kovalev37e6fd32014-02-06 02:34:46131simple_encoder.SRCS += ivfenc.h ivfenc.c
132simple_encoder.SRCS += tools_common.h tools_common.c
133simple_encoder.SRCS += video_common.h
134simple_encoder.SRCS += video_writer.h video_writer.c
Johanncad0eca2015-05-07 23:41:33135simple_encoder.SRCS += vpx_ports/msvc.h
John Koleszar0ea50ce2010-05-18 15:58:33136simple_encoder.GUID = 4607D299-8A71-4D2C-9B1D-071899B6FBFD
137simple_encoder.DESCRIPTION = Simplified encoder loop
Dmitry Kovalev5ba8c792014-09-11 22:46:37138EXAMPLES-$(CONFIG_ENCODERS) += twopass_encoder.c
Dmitry Kovalev592936b2014-02-07 19:37:39139twopass_encoder.SRCS += ivfenc.h ivfenc.c
140twopass_encoder.SRCS += tools_common.h tools_common.c
141twopass_encoder.SRCS += video_common.h
142twopass_encoder.SRCS += video_writer.h video_writer.c
Johanncad0eca2015-05-07 23:41:33143twopass_encoder.SRCS += vpx_ports/msvc.h
John Koleszar0ea50ce2010-05-18 15:58:33144twopass_encoder.GUID = 73494FA6-4AF9-4763-8FBB-265C92402FD8
145twopass_encoder.DESCRIPTION = Two-pass encoder loop
Dmitry Kovalev5ba8c792014-09-11 22:46:37146EXAMPLES-$(CONFIG_DECODERS) += decode_with_drops.c
James Zern77bbcab2014-02-06 00:55:01147decode_with_drops.SRCS += ivfdec.h ivfdec.c
148decode_with_drops.SRCS += tools_common.h tools_common.c
Dmitry Kovalev37e6fd32014-02-06 02:34:46149decode_with_drops.SRCS += video_common.h
150decode_with_drops.SRCS += video_reader.h video_reader.c
Dmitry Kovalev4334c072014-02-27 00:32:09151decode_with_drops.SRCS += vpx_ports/mem_ops.h
152decode_with_drops.SRCS += vpx_ports/mem_ops_aligned.h
Johanncad0eca2015-05-07 23:41:33153decode_with_drops.SRCS += vpx_ports/msvc.h
John Koleszar0ea50ce2010-05-18 15:58:33154decode_with_drops.GUID = CE5C53C4-8DDA-438A-86ED-0DDD3CDB8D26
155decode_with_drops.DESCRIPTION = Drops frames while decoding
Alex Converse61ecd7f2014-03-10 23:13:49156EXAMPLES-$(CONFIG_ENCODERS) += set_maps.c
157set_maps.SRCS += ivfenc.h ivfenc.c
158set_maps.SRCS += tools_common.h tools_common.c
159set_maps.SRCS += video_common.h
160set_maps.SRCS += video_writer.h video_writer.c
Johanncad0eca2015-05-07 23:41:33161set_maps.SRCS += vpx_ports/msvc.h
Alex Converse61ecd7f2014-03-10 23:13:49162set_maps.GUID = ECB2D24D-98B8-4015-A465-A4AF3DCC145F
163set_maps.DESCRIPTION = Set active and ROI maps
John Koleszar0ea50ce2010-05-18 15:58:33164
Dmitry Kovalev98254a42014-01-18 00:56:04165
John Koleszar0ea50ce2010-05-18 15:58:33166# Handle extra library flags depending on codec configuration
John Koleszar0ea50ce2010-05-18 15:58:33167
Tero Rintaluoma11a222f2011-01-24 09:21:40168# We should not link to math library (libm) on RVCT
169# when building for bare-metal targets
170ifeq ($(CONFIG_OS_SUPPORT), yes)
Jim Bankoski50cbe242016-01-21 22:16:46171CODEC_EXTRA_LIBS-$(CONFIG_VP10) += m
Tero Rintaluoma11a222f2011-01-24 09:21:40172else
173 ifeq ($(CONFIG_GCC), yes)
Jim Bankoski50cbe242016-01-21 22:16:46174 CODEC_EXTRA_LIBS-$(CONFIG_VP10) += m
Tero Rintaluoma11a222f2011-01-24 09:21:40175 endif
176endif
John Koleszar0ea50ce2010-05-18 15:58:33177#
178# End of specified files. The rest of the build rules should happen
179# automagically from here.
180#
181
182
183# Examples need different flags based on whether we're building
184# from an installed tree or a version controlled tree. Determine
185# the proper paths.
186ifeq ($(HAVE_ALT_TREE_LAYOUT),yes)
James Zern3a7d4672014-08-10 23:15:18187 LIB_PATH-yes := $(SRC_PATH_BARE)/../lib
188 INC_PATH-yes := $(SRC_PATH_BARE)/../include
John Koleszar0ea50ce2010-05-18 15:58:33189else
190 LIB_PATH-yes += $(if $(BUILD_PFX),$(BUILD_PFX),.)
Jim Bankoski50cbe242016-01-21 22:16:46191 INC_PATH-$(CONFIG_VP10_DECODER) += $(SRC_PATH_BARE)/vp10
192 INC_PATH-$(CONFIG_VP10_ENCODER) += $(SRC_PATH_BARE)/vp10
John Koleszar0ea50ce2010-05-18 15:58:33193endif
James Zern3a7d4672014-08-10 23:15:18194INC_PATH-$(CONFIG_LIBYUV) += $(SRC_PATH_BARE)/third_party/libyuv/include
195LIB_PATH := $(call enabled,LIB_PATH)
196INC_PATH := $(call enabled,INC_PATH)
Ronald S. Bultjebbf890f2011-05-02 17:56:41197INTERNAL_CFLAGS = $(addprefix -I,$(INC_PATH))
198INTERNAL_LDFLAGS += $(addprefix -L,$(LIB_PATH))
John Koleszar0ea50ce2010-05-18 15:58:33199
200
201# Expand list of selected examples to build (as specified above)
202UTILS = $(call enabled,UTILS)
James Zern77bbcab2014-02-06 00:55:01203EXAMPLES = $(addprefix examples/,$(call enabled,EXAMPLES))
204ALL_EXAMPLES = $(UTILS) $(EXAMPLES)
John Koleszaree8bcb12010-05-24 14:16:44205UTIL_SRCS = $(foreach ex,$(UTILS),$($(ex:.c=).SRCS))
James Zern77bbcab2014-02-06 00:55:01206ALL_SRCS = $(foreach ex,$(ALL_EXAMPLES),$($(notdir $(ex:.c=)).SRCS))
John Koleszar0ea50ce2010-05-18 15:58:33207CODEC_EXTRA_LIBS=$(sort $(call enabled,CODEC_EXTRA_LIBS))
208
209
210# Expand all example sources into a variable containing all sources
James Zern77bbcab2014-02-06 00:55:01211# for that example (not just them main one specified in UTILS/EXAMPLES)
John Koleszar0ea50ce2010-05-18 15:58:33212# and add this file to the list (for MSVS workspace generation)
James Zern77bbcab2014-02-06 00:55:01213$(foreach ex,$(ALL_EXAMPLES),$(eval $(notdir $(ex:.c=)).SRCS += $(ex) examples.mk))
John Koleszar0ea50ce2010-05-18 15:58:33214
215
John Koleszar0ea50ce2010-05-18 15:58:33216# Create build/install dependencies for all examples. The common case
217# is handled here. The MSVS case is handled below.
218NOT_MSVS = $(if $(CONFIG_MSVS),,yes)
KO Myung-Hun2dad8d62012-02-03 04:31:11219DIST-BINS-$(NOT_MSVS) += $(addprefix bin/,$(ALL_EXAMPLES:.c=$(EXE_SFX)))
220INSTALL-BINS-$(NOT_MSVS) += $(addprefix bin/,$(UTILS:.c=$(EXE_SFX)))
John Koleszaree8bcb12010-05-24 14:16:44221DIST-SRCS-yes += $(ALL_SRCS)
222INSTALL-SRCS-yes += $(UTIL_SRCS)
Tom Finegan3d7063d2015-05-12 22:33:40223OBJS-$(NOT_MSVS) += $(call objs,$(ALL_SRCS))
KO Myung-Hun2dad8d62012-02-03 04:31:11224BINS-$(NOT_MSVS) += $(addprefix $(BUILD_PFX),$(ALL_EXAMPLES:.c=$(EXE_SFX)))
John Koleszar0ea50ce2010-05-18 15:58:33225
226
227# Instantiate linker template for all examples.
228CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),vpx_g,vpx)
KO Myung-Hun6d52fe22014-08-08 04:13:02229ifneq ($(filter darwin%,$(TGT_OS)),)
230SHARED_LIB_SUF=.dylib
231else
232ifneq ($(filter os2%,$(TGT_OS)),)
233SHARED_LIB_SUF=_dll.a
234else
235SHARED_LIB_SUF=.so
236endif
237endif
jimbankoski45e551b2012-07-26 02:39:33238CODEC_LIB_SUF=$(if $(CONFIG_SHARED),$(SHARED_LIB_SUF),.a)
John Koleszar0ea50ce2010-05-18 15:58:33239$(foreach bin,$(BINS-yes),\
Tom Finegan3d7063d2015-05-12 22:33:40240 $(eval $(bin):$(LIB_PATH)/lib$(CODEC_LIB)$(CODEC_LIB_SUF))\
241 $(eval $(call linker_template,$(bin),\
KO Myung-Hun2dad8d62012-02-03 04:31:11242 $(call objs,$($(notdir $(bin:$(EXE_SFX)=)).SRCS)) \
John Koleszar0ea50ce2010-05-18 15:58:33243 -l$(CODEC_LIB) $(addprefix -l,$(CODEC_EXTRA_LIBS))\
Tom Finegan3d7063d2015-05-12 22:33:40244 )))
John Koleszar0ea50ce2010-05-18 15:58:33245
John Koleszar0ea50ce2010-05-18 15:58:33246# The following pairs define a mapping of locations in the distribution
247# tree to locations in the source/build trees.
248INSTALL_MAPS += src/%.c %.c
249INSTALL_MAPS += src/% $(SRC_PATH_BARE)/%
250INSTALL_MAPS += bin/% %
251INSTALL_MAPS += % %
252
253
254# Set up additional MSVS environment
255ifeq ($(CONFIG_MSVS),yes)
Jim Bankoski1b16e742012-07-23 19:32:59256CODEC_LIB=$(if $(CONFIG_SHARED),vpx,$(if $(CONFIG_STATIC_MSVCRT),vpxmt,vpxmd))
John Koleszar0ea50ce2010-05-18 15:58:33257# This variable uses deferred expansion intentionally, since the results of
258# $(wildcard) may change during the course of the Make.
259VS_PLATFORMS = $(foreach d,$(wildcard */Release/$(CODEC_LIB).lib),$(word 1,$(subst /, ,$(d))))
260INSTALL_MAPS += $(foreach p,$(VS_PLATFORMS),bin/$(p)/% $(p)/Release/%)
261endif
262
263# Build Visual Studio Projects. We use a template here to instantiate
264# explicit rules rather than using an implicit rule because we want to
265# leverage make's VPATH searching rather than specifying the paths on
266# each file in ALL_EXAMPLES. This has the unfortunate side effect that
267# touching the source files trigger a rebuild of the project files
268# even though there is no real dependency there (the dependency is on
269# the makefiles). We may want to revisit this.
270define vcproj_template
Martin Storsjo9a5cac02013-05-18 16:57:19271$(1): $($(1:.$(VCPROJ_SFX)=).SRCS) vpx.$(VCPROJ_SFX)
James Zerna2746d72015-08-03 23:24:24272 $(if $(quiet),@echo " [vcproj] $$@")
273 $(qexec)$$(GEN_VCPROJ)\
John Koleszar0ea50ce2010-05-18 15:58:33274 --exe\
275 --target=$$(TOOLCHAIN)\
Martin Storsjo0b4637e2013-05-16 21:56:46276 --name=$$(@:.$(VCPROJ_SFX)=)\
John Koleszar0ea50ce2010-05-18 15:58:33277 --ver=$$(CONFIG_VS_VERSION)\
Martin Storsjo0b4637e2013-05-16 21:56:46278 --proj-guid=$$($$(@:.$(VCPROJ_SFX)=).GUID)\
James Zernf66590c2014-06-02 23:42:14279 --src-path-bare="$(SRC_PATH_BARE)" \
John Koleszar0ea50ce2010-05-18 15:58:33280 $$(if $$(CONFIG_STATIC_MSVCRT),--static-crt) \
Ronald S. Bultjebbf890f2011-05-02 17:56:41281 --out=$$@ $$(INTERNAL_CFLAGS) $$(CFLAGS) \
Martin Storsjoa37e84d2013-05-19 09:21:29282 $$(INTERNAL_LDFLAGS) $$(LDFLAGS) -l$$(CODEC_LIB) $$^
John Koleszar0ea50ce2010-05-18 15:58:33283endef
James Zern77bbcab2014-02-06 00:55:01284ALL_EXAMPLES_BASENAME := $(notdir $(ALL_EXAMPLES))
285PROJECTS-$(CONFIG_MSVS) += $(ALL_EXAMPLES_BASENAME:.c=.$(VCPROJ_SFX))
John Koleszar0ea50ce2010-05-18 15:58:33286INSTALL-BINS-$(CONFIG_MSVS) += $(foreach p,$(VS_PLATFORMS),\
James Zern77bbcab2014-02-06 00:55:01287 $(addprefix bin/$(p)/,$(ALL_EXAMPLES_BASENAME:.c=.exe)))
John Koleszar0ea50ce2010-05-18 15:58:33288$(foreach proj,$(call enabled,PROJECTS),\
289 $(eval $(call vcproj_template,$(proj))))
James Zern354c5662014-02-15 03:38:20290
291#
292# Documentation Rules
293#
294%.dox: %.c
295 @echo " [DOXY] $@"
James Zernaaccf652015-02-06 03:31:38296 @mkdir -p $(dir $@)
James Zern354c5662014-02-15 03:38:20297 @echo "/*!\page example_$(@F:.dox=) $(@F:.dox=)" > $@
298 @echo " \includelineno $(<F)" >> $@
299 @echo "*/" >> $@
300
301samples.dox: examples.mk
302 @echo " [DOXY] $@"
303 @echo "/*!\page samples Sample Code" > $@
304 @echo " This SDK includes a number of sample applications."\
305 "Each sample documents a feature of the SDK in both prose"\
306 "and the associated C code."\
307 "The following samples are included: ">>$@
308 @$(foreach ex,$(sort $(notdir $(EXAMPLES:.c=))),\
309 echo " - \subpage example_$(ex) $($(ex).DESCRIPTION)" >> $@;)
310 @echo >> $@
311 @echo " In addition, the SDK contains a number of utilities."\
312 "Since these utilities are built upon the concepts described"\
313 "in the sample code listed above, they are not documented in"\
314 "pieces like the samples are. Their source is included here"\
315 "for reference. The following utilities are included:" >> $@
316 @$(foreach ex,$(sort $(UTILS:.c=)),\
317 echo " - \subpage example_$(ex) $($(ex).DESCRIPTION)" >> $@;)
318 @echo "*/" >> $@
319
320CLEAN-OBJS += examples.doxy samples.dox $(ALL_EXAMPLES:.c=.dox)
321DOCS-yes += examples.doxy samples.dox
322examples.doxy: samples.dox $(ALL_EXAMPLES:.c=.dox)
323 @echo "INPUT += $^" > $@