Make gtest support conditional
This commit is contained in:
parent
bc3c63c431
commit
8bb8276967
17
Makefile
17
Makefile
@ -1,8 +1,14 @@
|
||||
UNAME=$(shell uname | tr A-Z a-z)
|
||||
LIBPREFIX=lib
|
||||
LIBSUFFIX=a
|
||||
CP=cp
|
||||
ROOTDIR=$(PWD)
|
||||
|
||||
ifeq (,wildcard ./gtest)
|
||||
HAVE_GTEST=No
|
||||
else
|
||||
HAVE_GTEST=Yes
|
||||
endif
|
||||
|
||||
# Configurations
|
||||
ifeq ($(BUILDTYPE), Release)
|
||||
@ -50,13 +56,15 @@ H264DEC_LDFLAGS = -L. -ldecoder -lcommon
|
||||
H264ENC_INCLUDES = $(ENCODER_INCLUDES) -Icodec/console/enc/inc
|
||||
H264ENC_LDFLAGS = -L. -lencoder -lprocessing -lcommon
|
||||
|
||||
CODEC_UNITTEST_LDFLAGS = -L. -lgtest
|
||||
CODEC_UNITTEST_LDFLAGS = -L. -lgtest -ldecoder -lcommon
|
||||
|
||||
all: libraries binaries
|
||||
all: $(GTEST_TARGETS) libraries binaries
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS) $(LIBRARIES) $(BINARIES)
|
||||
|
||||
gtest-bootstrap:
|
||||
svn co https://googletest.googlecode.com/svn/trunk/ gtest
|
||||
|
||||
include codec/common/targets.mk
|
||||
include codec/decoder/targets.mk
|
||||
@ -65,8 +73,8 @@ include processing/targets.mk
|
||||
include codec/console/dec/targets.mk
|
||||
include codec/console/enc/targets.mk
|
||||
|
||||
ifdef HAVE_GTEST
|
||||
include gtest/targets.mk
|
||||
ifeq ($(HAVE_GTEST),Yes)
|
||||
include build/gtest-targets.mk
|
||||
include test/targets.mk
|
||||
endif
|
||||
|
||||
@ -74,3 +82,4 @@ endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user