Changeset 4656 for pjproject/trunk/pjnath/build/Makefile
- Timestamp:
- Nov 23, 2013 7:13:40 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/build/Makefile
r4637 r4656 7 7 include $(PJDIR)/build/common.mak 8 8 9 export LIBDIR := ../lib 10 export BINDIR := ../bin 11 9 12 RULES_MAK := $(PJDIR)/build/rules.mak 10 13 11 14 PJLIB_LIB:=../../pjlib/lib/libpj-$(TARGET_NAME)$(LIBEXT) 12 15 PJLIB_UTIL_LIB:=../../pjlib-util/lib/libpjlib-util-$(TARGET_NAME)$(LIBEXT) 13 export PJNATH_LIB:=../lib/libpjnath-$(TARGET_NAME)$(LIBEXT) 16 17 export PJNATH_LIB:=libpjnath-$(TARGET_NAME)$(LIBEXT) 18 19 ifeq ($(PJ_SHARED_LIBRARIES),) 20 else 21 export PJNATH_SONAME := libpjnath.$(SHLIB_SUFFIX) 22 export PJNATH_SHLIB := $(PJNATH_SONAME).$(PJ_VERSION_MAJOR) 23 endif 14 24 15 25 ############################################################################### … … 21 31 export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \ 22 32 $(HOST_CXXFLAGS) $(CXXFLAGS) 23 export _LDFLAGS := $(subst /,$(HOST_PSEP),$(PJNATH_LIB)) \ 24 $(subst /,$(HOST_PSEP),$(PJLIB_UTIL_LIB)) \ 25 $(subst /,$(HOST_PSEP),$(PJLIB_LIB)) \ 26 $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \ 27 $(LDFLAGS) 33 export _LDFLAGS := $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \ 34 $(APP_LDFLAGS) $(LDFLAGS) 28 35 29 36 ############################################################################### … … 37 44 export PJNATH_CFLAGS += $(_CFLAGS) 38 45 export PJNATH_CXXFLAGS += $(_CXXFLAGS) 46 export PJNATH_LDFLAGS += $(PJLIB_UTIL_LDLIB) $(PJLIB_LDLIB) $(_LDFLAGS) 39 47 40 48 ############################################################################### … … 46 54 export PJNATH_TEST_CFLAGS += $(_CFLAGS) 47 55 export PJNATH_TEST_CXXFLAGS += $(_CXXFLAGS) 48 export PJNATH_TEST_LDFLAGS += $( _LDFLAGS)49 export PJNATH_TEST_EXE:= ../bin/pjnath-test-$(TARGET_NAME)$(HOST_EXE)56 export PJNATH_TEST_LDFLAGS += $(PJNATH_LDLIB) $(PJLIB_UTIL_LDLIB) $(PJLIB_LDLIB) $(_LDFLAGS) 57 export PJNATH_TEST_EXE:=pjnath-test-$(TARGET_NAME)$(HOST_EXE) 50 58 51 59 … … 57 65 export PJTURN_CLIENT_CFLAGS += $(_CFLAGS) 58 66 export PJTURN_CLIENT_CXXFLAGS += $(_CXXFLAGS) 59 export PJTURN_CLIENT_LDFLAGS += $( _LDFLAGS)60 export PJTURN_CLIENT_EXE:= ../bin/pjturn-client-$(TARGET_NAME)$(HOST_EXE)67 export PJTURN_CLIENT_LDFLAGS += $(PJNATH_LDLIB) $(PJLIB_UTIL_LDLIB) $(PJLIB_LDLIB) $(_LDFLAGS) 68 export PJTURN_CLIENT_EXE:=pjturn-client-$(TARGET_NAME)$(HOST_EXE) 61 69 62 70 ############################################################################### … … 68 76 export PJTURN_SRV_CFLAGS += $(_CFLAGS) 69 77 export PJTURN_SRV_CXXFLAGS += $(_CXXFLAGS) 70 export PJTURN_SRV_LDFLAGS += $( _LDFLAGS)71 export PJTURN_SRV_EXE:= ../bin/pjturn-srv-$(TARGET_NAME)$(HOST_EXE)78 export PJTURN_SRV_LDFLAGS += $(PJNATH_LDLIB) $(PJLIB_UTIL_LDLIB) $(PJLIB_LDLIB) $(_LDFLAGS) 79 export PJTURN_SRV_EXE:=pjturn-srv-$(TARGET_NAME)$(HOST_EXE) 72 80 73 81 … … 79 87 # $(TARGET) is defined in os-$(OS_NAME).mak file in current directory. 80 88 # 81 TARGETS := pjnath pjnath-test pjturn-client pjturn-srv89 TARGETS := $(PJNATH_LIB) $(PJNATH_SONAME) $(PJNATH_TEST_EXE) $(PJTURN_CLIENT_EXE) $(PJTURN_SRV_EXE) 82 90 83 91 all: $(TARGETS) … … 97 105 distclean: realclean 98 106 99 .PHONY: dep depend clean realclean distclean107 .PHONY: all dep depend clean realclean distclean 100 108 .PHONY: $(TARGETS) 101 .PHONY: $(PJNATH_LIB) $(PJNATH_TEST_EXE) $(PJTURN_CLIENT_EXE) $(PJTURN_SRV_EXE) 109 .PHONY: $(PJNATH_LIB) $(PJNATH_SONAME) 110 .PHONY: $(PJNATH_TEST_EXE) $(PJTURN_CLIENT_EXE) $(PJTURN_SRV_EXE) 102 111 103 112 pjnath: $(PJNATH_LIB) 104 $(PJNATH_LIB): 105 $(MAKE) -f $(RULES_MAK) APP=PJNATH app=pjnath $(PJNATH_LIB) 113 $(PJNATH_SONAME): $(PJNATH_LIB) 114 $(PJNATH_LIB) $(PJNATH_SONAME): $(PJLIB_LIB) $(PJLIB_SONAME) $(PJLIB_UTIL_LIB) $(PJLIB_UTIL_SONAME) 115 $(MAKE) -f $(RULES_MAK) APP=PJNATH app=pjnath $(subst /,$(HOST_PSEP),$(LIBDIR)/$@) 106 116 107 117 pjnath-test: $(PJNATH_TEST_EXE) 108 $(PJNATH_TEST_EXE): $(PJNATH_LIB) 109 $(MAKE) -f $(RULES_MAK) APP=PJNATH_TEST app=pjnath-test $( PJNATH_TEST_EXE)118 $(PJNATH_TEST_EXE): $(PJNATH_LIB) $(PJNATH_SONAME) 119 $(MAKE) -f $(RULES_MAK) APP=PJNATH_TEST app=pjnath-test $(subst /,$(HOST_PSEP),$(BINDIR)/$@) 110 120 111 121 pjturn-client: $(PJTURN_CLIENT_EXE) 112 $(PJTURN_CLIENT_EXE): $(PJNATH_LIB) 113 $(MAKE) -f $(RULES_MAK) APP=PJTURN_CLIENT app=pjturn-client $( PJTURN_CLIENT_EXE)122 $(PJTURN_CLIENT_EXE): $(PJNATH_LIB) $(PJNATH_SONAME) 123 $(MAKE) -f $(RULES_MAK) APP=PJTURN_CLIENT app=pjturn-client $(subst /,$(HOST_PSEP),$(BINDIR)/$@) 114 124 115 125 pjturn-srv: $(PJTURN_SRV_EXE) 116 $(PJTURN_SRV_EXE): $(PJNATH_LIB) 117 $(MAKE) -f $(RULES_MAK) APP=PJTURN_SRV app=pjturn-srv $( PJTURN_SRV_EXE)126 $(PJTURN_SRV_EXE): $(PJNATH_LIB) $(PJNATH_SONAME) 127 $(MAKE) -f $(RULES_MAK) APP=PJTURN_SRV app=pjturn-srv $(subst /,$(HOST_PSEP),$(BINDIR)/$@) 118 128 119 .PHONY: ../lib/pjnath.ko120 ../lib/pjnath.ko:129 .PHONY: pjnath.ko 130 pjnath.ko: 121 131 echo Making $@ 122 $(MAKE) -f $(RULES_MAK) APP=PJNATH app=pjnath $ @132 $(MAKE) -f $(RULES_MAK) APP=PJNATH app=pjnath $(subst /,$(HOST_PSEP),$(LIBDIR)/$@) 123 133 124 .PHONY: ../lib/pjnath-test.ko125 ../lib/pjnath-test.ko:126 $(MAKE) -f $(RULES_MAK) APP=PJNATH_TEST app=pjnath-test $ @134 .PHONY: pjnath-test.ko 135 pjnath-test.ko: 136 $(MAKE) -f $(RULES_MAK) APP=PJNATH_TEST app=pjnath-test $(subst /,$(HOST_PSEP),$(LIBDIR)/$@) 127 137 128 138 clean: … … 147 157 $(MAKE) -f $(RULES_MAK) APP=PJTURN_CLIENT app=pjturn-client $@ 148 158 $(MAKE) -f $(RULES_MAK) APP=PJTURN_SRV app=pjturn-srv $@ 149 echo '$( PJNATH_TEST_EXE):$(PJNATH_LIB) $(PJLIB_UTIL_LIB) $(PJLIB_LIB)' >> .pjnath-test-$(TARGET_NAME).depend150 echo '$( PJTURN_CLIENT_EXE):$(PJNATH_LIB) $(PJLIB_UTIL_LIB) $(PJLIB_LIB)' >> .pjturn-client-$(TARGET_NAME).depend151 echo '$( PJTURN_SRV_EXE):$(PJNATH_LIB) $(PJLIB_UTIL_LIB) $(PJLIB_LIB)' >> .pjturn-srv-$(TARGET_NAME).depend159 echo '$(BINDIR)/$(PJNATH_TEST_EXE): $(LIBDIR)/$(PJNATH_LIB) $(PJLIB_UTIL_LIB) $(PJLIB_LIB)' >> .pjnath-test-$(TARGET_NAME).depend 160 echo '$(BINDIR)/$(PJTURN_CLIENT_EXE): $(LIBDIR)/$(PJNATH_LIB) $(PJLIB_UTIL_LIB) $(PJLIB_LIB)' >> .pjturn-client-$(TARGET_NAME).depend 161 echo '$(BINDIR)/$(PJTURN_SRV_EXE): $(LIBDIR)/$(PJNATH_LIB) $(PJLIB_UTIL_LIB) $(PJLIB_LIB)' >> .pjturn-srv-$(TARGET_NAME).depend 152 162 153 163
Note: See TracChangeset
for help on using the changeset viewer.