ref: f9abd70eeb48c98d74fb38b3fea471c1185506f9
parent: be94bf9ffa58103ce0d87c6b1d4e9cfa2461a125
parent: 0f1f158d8b590d1b2d59895757fe2c921d1f8446
author: Ethan Hugg <[email protected]>
date: Wed Jun 25 05:30:01 EDT 2014
Merge pull request #1008 from mstorsjo/plugin-build Clean up minor aspects of the plugin build process
--- a/Makefile
+++ b/Makefile
@@ -105,7 +105,7 @@
PROCESSING_UNITTEST_INCLUDES = $(CODEC_UNITTEST_INCLUDES) $(PROCESSING_INCLUDES) -Itest -Itest/processing
API_TEST_INCLUDES = $(CODEC_UNITTEST_INCLUDES) -Itest -Itest/api
COMMON_UNITTEST_INCLUDES = $(CODEC_UNITTEST_INCLUDES) $(DECODER_INCLUDES) -Itest -Itest/common
-MODULE_INCLUDES = -Igmp-api
+MODULE_INCLUDES += -Igmp-api
.PHONY: test gtest-bootstrap clean
@@ -172,7 +172,7 @@
ifeq ($(HAVE_GMP_API),Yes)
plugin: $(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIX)
-PLUGINS += $(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIX)
+LIBRARIES += $(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIX)
else
plugin:
@echo "./gmp-api : No such file or directory."
@@ -181,7 +181,7 @@
$(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIX): $(MODULE_OBJS) $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS)
$(QUIET)rm -f $@
- $(QUIET_CXX)$(CXX) $(SHARED) $(LDFLAGS) $(CXX_LINK_O) $+ $(SHLDFLAGS) $(LOCAL_LDLIBS)
+ $(QUIET_CXX)$(CXX) $(SHARED) $(LDFLAGS) $(CXX_LINK_O) $+ $(SHLDFLAGS) $(MODULE_LDFLAGS)
install-headers:
mkdir -p $(PREFIX)/include/wels
--- a/build/mktargets.sh
+++ b/build/mktargets.sh
@@ -11,5 +11,5 @@
python build/mktargets.py --directory test/decoder --prefix decoder_unittest
python build/mktargets.py --directory test/processing --prefix processing_unittest
python build/mktargets.py --directory test/api --prefix api_test
-python build/mktargets.py --directory module --library module
+python build/mktargets.py --directory module --prefix module
python build/mktargets.py --directory gtest --library gtest --out build/gtest-targets.mk --cpp-suffix .cc --include gtest-all.cc
--- a/build/platform-android.mk
+++ b/build/platform-android.mk
@@ -40,14 +40,16 @@
LDFLAGS += --sysroot=$(SYSROOT)
SHLDFLAGS = -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,-soname,lib$(PROJECT_NAME).so
-LOCAL_LDLIBS := $(NDKROOT)/sources/cxx-stl/stlport/libs/$(APP_ABI)/libstlport_static.a
STL_INCLUDES = \
-I$(NDKROOT)/sources/cxx-stl/stlport/stlport
+STL_LIB = \
+ $(NDKROOT)/sources/cxx-stl/stlport/libs/$(APP_ABI)/libstlport_static.a
GTEST_INCLUDES = $(STL_INCLUDES)
CODEC_UNITTEST_INCLUDES = $(STL_INCLUDES)
-CODEC_UNITTEST_LDFLAGS_SUFFIX = \
- $(NDKROOT)/sources/cxx-stl/stlport/libs/$(APP_ABI)/libstlport_static.a
+CODEC_UNITTEST_LDFLAGS_SUFFIX = $(STL_LIB)
+MODULE_INCLUDES = $(STL_INCLUDES)
+MODULE_LDFLAGS = $(STL_LIB)
binaries : decdemo encdemo
--- a/module/targets.mk
+++ b/module/targets.mk
@@ -6,11 +6,5 @@
OBJS += $(MODULE_OBJS)
$(MODULE_SRCDIR)/%.$(OBJ): $(MODULE_SRCDIR)/%.cpp
- $(QUIET_CXX)$(CXX) $(CFLAGS) $(CXXFLAGS) $(INCLUDES) $(MODULE_CFLAGS) $(MODULE_INCLUDES) $(STL_INCLUDES) -c $(CXX_O) $<
+ $(QUIET_CXX)$(CXX) $(CFLAGS) $(CXXFLAGS) $(INCLUDES) $(MODULE_CFLAGS) $(MODULE_INCLUDES) -c $(CXX_O) $<
-$(LIBPREFIX)module.$(LIBSUFFIX): $(MODULE_OBJS)
- $(QUIET)rm -f $@
- $(QUIET_AR)$(AR) $(AR_OPTS) $+
-
-plugin: $(LIBPREFIX)module.$(LIBSUFFIX)
-LIBRARIES += $(LIBPREFIX)module.$(LIBSUFFIX)