ref: ea418846f1c2e5732e19af711bb6099971e38389
parent: e560ba58a3b916fffdb52e8ffcb69fa3a6b9baea
parent: e7be3a0afad2203ca8d18cc8eb36957de08d0d01
author: Ethan Hugg <[email protected]>
date: Mon Jan 13 04:04:08 EST 2014
Merge pull request #144 from varunbpatil/better_make_test Makefile modifications for test target
--- a/Makefile
+++ b/Makefile
@@ -39,7 +39,7 @@
include build/platform-$(UNAME).mk
ifeq ($(USE_ASM),Yes)
- CFLAGS += -DX86_ASM
+CFLAGS += -DX86_ASM
endif
CFLAGS += -DNO_DYNAMIC_VP
@@ -48,7 +48,7 @@
#### No user-serviceable parts below this line
-INCLUDES = -Icodec/api/svc -Icodec/common -Igtest/include
+INCLUDES = -Icodec/api/svc -Icodec/common -Igtest/include
#ASM_INCLUDES = -Iprocessing/src/asm/
ASM_INCLUDES = -Icodec/common/
@@ -79,19 +79,24 @@
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)
-.PHONY: test
+.PHONY: test gtest-bootstrap clean
all: libraries binaries
clean:
rm -f $(OBJS) $(LIBRARIES) $(BINARIES)
- echo $(HAVE_GTEST)
gtest-bootstrap:
svn co https://googletest.googlecode.com/svn/trunk/ gtest
-test: codec_unittest
+test:
+ifeq ($(HAVE_GTEST),Yes)
+ $(MAKE) codec_unittest
./codec_unittest
+else
+ @echo "./gtest : No such file or directory."
+ @echo "You do not have gtest. Run make gtest-bootstrap to get gtest"
+endif
include codec/common/targets.mk
include codec/decoder/targets.mk
@@ -104,9 +109,3 @@
include build/gtest-targets.mk
include test/targets.mk
endif
-
-
-
-
-
-