openh264/Makefile

113 lines
2.4 KiB
Makefile
Raw Normal View History

2013-12-20 14:43:30 +01:00
UNAME=$(shell uname | tr A-Z a-z | tr -d \\-[:digit:].)
LIBPREFIX=lib
LIBSUFFIX=a
2013-12-12 05:24:55 +01:00
CP=cp
ROOTDIR=$(PWD)
2013-12-12 05:24:55 +01:00
2014-01-03 07:49:45 +01:00
2014-01-09 19:25:15 +01:00
2013-12-12 06:12:20 +01:00
ifeq (,$(wildcard ./gtest))
2013-12-12 05:24:55 +01:00
HAVE_GTEST=No
else
2013-12-12 03:56:52 +01:00
HAVE_GTEST=Yes
2013-12-12 05:24:55 +01:00
endif
# Configurations
ifeq ($(BUILDTYPE), Release)
CFLAGS += -O3
USE_ASM = Yes
else
CFLAGS = -g
USE_ASM = No
endif
2014-01-03 07:49:45 +01:00
2014-01-09 19:25:15 +01:00
ifeq ($(USE_ASAN), Yes)
CFLAGS += -fsanitize=address
LDFLAGS += -fsanitize=address
endif
2013-12-15 05:37:33 +01:00
ifeq ($(ENABLE64BIT), Yes)
CFLAGS += -m64
LDFLAGS += -m64
2014-01-03 07:49:45 +01:00
ASMFLAGS += -DUNIX64
2013-12-15 05:37:33 +01:00
else
CFLAGS += -m32
LDFLAGS += -m32
2014-01-03 07:49:45 +01:00
ASMFLAGS += -DX86_32
2013-12-15 05:37:33 +01:00
endif
2014-01-03 07:49:45 +01:00
include build/platform-$(UNAME).mk
ifeq ($(USE_ASM),Yes)
CFLAGS += -DX86_ASM
endif
CFLAGS += -DNO_DYNAMIC_VP -DHAVE_CACHE_LINE_ALIGN
LDFLAGS +=
ASMFLAGS += -DNO_DYNAMIC_VP
#### No user-serviceable parts below this line
2013-12-12 03:56:52 +01:00
INCLUDES = -Icodec/api/svc -Icodec/common -Igtest/include
2014-01-03 07:49:45 +01:00
#ASM_INCLUDES = -Iprocessing/src/asm/
ASM_INCLUDES = -Icodec/common/
COMMON_INCLUDES = \
-Icodec/decoder/core/inc
DECODER_INCLUDES = \
-Icodec/decoder/core/inc \
-Icodec/decoder/plus/inc
ENCODER_INCLUDES = \
-Icodec/encoder/core/inc \
-Icodec/encoder/plus/inc \
-Icodec/WelsThreadLib/api
PROCESSING_INCLUDES = \
-Icodec/encoder/core/inc \
-Icodec/encoder/plus/inc
H264DEC_INCLUDES = $(DECODER_INCLUDES) -Icodec/console/dec/inc
H264DEC_LDFLAGS = -L. -ldecoder -lcommon
H264DEC_DEPS = $(LIBPREFIX)decoder.$(LIBSUFFIX) $(LIBPREFIX)common.$(LIBSUFFIX)
H264ENC_INCLUDES = $(ENCODER_INCLUDES) -Icodec/console/enc/inc
H264ENC_LDFLAGS = -L. -lencoder -lprocessing -lcommon
H264ENC_DEPS = $(LIBPREFIX)encoder.$(LIBSUFFIX) $(LIBPREFIX)processing.$(LIBSUFFIX) $(LIBPREFIX)common.$(LIBSUFFIX)
2014-01-07 03:23:44 +01:00
CODEC_UNITTEST_LDFLAGS = -L. -lgtest -ldecoder -lcrypto -lencoder -lprocessing -lcommon
CODEC_UNITTEST_DEPS = $(LIBPREFIX)gtest.$(LIBSUFFIX) $(LIBPREFIX)decoder.$(LIBSUFFIX) $(LIBPREFIX)encoder.$(LIBSUFFIX) $(LIBPREFIX)processing.$(LIBSUFFIX) $(LIBPREFIX)common.$(LIBSUFFIX)
2013-12-12 03:56:52 +01:00
2013-12-13 22:09:59 +01:00
.PHONY: test
2013-12-12 06:12:20 +01:00
all: libraries binaries
clean:
rm -f $(OBJS) $(LIBRARIES) $(BINARIES)
2013-12-12 06:12:20 +01:00
echo $(HAVE_GTEST)
2013-12-12 05:24:55 +01:00
gtest-bootstrap:
svn co https://googletest.googlecode.com/svn/trunk/ gtest
test: codec_unittest
2013-12-13 22:09:59 +01:00
./codec_unittest
include codec/common/targets.mk
include codec/decoder/targets.mk
include codec/encoder/targets.mk
2014-01-03 07:49:45 +01:00
include codec/processing/targets.mk
include codec/console/dec/targets.mk
include codec/console/enc/targets.mk
2013-12-12 05:24:55 +01:00
ifeq ($(HAVE_GTEST),Yes)
include build/gtest-targets.mk
2013-12-12 03:56:52 +01:00
include test/targets.mk
endif
2013-12-12 05:24:55 +01:00