Changeset 4656 for pjproject/trunk/pjmedia/build/Makefile
- Timestamp:
- Nov 23, 2013 7:13:40 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/build/Makefile
r4637 r4656 10 10 include $(PJDIR)/build/common.mak 11 11 12 export LIBDIR := ../lib 13 export BINDIR := ../bin 14 12 15 RULES_MAK := $(PJDIR)/build/rules.mak 13 16 … … 16 19 PJNATH_LIB:=$(PJDIR)/pjnath/lib/libpjnath-$(TARGET_NAME)$(LIBEXT) 17 20 18 export PJMEDIA_LIB:=../lib/libpjmedia-$(TARGET_NAME)$(LIBEXT) 19 export PJMEDIA_CODEC_LIB:=../lib/libpjmedia-codec-$(TARGET_NAME)$(LIBEXT) 20 export PJSDP_LIB:=../lib/libpjsdp-$(TARGET_NAME)$(LIBEXT) 21 export PJMEDIA_AUDIODEV_LIB:=../lib/libpjmedia-audiodev-$(TARGET_NAME)$(LIBEXT) 22 export PJMEDIA_VIDEODEV_LIB:=../lib/libpjmedia-videodev-$(TARGET_NAME)$(LIBEXT) 21 export PJMEDIA_LIB:=libpjmedia-$(TARGET_NAME)$(LIBEXT) 22 export PJMEDIA_CODEC_LIB:=libpjmedia-codec-$(TARGET_NAME)$(LIBEXT) 23 export PJSDP_LIB:=libpjsdp-$(TARGET_NAME)$(LIBEXT) 24 export PJMEDIA_AUDIODEV_LIB:=libpjmedia-audiodev-$(TARGET_NAME)$(LIBEXT) 25 export PJMEDIA_VIDEODEV_LIB:=libpjmedia-videodev-$(TARGET_NAME)$(LIBEXT) 26 27 ifeq ($(PJ_SHARED_LIBRARIES),) 28 else 29 export PJMEDIA_SONAME:=libpjmedia.$(SHLIB_SUFFIX) 30 export PJMEDIA_SHLIB:=$(PJMEDIA_SONAME).$(PJ_VERSION_MAJOR) 31 export PJMEDIA_CODEC_SONAME:=libpjmedia-codec.$(SHLIB_SUFFIX) 32 export PJMEDIA_CODEC_SHLIB:=$(PJMEDIA_CODEC_SONAME).$(PJ_VERSION_MAJOR) 33 export PJSDP_SONAME:=libpjsdp.$(SHLIB_SUFFIX) 34 export PJSDP_SHLIB:=$(PJSDP_SONAME).$(PJ_VERSION_MAJOR) 35 export PJMEDIA_AUDIODEV_SONAME:=libpjmedia-audiodev.$(SHLIB_SUFFIX) 36 export PJMEDIA_AUDIODEV_SHLIB:=$(PJMEDIA_AUDIODEV_SONAME).$(PJ_VERSION_MAJOR) 37 export PJMEDIA_VIDEODEV_SONAME:=libpjmedia-videodev.$(SHLIB_SUFFIX) 38 export PJMEDIA_VIDEODEV_SHLIB:=$(PJMEDIA_VIDEODEV_SONAME).$(PJ_VERSION_MAJOR) 39 endif 23 40 24 41 … … 36 53 export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \ 37 54 $(HOST_CXXFLAGS) $(CXXFLAGS) 38 export _LDFLAGS := $(subst /,$(HOST_PSEP),$(PJMEDIA_VIDEODEV_LIB)) \ 39 $(subst /,$(HOST_PSEP),$(PJMEDIA_CODEC_LIB)) \ 40 $(subst /,$(HOST_PSEP),$(PJMEDIA_LIB)) \ 41 $(subst /,$(HOST_PSEP),$(PJMEDIA_AUDIODEV_LIB)) \ 42 $(subst /,$(HOST_PSEP),$(PJLIB_LIB)) \ 43 $(subst /,$(HOST_PSEP),$(PJLIB_UTIL_LIB)) \ 44 $(subst /,$(HOST_PSEP),$(PJNATH_LIB)) \ 45 -L$(PJDIR)/third_party/lib \ 46 $(APP_THIRD_PARTY_LIBS) \ 55 56 export _LDFLAGS := $(APP_THIRD_PARTY_LIBS) \ 47 57 $(APP_THIRD_PARTY_EXT) \ 48 58 $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \ 49 $( LDFLAGS)59 $(APP_LDFLAGS) $(LDFLAGS) 50 60 51 61 ############################################################################### … … 75 85 export PJMEDIA_CFLAGS += $(_CFLAGS) 76 86 export PJMEDIA_CXXFLAGS += $(_CXXFLAGS) 87 export PJMEDIA_LDFLAGS += $(PJMEDIA_VIDEODEV_LDLIB) \ 88 $(PJMEDIA_AUDIODEV_LDLIB) \ 89 $(PJLIB_LDLIB) \ 90 $(PJLIB_UTIL_LDLIB) \ 91 $(PJNATH_LDLIB) \ 92 $(_LDFLAGS) 77 93 78 94 … … 87 103 export PJMEDIA_AUDIODEV_CFLAGS += $(_CFLAGS) 88 104 export PJMEDIA_AUDIODEV_CXXFLAGS += $(_CXXFLAGS) 105 export PJMEDIA_AUDIODEV_LDFLAGS += $(PJLIB_LDLIB) \ 106 $(_LDFLAGS) 89 107 90 108 … … 97 115 export PJMEDIA_VIDEODEV_CFLAGS += $(_CFLAGS) 98 116 export PJMEDIA_VIDEODEV_CXXFLAGS += $(_CXXFLAGS) 117 export PJMEDIA_VIDEODEV_LDFLAGS += $(PJLIB_LDLIB) \ 118 $(_LDFLAGS) 99 119 100 120 … … 110 130 export PJSDP_CFLAGS += $(_CFLAGS) 111 131 export PJSDP_CXXFLAGS += $(_CXXFLAGS) 132 export PJSDP_LDFLAGS += $(PJMEDIA_LDLIB) \ 133 $(PJLIB_LDLIB) \ 134 $(PJLIB_UTIL_LDLIB) \ 135 $(_LDFLAGS) 112 136 113 137 … … 125 149 export PJMEDIA_CODEC_CXXFLAGS += $(_CXXFLAGS) $(GSM_CFLAGS) $(SPEEX_CFLAGS) \ 126 150 $(ILBC_CFLAGS) $(IPP_CFLAGS) $(G7221_CFLAGS) 127 151 export PJMEDIA_CODEC_LDFLAGS += $(PJMEDIA_LDLIB) \ 152 $(PJLIB_LDLIB) \ 153 $(_LDFLAGS) 128 154 129 155 ############################################################################### … … 137 163 export PJMEDIA_TEST_CFLAGS += $(_CFLAGS) 138 164 export PJMEDIA_TEST_CXXFLAGS += $(_CXXFLAGS) 139 export PJMEDIA_TEST_LDFLAGS += $(_LDFLAGS) 140 export PJMEDIA_TEST_EXE:=../bin/pjmedia-test-$(TARGET_NAME)$(HOST_EXE) 165 export PJMEDIA_TEST_LDFLAGS += $(PJMEDIA_CODEC_LDLIB) \ 166 $(PJMEDIA_VIDEODEV_LDLIB) \ 167 $(PJMEDIA_LDLIB) \ 168 $(PJMEDIA_AUDIODEV_LDLIB) \ 169 $(PJLIB_LDLIB) \ 170 $(PJLIB_UTIL_LDLIB) \ 171 $(PJNATH_LDLIB) \ 172 $(_LDFLAGS) 173 export PJMEDIA_TEST_EXE:=pjmedia-test-$(TARGET_NAME)$(HOST_EXE) 141 174 142 175 … … 147 180 # $(TARGET) is defined in os-$(OS_NAME).mak file in current directory. 148 181 # 149 TARGETS := pjmedia pjmedia-videodev pjmedia-audiodev pjmedia-codec pjsdp pjmedia-test 182 TARGETS := $(PJMEDIA_LIB) $(PJMEDIA_SONAME) \ 183 $(PJMEDIA_CODEC_LIB) $(PJMEDIA_CODEC_SONAME)\ 184 $(PJMEDIA_VIDEODEV_LIB) $(PJMEDIA_VIDEODEV_SONAME) \ 185 $(PJMEDIA_AUDIODEV_LIB) $(PJMEDIA_AUDIODEV_SONAME) \ 186 $(PJSDP_LIB) $(PJSDP_SONAME) \ 187 $(PJMEDIA_TEST_EXE) 150 188 151 189 all: $(TARGETS) … … 165 203 distclean: realclean 166 204 167 .PHONY: dep depend clean realclean distclean205 .PHONY: all dep depend clean realclean distclean 168 206 .PHONY: $(TARGETS) 169 .PHONY: $(PJMEDIA_LIB) $(PJMEDIA_CODEC_LIB) $(PJMEDIA_VIDEODEV_LIB) $(PJMEDIA_AUDIODEV_LIB) $(PJSDP_LIB) $(PJMEDIA_TEST_EXE) 207 .PHONY: $(PJMEDIA_LIB) $(PJMEDIA_SONAME) 208 .PHONY: $(PJMEDIA_CODEC_LIB) $(PJMEDIA_CODEC_SONAME) 209 .PHONY: $(PJMEDIA_VIDEODEV_LIB) $(PJMEDIA_VIDEODEV_SONAME) 210 .PHONY: $(PJMEDIA_AUDIODEV_LIB) $(PJMEDIA_AUDIODEV_SONAME) 211 .PHONY: $(PJSDP_LIB) $(PJSDP_SONAME) 212 .PHONY: $(PJMEDIA_TEST_EXE) 170 213 171 214 pjmedia: $(PJMEDIA_LIB) 172 $(PJMEDIA_LIB): 173 $(MAKE) -f $(RULES_MAK) APP=PJMEDIA app=pjmedia $(PJMEDIA_LIB) 215 $(PJMEDIA_SONAME): $(PJMEDIA_LIB) 216 $(PJMEDIA_LIB) $(PJMEDIA_SONAME): $(PJMEDIA_AUDIODEV_LIB) $(PJMEDIA_AUDIODEV_SONAME) $(PJMEDIA_VIDEODEV_LIB) $(PJMEDIA_VIDEODEV_SONAME) 217 $(MAKE) -f $(RULES_MAK) APP=PJMEDIA app=pjmedia $(subst /,$(HOST_PSEP),$(LIBDIR)/$@) 174 218 175 219 pjmedia-codec: $(PJMEDIA_CODEC_LIB) 176 $(PJMEDIA_CODEC_LIB): 177 $(MAKE) -f $(RULES_MAK) APP=PJMEDIA_CODEC app=pjmedia-codec $(PJMEDIA_CODEC_LIB) 220 $(PJMEDIA_CODEC_SONAME): $(PJMEDIA_CODEC_LIB) 221 $(PJMEDIA_CODEC_LIB) $(PJMEDIA_CODEC_SONAME): $(PJMEDIA_LIB) $(PJMEDIA_SONAME) 222 $(MAKE) -f $(RULES_MAK) APP=PJMEDIA_CODEC app=pjmedia-codec $(subst /,$(HOST_PSEP),$(LIBDIR)/$@) 178 223 179 224 pjmedia-videodev: $(PJMEDIA_VIDEODEV_LIB) 180 $(PJMEDIA_VIDEODEV_LIB): 181 $(MAKE) -f $(RULES_MAK) APP=PJMEDIA_VIDEODEV app=pjmedia-videodev $(PJMEDIA_VIDEODEV_LIB) 225 $(PJMEDIA_VIDEODEV_SONAME): $(PJMEDIA_VIDEODEV_LIB) 226 $(PJMEDIA_VIDEODEV_LIB) $(PJMEDIA_VIDEODEV_SONAME): 227 $(MAKE) -f $(RULES_MAK) APP=PJMEDIA_VIDEODEV app=pjmedia-videodev $(subst /,$(HOST_PSEP),$(LIBDIR)/$@) 182 228 183 229 pjmedia-audiodev: $(PJMEDIA_AUDIODEV_LIB) 184 $(PJMEDIA_AUDIODEV_LIB): 185 $(MAKE) -f $(RULES_MAK) APP=PJMEDIA_AUDIODEV app=pjmedia-audiodev $(PJMEDIA_AUDIODEV_LIB) 230 $(PJMEDIA_AUDIODEV_SONAME): $(PJMEDIA_AUDIODEV_LIB) 231 $(PJMEDIA_AUDIODEV_LIB) $(PJMEDIA_AUDIODEV_SONAME): 232 $(MAKE) -f $(RULES_MAK) APP=PJMEDIA_AUDIODEV app=pjmedia-audiodev $(subst /,$(HOST_PSEP),$(LIBDIR)/$@) 186 233 187 234 pjsdp: $(PJSDP_LIB) 188 $(PJSDP_LIB): 189 $(MAKE) -f $(RULES_MAK) APP=PJSDP app=pjsdp $(PJSDP_LIB) 235 $(PJSDP_SONAME): $(PJSDP_LIB) 236 $(PJSDP_LIB) $(PJSDP_SONAME): $(PJMEDIA_LIB) $(PJMEDIA_SONAME) 237 $(MAKE) -f $(RULES_MAK) APP=PJSDP app=pjsdp $(LIBDIR)/$@ 190 238 191 239 pjmedia-test: $(PJMEDIA_TEST_EXE) 192 $(PJMEDIA_TEST_EXE): $(PJMEDIA_LIB) $(PJMEDIA_CODEC_LIB) 193 $(MAKE) -f $(RULES_MAK) APP=PJMEDIA_TEST app=pjmedia-test $(PJMEDIA_TEST_EXE) 194 195 .PHONY: ../lib/pjmedia.ko 196 ../lib/pjmedia.ko: 240 $(PJMEDIA_TEST_EXE): $(PJMEDIA_LIB) $(PJMEDIA_SONAME) 241 $(PJMEDIA_TEST_EXE): $(PJMEDIA_AUDIODEV_LIB) $(PJMEDIA_AUDIODEV_SONAME) 242 $(PJMEDIA_TEST_EXE): $(PJMEDIA_VIDEODEV_LIB) $(PJMEDIA_VIDEODEV_SONAME) 243 $(PJMEDIA_TEST_EXE): $(PJMEDIA_CODEC_LIB) $(PJMEDIA_CODEC_SONAME) 244 $(PJMEDIA_TEST_EXE): 245 $(MAKE) -f $(RULES_MAK) APP=PJMEDIA_TEST app=pjmedia-test $(BINDIR)/$@ 246 247 .PHONY: pjmedia.ko 248 pjmedia.ko: 197 249 echo Making $@ 198 $(MAKE) -f $(RULES_MAK) APP=PJMEDIA app=pjmedia $ @199 200 .PHONY: ../lib/pjmedia-codec.ko201 ../lib/pjmedia-codec.ko:250 $(MAKE) -f $(RULES_MAK) APP=PJMEDIA app=pjmedia $(LIBDIR)/$@ 251 252 .PHONY: pjmedia-codec.ko 253 pjmedia-codec.ko: 202 254 echo Making $@ 203 $(MAKE) -f $(RULES_MAK) APP=PJMEDIA_CODEC app=pjmedia-codec $ @204 205 .PHONY: ../lib/pjmedia-test.ko206 ../lib/pjmedia-test.ko:207 $(MAKE) -f $(RULES_MAK) APP=PJMEDIA_TEST app=pjmedia-test $ @255 $(MAKE) -f $(RULES_MAK) APP=PJMEDIA_CODEC app=pjmedia-codec $(LIBDIR)/$@ 256 257 .PHONY: pjmedia-test.ko 258 pjmedia-test.ko: 259 $(MAKE) -f $(RULES_MAK) APP=PJMEDIA_TEST app=pjmedia-test $(LIBDIR)/$@ 208 260 209 261 clean: … … 237 289 $(MAKE) -f $(RULES_MAK) APP=PJMEDIA_TEST app=pjmedia-test $@ 238 290 $(MAKE) -f $(RULES_MAK) APP=PJSDP app=pjsdp $@ 239 echo '$( PJMEDIA_TEST_EXE): $(PJMEDIA_LIB)$(PJMEDIA_CODEC_LIB) $(PJNATH_LIB) $(PJLIB_UTIL_LIB) $(PJLIB_LIB)' >> .pjmedia-test-$(TARGET_NAME).depend240 241 291 echo '$(BINDIR)/$(PJMEDIA_TEST_EXE): $(LIBDIR)/$(PJMEDIA_LIB) $(LIBDIR)/$(PJMEDIA_CODEC_LIB) $(PJNATH_LIB) $(PJLIB_UTIL_LIB) $(PJLIB_LIB)' >> .pjmedia-test-$(TARGET_NAME).depend 292 293
Note: See TracChangeset
for help on using the changeset viewer.