ref: b55292413b3d04c00b1d002f63511b9df40b802d
parent: ed73d519457ea9272c2620e497f921f97ea60a5a
parent: 9d1ff982a719e78ac03b26a312e915c9626fee0b
author: sijchen <[email protected]>
date: Mon Jun 1 12:20:08 EDT 2015
Merge pull request #1969 from BelledonneCommunications/bc-out-of-tree-build fixes for out-of-tree build
--- a/Makefile
+++ b/Makefile
@@ -87,7 +87,7 @@
endif
-INCLUDES += -I$(SRC_PATH)codec/api/svc -I$(SRC_PATH)codec/common/inc
+INCLUDES += -I$(SRC_PATH)codec/api/svc -I$(SRC_PATH)codec/common/inc -Icodec/common/inc
DECODER_INCLUDES += \
-I$(SRC_PATH)codec/decoder/core/inc \
@@ -144,7 +144,7 @@
.PHONY: test gtest-bootstrap clean $(PROJECT_NAME).pc $(PROJECT_NAME)-static.pc
generate-version:
- $(QUIET)cd $(SRC_PATH) && sh ./codec/common/generate_version.sh
+ $(QUIET)sh $(SRC_PATH)codec/common/generate_version.sh $(SRC_PATH)
codec/decoder/plus/src/welsDecoderExt.$(OBJ): | generate-version
codec/encoder/plus/src/welsEncoderExt.$(OBJ): | generate-version
--- a/build/msvc-common.mk
+++ b/build/msvc-common.mk
@@ -41,9 +41,9 @@
SHARED=-LD
EXTRA_LIBRARY=$(PROJECT_NAME)_dll.lib
LDFLAGS += -link
-SHLDFLAGS=-pdb:$(PROJECT_NAME).pdb -def:openh264.def -implib:$(EXTRA_LIBRARY)
+SHLDFLAGS=-pdb:$(PROJECT_NAME).pdb -def:$(SRC_PATH)openh264.def -implib:$(EXTRA_LIBRARY)
STATIC_LDFLAGS=
CODEC_UNITTEST_CFLAGS=-D_CRT_SECURE_NO_WARNINGS
%.res: %.rc
- $(QUIET_RC)rc $<
+ $(QUIET_RC)rc -fo $@ $<
--- a/build/platform-msvc-wp.mk
+++ b/build/platform-msvc-wp.mk
@@ -2,5 +2,5 @@
include $(SRC_PATH)build/msvc-app.mk
CFLAGS += -DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP -DWINDOWS_PHONE
LDFLAGS += -nodefaultlib:kernel32.lib -nodefaultlib:ole32.lib WindowsPhoneCore.lib
-UTSHLDFLAGS = -def:ut.def
+UTSHLDFLAGS = -def:$(SRC_PATH)ut.def
--- a/codec/common/generate_version.sh
+++ b/codec/common/generate_version.sh
@@ -1,5 +1,6 @@
#!/bin/bash
git rev-list HEAD | sort > config.git-hash
+SRC_PATH=$1
LOCALVER=`wc -l config.git-hash | awk '{print $1}'`
if [ $LOCALVER \> 1 ] ; then
VER="$(git rev-list HEAD -n 1 | cut -c 1-7)"
@@ -14,7 +15,8 @@
GIT_VERSION='"'$GIT_VERSION'"'
rm -f config.git-hash
-cat codec/common/inc/version_gen.h.template | sed "s/\$FULL_VERSION/$GIT_VERSION/g" > codec/common/inc/version_gen.h.new
+mkdir -p codec/common/inc
+cat $SRC_PATH/codec/common/inc/version_gen.h.template | sed "s/\$FULL_VERSION/$GIT_VERSION/g" > codec/common/inc/version_gen.h.new
if cmp codec/common/inc/version_gen.h.new codec/common/inc/version_gen.h > /dev/null 2>&1; then
# Identical to old version, don't touch it (to avoid unnecessary rebuilds)
rm codec/common/inc/version_gen.h.new