openh264/Makefile

87 lines
1.6 KiB
Makefile
Raw Normal View History

UNAME=$(shell uname | tr A-Z a-z)
LIBPREFIX=lib
LIBSUFFIX=a
2013-12-12 12:24:55 +08:00
CP=cp
ROOTDIR=$(PWD)
2013-12-12 12:24:55 +08:00
2013-12-12 13:12:20 +08:00
ifeq (,$(wildcard ./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
# Configurations
ifeq ($(BUILDTYPE), Release)
CFLAGS += -O3
USE_ASM = Yes
else
CFLAGS = -g
USE_ASM = No
endif
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 -DNOPREFIX
#### No user-serviceable parts below this line
2013-12-12 10:56:52 +08:00
INCLUDES = -Icodec/api/svc -Icodec/common -Igtest/include
ASM_INCLUDES = -Iprocessing/src/asm/
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
H264ENC_INCLUDES = $(ENCODER_INCLUDES) -Icodec/console/enc/inc
H264ENC_LDFLAGS = -L. -lencoder -lprocessing -lcommon
2013-12-12 12:24:55 +08:00
CODEC_UNITTEST_LDFLAGS = -L. -lgtest -ldecoder -lcommon
2013-12-12 10:56:52 +08:00
2013-12-12 13:12:20 +08:00
all: libraries binaries
clean:
rm -f $(OBJS) $(LIBRARIES) $(BINARIES)
2013-12-12 13:12:20 +08:00
echo $(HAVE_GTEST)
2013-12-12 12:24:55 +08:00
gtest-bootstrap:
svn co https://googletest.googlecode.com/svn/trunk/ gtest
include codec/common/targets.mk
include codec/decoder/targets.mk
include codec/encoder/targets.mk
include processing/targets.mk
include codec/console/dec/targets.mk
include codec/console/enc/targets.mk
2013-12-12 12:24:55 +08:00
ifeq ($(HAVE_GTEST),Yes)
include build/gtest-targets.mk
2013-12-12 10:56:52 +08:00
include test/targets.mk
endif
2013-12-12 12:24:55 +08:00