Changeset 4656 for pjproject/trunk/pjsip/build/Makefile
- Timestamp:
- Nov 23, 2013 7:13:40 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/build/Makefile
r4637 r4656 8 8 include $(PJDIR)/build/common.mak 9 9 10 export LIBDIR := ../lib 11 export BINDIR := ../bin 12 10 13 RULES_MAK := $(PJDIR)/build/rules.mak 11 14 12 15 PJLIB_LIB:=../../pjlib/lib/libpj-$(TARGET_NAME)$(LIBEXT) 13 16 PJLIB_UTIL_LIB:=../../pjlib-util/lib/libpjlib-util-$(TARGET_NAME)$(LIBEXT) 17 PJNATH_LIB:=../../pjnath/lib/libpjnath-$(TARGET_NAME)$(LIBEXT) 14 18 PJMEDIA_LIB:=../../pjmedia/lib/libpjmedia-$(TARGET_NAME)$(LIBEXT) 15 PJMEDIA_CODEC_LIB:=../../pjmedia/lib/libpjmedia-codec-$(TARGET_NAME)$(LIBEXT) 16 17 export PJSIP_LIB:=../lib/libpjsip-$(TARGET_NAME)$(LIBEXT) 18 export PJSIP_UA_LIB:=../lib/libpjsip-ua-$(TARGET_NAME)$(LIBEXT) 19 export PJSIP_SIMPLE_LIB:=../lib/libpjsip-simple-$(TARGET_NAME)$(LIBEXT) 20 export PJSUA_LIB_LIB=../lib/libpjsua-$(TARGET_NAME)$(LIBEXT) 21 19 20 export PJSIP_LIB:=libpjsip-$(TARGET_NAME)$(LIBEXT) 21 export PJSIP_UA_LIB:=libpjsip-ua-$(TARGET_NAME)$(LIBEXT) 22 export PJSIP_SIMPLE_LIB:=libpjsip-simple-$(TARGET_NAME)$(LIBEXT) 23 export PJSUA_LIB_LIB:=libpjsua-$(TARGET_NAME)$(LIBEXT) 24 25 ifeq ($(PJ_SHARED_LIBRARIES),) 26 else 27 export PJSIP_SONAME := libpjsip.$(SHLIB_SUFFIX) 28 export PJSIP_SHLIB := $(PJSIP_SONAME).$(PJ_VERSION_MAJOR) 29 export PJSIP_UA_SONAME := libpjsip-ua.$(SHLIB_SUFFIX) 30 export PJSIP_UA_SHLIB := $(PJSIP_UA_SONAME).$(PJ_VERSION_MAJOR) 31 export PJSIP_SIMPLE_SONAME := libpjsip-simple.$(SHLIB_SUFFIX) 32 export PJSIP_SIMPLE_SHLIB := $(PJSIP_SIMPLE_SONAME).$(PJ_VERSION_MAJOR) 33 export PJSUA_LIB_SONAME := libpjsua.$(SHLIB_SUFFIX) 34 export PJSUA_LIB_SHLIB := $(PJSUA_LIB_SONAME).$(PJ_VERSION_MAJOR) 35 endif 22 36 23 37 ############################################################################### … … 32 46 export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \ 33 47 $(HOST_CXXFLAGS) $(CXXFLAGS) 48 export _LDFLAGS := $(APP_THIRD_PARTY_LIBS) \ 49 $(APP_THIRD_PARTY_EXT) \ 50 $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \ 51 $(APP_LDFLAGS) $(LDFLAGS) 34 52 35 53 ############################################################################### … … 50 68 export PJSIP_CFLAGS += $(_CFLAGS) 51 69 export PJSIP_CXXFLAGS += $(_CXXFLAGS) 70 export PJSIP_LDFLAGS += $(PJLIB_UTIL_LDLIB) \ 71 $(PJLIB_LDLIB) \ 72 $(_LDFLAGS) 52 73 53 74 ############################################################################### … … 60 81 export PJSIP_UA_CFLAGS += $(_CFLAGS) 61 82 export PJSIP_UA_CXXFLAGS += $(_CXXFLAGS) 83 export PJSIP_UA_LDFLAGS += $(PJSIP_SIMPLE_LDLIB) \ 84 $(PJSIP_LDLIB) \ 85 $(PJMEDIA_LDLIB) \ 86 $(PJLIB_UTIL_LDLIB) \ 87 $(PJLIB_LDLIB) \ 88 $(_LDFLAGS) 62 89 63 90 … … 72 99 export PJSIP_SIMPLE_CFLAGS += $(_CFLAGS) 73 100 export PJSIP_SIMPLE_CXXFLAGS += $(_CXXFLAGS) 101 export PJSIP_SIMPLE_LDFLAGS += $(PJSIP_LDLIB) \ 102 $(PJLIB_UTIL_LDLIB) \ 103 $(PJLIB_LDLIB) \ 104 $(_LDFLAGS) 74 105 75 106 … … 84 115 export PJSUA_LIB_CFLAGS += $(_CFLAGS) $(PJ_VIDEO_CFLAGS) 85 116 export PJSUA_LIB_CXXFLAGS += $(_CXXFLAGS) $(PJ_VIDEO_CFLAGS) 117 export PJSUA_LIB_LDFLAGS += $(PJSIP_UA_LDLIB) \ 118 $(PJSIP_SIMPLE_LDLIB) \ 119 $(PJSIP_LDLIB) \ 120 $(PJMEDIA_AUDIODEV_LDLIB) \ 121 $(PJMEDIA_VIDEODEV_LDLIB) \ 122 $(PJMEDIA_CODEC_LDLIB) \ 123 $(PJMEDIA_LDLIB) \ 124 $(PJNATH_LDLIB) \ 125 $(PJLIB_UTIL_LDLIB) \ 126 $(PJLIB_LDLIB) \ 127 $(_LDFLAGS) 86 128 87 129 … … 101 143 export TEST_CFLAGS += $(_CFLAGS) 102 144 export TEST_CXXFLAGS += $(_CXXFLAGS) 103 export TEST_LDFLAGS += $(PJ_LDFLAGS) $(PJ_LDLIBS) $(LDFLAGS) 104 export TEST_EXE := ../bin/pjsip-test-$(TARGET_NAME)$(HOST_EXE) 145 export TEST_LDFLAGS += $(PJSIP_LDLIB) \ 146 $(PJSIP_UA_LDLIB) \ 147 $(PJSIP_SIMPLE_LDLIB) \ 148 $(PJSUA_LDLIB) \ 149 $(PJMEDIA_CODEC_LDLIB) \ 150 $(PJMEDIA_VIDEODEV_LDLIB) \ 151 $(PJMEDIA_LDLIB) \ 152 $(PJMEDIA_AUDIODEV_LDLIB) \ 153 $(PJLIB_LDLIB) \ 154 $(PJLIB_UTIL_LDLIB) \ 155 $(PJNATH_LDLIB) \ 156 $(_LDFLAGS) 157 export TEST_EXE := pjsip-test-$(TARGET_NAME)$(HOST_EXE) 105 158 106 159 … … 110 163 # 111 164 # 112 TARGETS := pjsip pjsip-ua pjsip-simple pjsua-lib pjsip-test 165 TARGETS := $(PJSIP_LIB) $(PJSIP_SONAME) \ 166 $(PJSIP_SIMPLE_LIB) $(PJSIP_SIMPLE_SONAME) \ 167 $(PJSIP_UA_LIB) $(PJSIP_UA_SONAME) \ 168 $(PJSUA_LIB_LIB) $(PJSUA_LIB_SONAME) \ 169 $(TEST_EXE) 113 170 114 171 all: $(TARGETS) … … 128 185 distclean: realclean 129 186 130 .PHONY: dep depend clean realclean distclean187 .PHONY: all dep depend clean realclean distclean 131 188 .PHONY: $(TARGETS) 132 .PHONY: $(PJSIP_LIB) $(PJSIP_UA_LIB) $(PJSIP_SIMPLE_LIB) $(PJSUA_LIB_LIB) $(TEST_EXE) 189 .PHONY: $(PJSIP_LIB) $(PJSIP_SONAME) 190 .PHONY: $(PJSIP_UA_LIB) $(PJSIP_UA_SONAME) 191 .PHONY: $(PJSIP_SIMPLE_LIB) $(PJSIP_SIMPLE_SONAME) 192 .PHONY: $(PJSUA_LIB_LIB) $(PJSUA_LIB_SONAME) 193 .PHONY: $(TEST_EXE) 133 194 134 195 pjsip: $(PJSIP_LIB) 135 $(PJSIP_LIB): 136 $(MAKE) -f $(RULES_MAK) APP=PJSIP app=pjsip $(PJSIP_LIB) 196 $(PJSIP_SONAME): $(PJSIP_LIB) 197 $(PJSIP_LIB) $(PJSIP_SONAME): 198 $(MAKE) -f $(RULES_MAK) APP=PJSIP app=pjsip $(subst /,$(HOST_PSEP),$(LIBDIR)/$@) 137 199 138 200 pjsip-ua: $(PJSIP_UA_LIB) 139 $(PJSIP_UA_LIB): 140 $(MAKE) -f $(RULES_MAK) APP=PJSIP_UA app=pjsip-ua $(PJSIP_UA_LIB) 201 $(PJSIP_UA_SONAME): $(PJSIP_UA_LIB) 202 $(PJSIP_UA_LIB) $(PJSIP_UA_SONAME): $(PJSIP_LIB) $(PJSIP_SONAME) $(PJSIP_SIMPLE_LIB) $(PJSIP_SIMPLE_SONAME) 203 $(MAKE) -f $(RULES_MAK) APP=PJSIP_UA app=pjsip-ua $(subst /,$(HOST_PSEP),$(LIBDIR)/$@) 141 204 142 205 pjsip-simple: $(PJSIP_SIMPLE_LIB) 143 $(PJSIP_SIMPLE_LIB): 144 $(MAKE) -f $(RULES_MAK) APP=PJSIP_SIMPLE app=pjsip-simple $(PJSIP_SIMPLE_LIB) 206 $(PJSIP_SIMPLE_SONAME): $(PJSIP_SIMPLE_LIB) 207 $(PJSIP_SIMPLE_LIB) $(PJSIP_SIMPLE_SONAME): $(PJSIP_LIB) $(PJSIP_SONAME) 208 $(MAKE) -f $(RULES_MAK) APP=PJSIP_SIMPLE app=pjsip-simple $(subst /,$(HOST_PSEP),$(LIBDIR)/$@) 145 209 146 210 pjsua-lib: $(PJSUA_LIB_LIB) 147 $(PJSUA_LIB_LIB): 148 $(MAKE) -f $(RULES_MAK) APP=PJSUA_LIB app=pjsua-lib $(PJSUA_LIB_LIB) 211 $(PJSUA_LIB_SONAME): $(PJSUA_LIB_LIB) 212 $(PJSUA_LIB_LIB) $(PJSUA_LIB_SONAME): $(PJSIP_LIB) $(PJSIP_SONAME) $(PJSIP_SIMPLE_LIB) $(PJSIP_SIMPLE_SONAME) $(PJSIP_UA_LIB) $(PJSIP_UA_SONAME) 213 $(MAKE) -f $(RULES_MAK) APP=PJSUA_LIB app=pjsua-lib $(subst /,$(HOST_PSEP),$(LIBDIR)/$@) 149 214 150 215 pjsip-test: $(TEST_EXE) 151 $(TEST_EXE): $(PJSUA_LIB_LIB) $(PJSIP_SIMPLE_LIB) $(PJSIP_UA_LIB) $(PJSIP_LIB) 152 $(MAKE) -f $(RULES_MAK) APP=TEST app=pjsip-test $(TEST_EXE) 153 154 .PHONY: ../lib/pjsip.ko 155 ../lib/pjsip.ko: 156 echo Making $@ 157 $(MAKE) -f $(RULES_MAK) APP=PJSIP app=pjsip $@ 158 159 .PHONY: ../lib/pjsip-ua.ko 160 ../lib/pjsip-ua.ko: 161 echo Making $@ 162 $(MAKE) -f $(RULES_MAK) APP=PJSIP_UA app=pjsip-ua $@ 163 164 .PHONY: ../lib/pjsip-simple.ko 165 ../lib/pjsip-simple.ko: 166 echo Making $@ 167 $(MAKE) -f $(RULES_MAK) APP=PJSIP_SIMPLE app=pjsip-simple $@ 168 169 .PHONY: ../lib/pjsua-lib.ko 170 ../lib/pjsua-lib.ko: 171 echo Making $@ 172 $(MAKE) -f $(RULES_MAK) APP=PJSUA_LIB app=pjsua-lib $@ 216 $(TEST_EXE): $(PJSIP_LIB) $(PJSIP_SONAME) 217 $(TEST_EXE): $(PJSIP_UA_LIB) $(PJSIP_UA_SONAME) 218 $(TEST_EXE): $(PJSIP_SIMPLE_LIB) $(PJSIP_SIMPLE_SONAME) 219 $(TEST_EXE): $(PJSUA_LIB_LIB) $(PJSUA_LIB_SONAME) 220 $(TEST_EXE): 221 $(MAKE) -f $(RULES_MAK) APP=TEST app=pjsip-test $(subst /,$(HOST_PSEP),$(BINDIR)/$@) 222 223 .PHONY: pjsip.ko 224 pjsip.ko: 225 echo Making $@ 226 $(MAKE) -f $(RULES_MAK) APP=PJSIP app=pjsip $(subst /,$(HOST_PSEP),$(LIBDIR)/$@) 227 228 .PHONY: pjsip-ua.ko 229 pjsip-ua.ko: 230 echo Making $@ 231 $(MAKE) -f $(RULES_MAK) APP=PJSIP_UA app=pjsip-ua $(subst /,$(HOST_PSEP),$(LIBDIR)/$@) 232 233 .PHONY: pjsip-simple.ko 234 pjsip-simple.ko: 235 echo Making $@ 236 $(MAKE) -f $(RULES_MAK) APP=PJSIP_SIMPLE app=pjsip-simple $(subst /,$(HOST_PSEP),$(LIBDIR)/$@) 237 238 .PHONY: pjsua-lib.ko 239 pjsua-lib.ko: 240 echo Making $@ 241 $(MAKE) -f $(RULES_MAK) APP=PJSUA_LIB app=pjsua-lib $(subst /,$(HOST_PSEP),$(LIBDIR)/$@) 173 242 174 243 clean: … … 185 254 $(MAKE) -f $(RULES_MAK) APP=PJSUA_LIB app=pjsua-lib $@ 186 255 $(MAKE) -f $(RULES_MAK) APP=TEST app=pjsip-test $@ 187 echo '$( TEST_EXE): $(PJMEDIA_LIB) $(PJSUA_LIB_LIB) $(PJSIP_SIMPLE_LIB) $(PJSIP_UA_LIB)$(PJSIP_LIB) $(PJNATH_LIB) $(PJLIB_UTIL_LIB) $(PJLIB_LIB)' >> .pjsip-test-$(TARGET_NAME).depend256 echo '$(BINDIR)/$(TEST_EXE): $(PJMEDIA_LIB) $(LIBDIR)/$(PJSUA_LIB_LIB) $(LIBDIR)/$(PJSIP_SIMPLE_LIB) $(LIBDIR)/$(PJSIP_UA_LIB) $(LIBDIR)/$(PJSIP_LIB) $(PJNATH_LIB) $(PJLIB_UTIL_LIB) $(PJLIB_LIB)' >> .pjsip-test-$(TARGET_NAME).depend 188 257 189 258 realclean:
Note: See TracChangeset
for help on using the changeset viewer.