From 1342a94d5cbd8820f83ef59adcb18d14f566a3de Mon Sep 17 00:00:00 2001 From: Liong Sauw Ming Date: Tue, 4 Feb 2014 07:39:55 +0000 Subject: Re #1519 (commited to SVN trunk): Add lib target to build system to enable building the library only (without the executables) git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4727 74dad513-b988-da41-8d7b-12977e46ad98 --- Makefile | 2 +- pjlib-util/build/Makefile | 10 +++++----- pjlib/build/Makefile | 4 +++- pjlib/build/os-auto.mak.in | 4 ++-- pjmedia/build/Makefile | 8 +++++--- pjnath/build/Makefile | 10 +++++----- pjsip/build/Makefile | 9 +++++---- third_party/build/Makefile | 9 +++++++++ 8 files changed, 35 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 72310ae0..4797a193 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ all clean dep depend distclean print realclean: lib: for dir in $(LIB_DIRS); do \ - if $(MAKE) $(MAKE_FLAGS) -C $$dir all; then \ + if $(MAKE) $(MAKE_FLAGS) -C $$dir lib; then \ true; \ else \ exit 1; \ diff --git a/pjlib-util/build/Makefile b/pjlib-util/build/Makefile index 7dc1a82b..cb601cb6 100644 --- a/pjlib-util/build/Makefile +++ b/pjlib-util/build/Makefile @@ -60,12 +60,12 @@ export UTIL_TEST_EXE:=pjlib-util-test-$(TARGET_NAME)$(HOST_EXE) export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT ############################################################################### # Main entry -# -# $(TARGET) is defined in os-$(OS_NAME).mak file in current directory. -# -TARGETS := $(PJLIB_UTIL_LIB) $(PJLIB_UTIL_SONAME) $(UTIL_TEST_EXE) +TARGETS := $(PJLIB_UTIL_LIB) $(PJLIB_UTIL_SONAME) +TARGETS_EXE := $(UTIL_TEST_EXE) + +all: $(TARGETS) $(TARGETS_EXE) -all: $(TARGETS) +lib: $(TARGETS) doc: cd .. && rm -rf docs/$(PJ_VERSION) && doxygen docs/doxygen.cfg diff --git a/pjlib/build/Makefile b/pjlib/build/Makefile index 56e5ead2..1e64950d 100644 --- a/pjlib/build/Makefile +++ b/pjlib/build/Makefile @@ -66,7 +66,9 @@ export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT # $(TARGET) is defined in os-$(OS_NAME).mak file in current directory. # -all: $(TARGETS) +all: $(TARGETS) $(TARGETS_EXE) + +lib: $(TARGETS) doc: cd .. && rm -rf docs/$(PJ_VERSION) && doxygen docs/doxygen.cfg diff --git a/pjlib/build/os-auto.mak.in b/pjlib/build/os-auto.mak.in index 1c7e330e..478cc80f 100644 --- a/pjlib/build/os-auto.mak.in +++ b/pjlib/build/os-auto.mak.in @@ -30,7 +30,7 @@ export TEST_OBJS += @ac_main_obj@ # TARGETS are make targets in the Makefile, to be executed for this given # operating system. # -export TARGETS = $(PJLIB_LIB) $(PJLIB_SONAME) $(TEST_EXE) - +export TARGETS = $(PJLIB_LIB) $(PJLIB_SONAME) +export TARGETS_EXE = $(TEST_EXE) diff --git a/pjmedia/build/Makefile b/pjmedia/build/Makefile index a567e63b..8012cb75 100644 --- a/pjmedia/build/Makefile +++ b/pjmedia/build/Makefile @@ -178,10 +178,12 @@ TARGETS := $(PJMEDIA_LIB) $(PJMEDIA_SONAME) \ $(PJMEDIA_CODEC_LIB) $(PJMEDIA_CODEC_SONAME)\ $(PJMEDIA_VIDEODEV_LIB) $(PJMEDIA_VIDEODEV_SONAME) \ $(PJMEDIA_AUDIODEV_LIB) $(PJMEDIA_AUDIODEV_SONAME) \ - $(PJSDP_LIB) $(PJSDP_SONAME) \ - $(PJMEDIA_TEST_EXE) + $(PJSDP_LIB) $(PJSDP_SONAME) +TARGETS_EXE := $(PJMEDIA_TEST_EXE) -all: $(TARGETS) +all: $(TARGETS) $(TARGETS_EXE) + +lib: $(TARGETS) doc: cd .. && rm -rf docs/$(PJ_VERSION) && doxygen docs/doxygen.cfg diff --git a/pjnath/build/Makefile b/pjnath/build/Makefile index d00ccb66..1bc08b50 100644 --- a/pjnath/build/Makefile +++ b/pjnath/build/Makefile @@ -83,12 +83,12 @@ export PJTURN_SRV_EXE:=pjturn-srv-$(TARGET_NAME)$(HOST_EXE) export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT ############################################################################### # Main entry -# -# $(TARGET) is defined in os-$(OS_NAME).mak file in current directory. -# -TARGETS := $(PJNATH_LIB) $(PJNATH_SONAME) $(PJNATH_TEST_EXE) $(PJTURN_CLIENT_EXE) $(PJTURN_SRV_EXE) +TARGETS := $(PJNATH_LIB) $(PJNATH_SONAME) +TARGETS_EXE := $(PJNATH_TEST_EXE) $(PJTURN_CLIENT_EXE) $(PJTURN_SRV_EXE) + +all: $(TARGETS) $(TARGETS_EXE) -all: $(TARGETS) +lib: $(TARGETS) doc: cd .. && rm -rf docs/$(PJ_VERSION) && doxygen docs/doxygen.cfg diff --git a/pjsip/build/Makefile b/pjsip/build/Makefile index eeafad3f..37dca79d 100644 --- a/pjsip/build/Makefile +++ b/pjsip/build/Makefile @@ -194,11 +194,12 @@ TARGETS := $(PJSIP_LIB) $(PJSIP_SONAME) \ $(PJSIP_SIMPLE_LIB) $(PJSIP_SIMPLE_SONAME) \ $(PJSIP_UA_LIB) $(PJSIP_UA_SONAME) \ $(PJSUA_LIB_LIB) $(PJSUA_LIB_SONAME) \ - $(PJSUA2_LIB_LIB) $(PJSUA2_LIB_SONAME) \ - $(TEST_EXE) \ - $(PJSUA2_TEST_EXE) + $(PJSUA2_LIB_LIB) $(PJSUA2_LIB_SONAME) +TARGETS_EXE := $(TEST_EXE) $(PJSUA2_TEST_EXE) -all: $(TARGETS) +all: $(TARGETS) $(TARGETS_EXE) + +lib: $(TARGETS) doc: cd .. && rm -rf docs/$(PJ_VERSION) && doxygen docs/doxygen.cfg diff --git a/third_party/build/Makefile b/third_party/build/Makefile index e0ac61bb..5d9bc513 100644 --- a/third_party/build/Makefile +++ b/third_party/build/Makefile @@ -12,5 +12,14 @@ all clean dep depend distclean realclean: fi; \ done +lib: + for dir in $(DIRS); do \ + if $(MAKE) $(MAKE_FLAGS) -C $$dir all; then \ + true; \ + else \ + exit 1; \ + fi; \ + done + doc: -- cgit v1.2.3