2014-01-29 10:31:09 +02:00
|
|
|
SRC_PATH=$(word 1, $(dir $(MAKEFILE_LIST)))
|
|
|
|
vpath %.c $(SRC_PATH)
|
|
|
|
vpath %.cc $(SRC_PATH)
|
|
|
|
vpath %.cpp $(SRC_PATH)
|
|
|
|
vpath %.asm $(SRC_PATH)
|
|
|
|
vpath %.S $(SRC_PATH)
|
|
|
|
|
2014-02-18 17:54:27 -08:00
|
|
|
OS=$(shell uname | tr A-Z a-z | tr -d \\-[:digit:].)
|
2014-01-28 12:35:36 +05:30
|
|
|
ARCH=$(shell uname -m)
|
2013-12-10 16:19:42 +08:00
|
|
|
LIBPREFIX=lib
|
|
|
|
LIBSUFFIX=a
|
2014-02-26 14:31:52 +02:00
|
|
|
CCAS=$(CC)
|
2013-12-17 13:57:27 +02:00
|
|
|
CXX_O=-o $@
|
|
|
|
CXX_LINK_O=-o $@
|
|
|
|
AR_OPTS=cr $@
|
2014-07-02 12:31:55 +03:00
|
|
|
LINK_LOCAL_DIR=-L.
|
2014-01-10 14:19:05 +02:00
|
|
|
LINK_LIB=-l$(1)
|
2013-12-28 00:00:32 +02:00
|
|
|
CFLAGS_OPT=-O3
|
|
|
|
CFLAGS_DEBUG=-g
|
2014-01-23 15:03:15 +02:00
|
|
|
BUILDTYPE=Release
|
2014-01-30 11:32:51 +02:00
|
|
|
V=Yes
|
2014-01-27 14:54:47 +02:00
|
|
|
PREFIX=/usr/local
|
2014-02-19 11:50:45 +02:00
|
|
|
SHARED=-shared
|
2014-03-18 11:21:46 +02:00
|
|
|
OBJ=o
|
2014-05-02 08:12:40 -07:00
|
|
|
PROJECT_NAME=openh264
|
2014-06-17 19:54:16 -07:00
|
|
|
MODULE_NAME=gmpopenh264
|
2014-07-11 08:42:51 -07:00
|
|
|
GMP_API_BRANCH=master
|
2014-05-08 14:02:53 +03:00
|
|
|
CCASFLAGS=$(CFLAGS)
|
2013-12-12 12:24:55 +08:00
|
|
|
|
2014-01-29 10:31:09 +02:00
|
|
|
ifeq (,$(wildcard $(SRC_PATH)gmp-api))
|
2014-06-17 19:54:16 -07:00
|
|
|
HAVE_GMP_API=No
|
|
|
|
else
|
|
|
|
HAVE_GMP_API=Yes
|
|
|
|
endif
|
|
|
|
|
2014-01-29 10:31:09 +02:00
|
|
|
ifeq (,$(wildcard $(SRC_PATH)gtest))
|
2013-12-12 12:24:55 +08:00
|
|
|
HAVE_GTEST=No
|
|
|
|
else
|
2013-12-12 10:56:52 +08:00
|
|
|
HAVE_GTEST=Yes
|
2013-12-12 12:24:55 +08:00
|
|
|
endif
|
2013-12-10 16:19:42 +08:00
|
|
|
|
2013-12-10 18:57:32 +08:00
|
|
|
# Configurations
|
|
|
|
ifeq ($(BUILDTYPE), Release)
|
2013-12-28 00:00:32 +02:00
|
|
|
CFLAGS += $(CFLAGS_OPT)
|
2013-12-10 18:57:32 +08:00
|
|
|
USE_ASM = Yes
|
|
|
|
else
|
2013-12-28 00:00:32 +02:00
|
|
|
CFLAGS = $(CFLAGS_DEBUG)
|
2013-12-10 18:57:32 +08:00
|
|
|
USE_ASM = No
|
|
|
|
endif
|
2014-01-03 14:49:45 +08:00
|
|
|
|
2014-01-09 10:25:15 -08:00
|
|
|
ifeq ($(USE_ASAN), Yes)
|
|
|
|
CFLAGS += -fsanitize=address
|
|
|
|
LDFLAGS += -fsanitize=address
|
|
|
|
endif
|
|
|
|
|
2014-01-29 10:31:09 +02:00
|
|
|
include $(SRC_PATH)build/platform-$(OS).mk
|
2013-12-13 13:50:04 +02:00
|
|
|
|
2013-12-10 18:57:32 +08:00
|
|
|
|
2014-04-08 10:56:58 +03:00
|
|
|
CFLAGS +=
|
2013-12-10 18:57:32 +08:00
|
|
|
LDFLAGS +=
|
|
|
|
|
2014-03-13 01:38:33 -07:00
|
|
|
ifeq (Yes, $(GCOV))
|
|
|
|
CFLAGS += -fprofile-arcs -ftest-coverage
|
|
|
|
LDFLAGS += -lgcov
|
|
|
|
endif
|
2013-12-10 18:57:32 +08:00
|
|
|
|
|
|
|
#### No user-serviceable parts below this line
|
2014-01-30 11:32:51 +02:00
|
|
|
ifneq ($(V),Yes)
|
|
|
|
QUIET_CXX = @printf "CXX\t$@\n";
|
2014-02-12 14:52:35 +08:00
|
|
|
QUIET_CC = @printf "CC\t$@\n";
|
2014-02-26 14:31:52 +02:00
|
|
|
QUIET_CCAS = @printf "CCAS\t$@\n";
|
2014-01-30 11:32:51 +02:00
|
|
|
QUIET_ASM = @printf "ASM\t$@\n";
|
|
|
|
QUIET_AR = @printf "AR\t$@\n";
|
|
|
|
QUIET = @
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2014-01-29 10:31:09 +02:00
|
|
|
INCLUDES += -I$(SRC_PATH)codec/api/svc -I$(SRC_PATH)codec/common/inc
|
2013-12-10 18:57:32 +08:00
|
|
|
|
2014-07-02 12:27:28 +03:00
|
|
|
DECODER_INCLUDES += \
|
2014-01-29 10:31:09 +02:00
|
|
|
-I$(SRC_PATH)codec/decoder/core/inc \
|
|
|
|
-I$(SRC_PATH)codec/decoder/plus/inc
|
2013-12-10 16:19:42 +08:00
|
|
|
|
2014-07-02 12:27:28 +03:00
|
|
|
ENCODER_INCLUDES += \
|
2014-01-29 10:31:09 +02:00
|
|
|
-I$(SRC_PATH)codec/encoder/core/inc \
|
|
|
|
-I$(SRC_PATH)codec/encoder/plus/inc \
|
|
|
|
-I$(SRC_PATH)codec/processing/interface
|
2013-12-10 16:19:42 +08:00
|
|
|
|
2014-07-02 12:27:28 +03:00
|
|
|
PROCESSING_INCLUDES += \
|
2014-01-29 10:31:09 +02:00
|
|
|
-I$(SRC_PATH)codec/processing/interface \
|
|
|
|
-I$(SRC_PATH)codec/processing/src/common \
|
|
|
|
-I$(SRC_PATH)codec/processing/src/scrolldetection
|
2014-02-19 14:39:43 +02:00
|
|
|
|
2014-02-20 12:07:57 +02:00
|
|
|
GTEST_INCLUDES += \
|
2014-01-29 10:31:09 +02:00
|
|
|
-I$(SRC_PATH)gtest \
|
|
|
|
-I$(SRC_PATH)gtest/include
|
2014-01-19 20:24:10 +05:30
|
|
|
|
2014-02-20 12:07:57 +02:00
|
|
|
CODEC_UNITTEST_INCLUDES += \
|
2014-01-29 10:31:09 +02:00
|
|
|
-I$(SRC_PATH)gtest/include \
|
|
|
|
-I$(SRC_PATH)codec/common/inc \
|
2014-01-17 09:55:21 +02:00
|
|
|
|
2014-07-02 12:27:28 +03:00
|
|
|
CONSOLE_COMMON_INCLUDES += \
|
2014-01-29 10:31:09 +02:00
|
|
|
-I$(SRC_PATH)codec/console/common/inc
|
2013-12-10 16:19:42 +08:00
|
|
|
|
2014-01-29 10:31:09 +02:00
|
|
|
H264DEC_INCLUDES += $(DECODER_INCLUDES) $(CONSOLE_COMMON_INCLUDES) -I$(SRC_PATH)codec/console/dec/inc
|
2014-07-02 12:31:55 +03:00
|
|
|
H264DEC_LDFLAGS = $(LINK_LOCAL_DIR) $(call LINK_LIB,decoder) $(call LINK_LIB,common) $(call LINK_LIB,console_common)
|
2014-06-29 19:20:12 +03:00
|
|
|
H264DEC_DEPS = $(LIBPREFIX)decoder.$(LIBSUFFIX) $(LIBPREFIX)common.$(LIBSUFFIX) $(LIBPREFIX)console_common.$(LIBSUFFIX)
|
|
|
|
|
2014-01-29 10:31:09 +02:00
|
|
|
H264ENC_INCLUDES += $(ENCODER_INCLUDES) $(CONSOLE_COMMON_INCLUDES) -I$(SRC_PATH)codec/console/enc/inc
|
2014-07-02 12:31:55 +03:00
|
|
|
H264ENC_LDFLAGS = $(LINK_LOCAL_DIR) $(call LINK_LIB,encoder) $(call LINK_LIB,processing) $(call LINK_LIB,common) $(call LINK_LIB,console_common)
|
2014-06-29 19:20:12 +03:00
|
|
|
H264ENC_DEPS = $(LIBPREFIX)encoder.$(LIBSUFFIX) $(LIBPREFIX)processing.$(LIBSUFFIX) $(LIBPREFIX)common.$(LIBSUFFIX) $(LIBPREFIX)console_common.$(LIBSUFFIX)
|
2013-12-10 16:19:42 +08:00
|
|
|
|
2014-07-02 12:31:55 +03:00
|
|
|
CODEC_UNITTEST_LDFLAGS = $(LINK_LOCAL_DIR) $(call LINK_LIB,gtest) $(call LINK_LIB,decoder) $(call LINK_LIB,encoder) $(call LINK_LIB,processing) $(call LINK_LIB,common) $(CODEC_UNITTEST_LDFLAGS_SUFFIX)
|
2014-01-09 12:42:42 +02:00
|
|
|
CODEC_UNITTEST_DEPS = $(LIBPREFIX)gtest.$(LIBSUFFIX) $(LIBPREFIX)decoder.$(LIBSUFFIX) $(LIBPREFIX)encoder.$(LIBSUFFIX) $(LIBPREFIX)processing.$(LIBSUFFIX) $(LIBPREFIX)common.$(LIBSUFFIX)
|
2014-01-29 10:31:09 +02:00
|
|
|
DECODER_UNITTEST_INCLUDES += $(CODEC_UNITTEST_INCLUDES) $(DECODER_INCLUDES) -I$(SRC_PATH)test -I$(SRC_PATH)test/decoder
|
|
|
|
ENCODER_UNITTEST_INCLUDES += $(CODEC_UNITTEST_INCLUDES) $(ENCODER_INCLUDES) -I$(SRC_PATH)test -I$(SRC_PATH)test/encoder
|
|
|
|
PROCESSING_UNITTEST_INCLUDES += $(CODEC_UNITTEST_INCLUDES) $(PROCESSING_INCLUDES) -I$(SRC_PATH)test -I$(SRC_PATH)test/processing
|
|
|
|
API_TEST_INCLUDES += $(CODEC_UNITTEST_INCLUDES) -I$(SRC_PATH)test -I$(SRC_PATH)test/api
|
|
|
|
COMMON_UNITTEST_INCLUDES += $(CODEC_UNITTEST_INCLUDES) $(DECODER_INCLUDES) -I$(SRC_PATH)test -I$(SRC_PATH)test/common
|
|
|
|
MODULE_INCLUDES += -I$(SRC_PATH)gmp-api
|
2014-06-17 19:54:16 -07:00
|
|
|
|
2014-01-12 17:38:56 +05:30
|
|
|
.PHONY: test gtest-bootstrap clean
|
2013-12-13 13:09:59 -08:00
|
|
|
|
2014-07-10 02:16:29 -07:00
|
|
|
all: General_ver libraries binaries
|
|
|
|
General_ver:
|
2014-07-16 10:40:45 +03:00
|
|
|
$(QUIET)cd $(SRC_PATH) && sh ./codec/common/generate_version.sh
|
2013-12-10 16:19:42 +08:00
|
|
|
|
|
|
|
clean:
|
2014-06-02 20:21:10 -07:00
|
|
|
ifeq (android,$(OS))
|
2014-06-04 18:23:19 -07:00
|
|
|
clean: clean_Android
|
2014-06-02 20:21:10 -07:00
|
|
|
endif
|
2014-03-18 11:21:46 +02:00
|
|
|
$(QUIET)rm -f $(OBJS) $(OBJS:.$(OBJ)=.d) $(LIBRARIES) $(BINARIES)
|
2013-12-10 16:19:42 +08:00
|
|
|
|
2014-06-17 19:54:16 -07:00
|
|
|
gmp-bootstrap:
|
2014-07-09 14:51:16 -07:00
|
|
|
if [ ! -d gmp-api ] ; then git clone https://github.com/mozilla/gmp-api gmp-api ; fi
|
|
|
|
cd gmp-api && git fetch origin && git checkout $(GMP_API_BRANCH)
|
2014-06-17 19:54:16 -07:00
|
|
|
|
2013-12-12 12:24:55 +08:00
|
|
|
gtest-bootstrap:
|
|
|
|
svn co https://googletest.googlecode.com/svn/trunk/ gtest
|
2013-12-10 18:57:32 +08:00
|
|
|
|
2014-01-12 17:38:56 +05:30
|
|
|
ifeq ($(HAVE_GTEST),Yes)
|
2014-05-19 23:19:23 -07:00
|
|
|
|
2014-01-24 10:26:36 +02:00
|
|
|
test: codec_unittest$(EXEEXT)
|
2014-06-05 01:40:28 -07:00
|
|
|
ifneq (android,$(OS))
|
2014-06-05 01:20:50 -07:00
|
|
|
ifneq (ios,$(OS))
|
2013-12-13 13:09:59 -08:00
|
|
|
./codec_unittest
|
2014-05-19 23:19:23 -07:00
|
|
|
endif
|
2014-06-05 01:20:50 -07:00
|
|
|
endif
|
|
|
|
|
2014-01-12 17:38:56 +05:30
|
|
|
else
|
2014-01-17 11:05:33 +02:00
|
|
|
test:
|
2014-01-12 17:38:56 +05:30
|
|
|
@echo "./gtest : No such file or directory."
|
|
|
|
@echo "You do not have gtest. Run make gtest-bootstrap to get gtest"
|
|
|
|
endif
|
2013-12-13 13:09:59 -08:00
|
|
|
|
2014-01-29 10:31:09 +02:00
|
|
|
include $(SRC_PATH)codec/common/targets.mk
|
|
|
|
include $(SRC_PATH)codec/decoder/targets.mk
|
|
|
|
include $(SRC_PATH)codec/encoder/targets.mk
|
|
|
|
include $(SRC_PATH)codec/processing/targets.mk
|
2014-02-18 17:54:27 -08:00
|
|
|
|
2014-06-17 19:54:16 -07:00
|
|
|
ifeq ($(HAVE_GMP_API),Yes)
|
2014-01-29 10:31:09 +02:00
|
|
|
include $(SRC_PATH)module/targets.mk
|
2014-06-17 19:54:16 -07:00
|
|
|
endif
|
|
|
|
|
2014-02-18 17:54:27 -08:00
|
|
|
ifneq (android, $(OS))
|
2014-03-01 17:24:15 +02:00
|
|
|
ifneq (ios, $(OS))
|
2014-01-29 10:31:09 +02:00
|
|
|
include $(SRC_PATH)codec/console/dec/targets.mk
|
|
|
|
include $(SRC_PATH)codec/console/enc/targets.mk
|
|
|
|
include $(SRC_PATH)codec/console/common/targets.mk
|
2014-02-18 17:54:27 -08:00
|
|
|
endif
|
2014-03-01 17:24:15 +02:00
|
|
|
endif
|
2013-12-10 16:19:42 +08:00
|
|
|
|
2014-06-05 01:20:50 -07:00
|
|
|
ifneq (ios, $(OS))
|
2014-05-02 08:12:40 -07:00
|
|
|
libraries: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX)
|
2014-06-05 01:20:50 -07:00
|
|
|
else
|
|
|
|
libraries: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX)
|
|
|
|
endif
|
|
|
|
|
2014-05-02 08:12:40 -07:00
|
|
|
LIBRARIES += $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX)
|
2014-01-27 14:42:36 +02:00
|
|
|
|
2014-05-02 08:12:40 -07:00
|
|
|
$(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX): $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS)
|
2014-02-18 10:33:09 +02:00
|
|
|
$(QUIET)rm -f $@
|
|
|
|
$(QUIET_AR)$(AR) $(AR_OPTS) $+
|
2014-01-27 14:42:36 +02:00
|
|
|
|
2014-05-02 08:12:40 -07:00
|
|
|
$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX): $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS)
|
2014-02-19 11:47:09 +02:00
|
|
|
$(QUIET)rm -f $@
|
2014-02-19 11:51:50 +02:00
|
|
|
$(QUIET_CXX)$(CXX) $(SHARED) $(LDFLAGS) $(CXX_LINK_O) $+ $(SHLDFLAGS)
|
2014-02-18 17:54:27 -08:00
|
|
|
|
2014-06-17 19:54:16 -07:00
|
|
|
ifeq ($(HAVE_GMP_API),Yes)
|
|
|
|
plugin: $(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIX)
|
2014-06-25 09:02:48 +03:00
|
|
|
LIBRARIES += $(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIX)
|
2014-06-17 19:54:16 -07:00
|
|
|
else
|
|
|
|
plugin:
|
|
|
|
@echo "./gmp-api : No such file or directory."
|
|
|
|
@echo "You do not have gmp-api. Run make gmp-bootstrap to get the gmp-api headers."
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIX): $(MODULE_OBJS) $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS)
|
|
|
|
$(QUIET)rm -f $@
|
2014-06-25 09:05:30 +03:00
|
|
|
$(QUIET_CXX)$(CXX) $(SHARED) $(LDFLAGS) $(CXX_LINK_O) $+ $(SHLDFLAGS) $(MODULE_LDFLAGS)
|
2014-06-17 19:54:16 -07:00
|
|
|
|
2014-03-07 15:10:46 +02:00
|
|
|
install-headers:
|
2014-01-27 14:54:47 +02:00
|
|
|
mkdir -p $(PREFIX)/include/wels
|
2014-03-07 15:10:46 +02:00
|
|
|
install -m 644 codec/api/svc/codec*.h $(PREFIX)/include/wels
|
|
|
|
|
2014-05-02 08:12:40 -07:00
|
|
|
install-static: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) install-headers
|
2014-03-07 15:10:46 +02:00
|
|
|
mkdir -p $(PREFIX)/lib
|
2014-05-02 08:12:40 -07:00
|
|
|
install -m 644 $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) $(PREFIX)/lib
|
2014-03-07 15:10:46 +02:00
|
|
|
|
2014-05-02 08:12:40 -07:00
|
|
|
install-shared: $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) install-headers
|
2014-03-07 15:10:46 +02:00
|
|
|
mkdir -p $(PREFIX)/lib
|
2014-05-02 08:12:40 -07:00
|
|
|
install -m 755 $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) $(PREFIX)/lib
|
2014-02-19 13:12:52 +02:00
|
|
|
ifneq ($(EXTRA_LIBRARY),)
|
|
|
|
install -m 644 $(EXTRA_LIBRARY) $(PREFIX)/lib
|
|
|
|
endif
|
2014-03-07 15:10:46 +02:00
|
|
|
|
|
|
|
install: install-static install-shared
|
|
|
|
@:
|
2014-01-27 14:42:36 +02:00
|
|
|
|
2013-12-12 12:24:55 +08:00
|
|
|
ifeq ($(HAVE_GTEST),Yes)
|
2014-01-29 10:31:09 +02:00
|
|
|
include $(SRC_PATH)build/gtest-targets.mk
|
|
|
|
include $(SRC_PATH)test/api/targets.mk
|
|
|
|
include $(SRC_PATH)test/decoder/targets.mk
|
|
|
|
include $(SRC_PATH)test/encoder/targets.mk
|
|
|
|
include $(SRC_PATH)test/processing/targets.mk
|
|
|
|
include $(SRC_PATH)test/common/targets.mk
|
2014-05-19 23:19:23 -07:00
|
|
|
|
2014-06-06 02:44:22 -07:00
|
|
|
LIBRARIES += $(LIBPREFIX)ut.$(LIBSUFFIX)
|
2014-06-12 09:37:30 +08:00
|
|
|
$(LIBPREFIX)ut.$(LIBSUFFIX): $(DECODER_UNITTEST_OBJS) $(ENCODER_UNITTEST_OBJS) $(PROCESSING_UNITTEST_OBJS) $(COMMON_UNITTEST_OBJS) $(API_TEST_OBJS)
|
2014-06-05 01:20:50 -07:00
|
|
|
$(QUIET)rm -f $@
|
|
|
|
$(QUIET_AR)$(AR) $(AR_OPTS) $+
|
|
|
|
|
2014-05-19 23:19:23 -07:00
|
|
|
|
|
|
|
LIBRARIES +=$(LIBPREFIX)ut.$(SHAREDLIBSUFFIX)
|
2014-06-12 09:37:30 +08:00
|
|
|
$(LIBPREFIX)ut.$(SHAREDLIBSUFFIX): $(DECODER_UNITTEST_OBJS) $(ENCODER_UNITTEST_OBJS) $(PROCESSING_UNITTEST_OBJS) $(API_TEST_OBJS) $(COMMON_UNITTEST_OBJS) $(CODEC_UNITTEST_DEPS)
|
2014-05-19 23:19:23 -07:00
|
|
|
$(QUIET)rm -f $@
|
2014-05-23 00:59:40 -07:00
|
|
|
$(QUIET_CXX)$(CXX) $(SHARED) $(LDFLAGS) $(CXX_LINK_O) $+ $(CODEC_UNITTEST_LDFLAGS)
|
2014-05-19 23:19:23 -07:00
|
|
|
|
2014-03-24 20:11:53 -07:00
|
|
|
binaries: codec_unittest$(EXEEXT)
|
|
|
|
BINARIES += codec_unittest$(EXEEXT)
|
2014-05-19 23:19:23 -07:00
|
|
|
|
2014-06-05 01:20:50 -07:00
|
|
|
ifeq (ios,$(OS))
|
2014-06-10 16:10:48 +03:00
|
|
|
codec_unittest$(EXEEXT): $(LIBPREFIX)ut.$(LIBSUFFIX) $(LIBPREFIX)gtest.$(LIBSUFFIX) $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX)
|
2014-05-19 23:19:23 -07:00
|
|
|
|
2014-06-05 01:20:50 -07:00
|
|
|
else
|
|
|
|
ifeq (android,$(OS))
|
2014-01-29 10:31:09 +02:00
|
|
|
ifeq (./,$(SRC_PATH))
|
2014-06-05 01:20:50 -07:00
|
|
|
codec_unittest$(EXEEXT): $(LIBPREFIX)ut.$(SHAREDLIBSUFFIX)
|
2014-05-19 23:19:23 -07:00
|
|
|
cd ./test/build/android && $(NDKROOT)/ndk-build -B APP_ABI=$(APP_ABI) && android update project -t $(TARGET) -p . && ant debug
|
|
|
|
|
2014-06-04 18:23:19 -07:00
|
|
|
clean_Android: clean_Android_ut
|
2014-06-02 20:21:10 -07:00
|
|
|
clean_Android_ut:
|
2014-07-02 13:41:27 +03:00
|
|
|
-cd ./test/build/android && $(NDKROOT)/ndk-build APP_ABI=$(APP_ABI) clean && ant clean
|
2014-06-02 20:21:10 -07:00
|
|
|
|
2014-05-19 23:19:23 -07:00
|
|
|
else
|
2014-01-29 10:31:09 +02:00
|
|
|
codec_unittest$(EXEEXT):
|
|
|
|
@:
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
codec_unittest$(EXEEXT): $(DECODER_UNITTEST_OBJS) $(ENCODER_UNITTEST_OBJS) $(PROCESSING_UNITTEST_OBJS) $(API_TEST_OBJS) $(COMMON_UNITTEST_OBJS) $(CODEC_UNITTEST_DEPS) | res
|
2014-03-24 19:58:52 -07:00
|
|
|
$(QUIET)rm -f $@
|
2014-03-25 09:43:28 +02:00
|
|
|
$(QUIET_CXX)$(CXX) $(CXX_LINK_O) $+ $(CODEC_UNITTEST_LDFLAGS) $(LDFLAGS)
|
2014-06-05 01:20:50 -07:00
|
|
|
|
2014-01-29 10:31:09 +02:00
|
|
|
res:
|
|
|
|
$(QUIET)if [ ! -e res ]; then ln -s $(SRC_PATH)res .; fi
|
|
|
|
|
2014-05-19 23:19:23 -07:00
|
|
|
endif
|
2014-06-05 01:20:50 -07:00
|
|
|
endif
|
|
|
|
|
2014-04-30 21:06:40 +03:00
|
|
|
else
|
|
|
|
binaries:
|
|
|
|
@:
|
2014-03-25 18:01:00 -07:00
|
|
|
endif
|
2014-03-25 09:43:28 +02:00
|
|
|
|
2014-03-18 11:21:46 +02:00
|
|
|
-include $(OBJS:.$(OBJ)=.d)
|
2014-01-29 10:31:09 +02:00
|
|
|
|
|
|
|
OBJDIRS = $(sort $(dir $(OBJS)))
|
|
|
|
|
|
|
|
$(OBJDIRS):
|
|
|
|
$(QUIET)mkdir -p $@
|
|
|
|
|
|
|
|
$(OBJS): | $(OBJDIRS)
|