ref: 09585cf65a6b0b234362e82fd55beb62de0a431a
parent: b842ff30e5b6575b6e73af6abcad6c0a829812b1
author: Martin Storsjö <[email protected]>
date: Fri Jan 10 09:19:05 EST 2014
Allow overriding the command syntax for linking libraries
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,7 @@
CXX_O=-o $@
CXX_LINK_O=-o $@
AR_OPTS=cr $@
+LINK_LIB=-l$(1)
@@ -72,11 +73,11 @@
-Icodec/encoder/plus/inc
H264DEC_INCLUDES = $(DECODER_INCLUDES) -Icodec/console/dec/inc
-H264DEC_LDFLAGS = -L. -ldecoder -lcommon
+H264DEC_LDFLAGS = -L. $(call LINK_LIB, decoder) $(call LINK_LIB, common)
H264DEC_DEPS = $(LIBPREFIX)decoder.$(LIBSUFFIX) $(LIBPREFIX)common.$(LIBSUFFIX)
H264ENC_INCLUDES = $(ENCODER_INCLUDES) -Icodec/console/enc/inc
-H264ENC_LDFLAGS = -L. -lencoder -lprocessing -lcommon
+H264ENC_LDFLAGS = -L. $(call LINK_LIB, encoder) $(call LINK_LIB, processing) $(call LINK_LIB, common)
H264ENC_DEPS = $(LIBPREFIX)encoder.$(LIBSUFFIX) $(LIBPREFIX)processing.$(LIBSUFFIX) $(LIBPREFIX)common.$(LIBSUFFIX)
CODEC_UNITTEST_LDFLAGS = -L. -lgtest -ldecoder -lcrypto -lencoder -lprocessing -lcommon