diff options
author | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2009-02-14 11:12:22 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2009-02-14 11:12:22 +0000 |
commit | 4456645b451300aff4a763e966746e247ec5ae39 (patch) | |
tree | 0e2d93b749e073e79336601a0aee6c3306456960 /test/Makefile | |
parent | 472d9ed91f2e43642edd7ae92269b76a293e004e (diff) | |
download | libhubbub-4456645b451300aff4a763e966746e247ec5ae39.tar.gz libhubbub-4456645b451300aff4a763e966746e247ec5ae39.tar.bz2 |
Allow TESTTYPE=release to be specified to build the tests with the release CFLAGS.
Add TARGET to the build paths. You should 'make distclean' before updating to this.
Add BUILD_SHARED=yes support to the *nix build
svn path=/trunk/hubbub/; revision=6478
Diffstat (limited to 'test/Makefile')
-rw-r--r-- | test/Makefile | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/test/Makefile b/test/Makefile index caf397d..cb01a62 100644 --- a/test/Makefile +++ b/test/Makefile @@ -9,6 +9,7 @@ # TOP The location of the source tree root # RELEASEDIR The place to put release objects # DEBUGDIR The place to put debug objects +# TESTTYPE The type of test to build (release/debug) # # do_include Canned command sequence to include a child makefile # @@ -40,6 +41,14 @@ CFLAGS := $(CFLAGS) -I$(TOP)/src/ -I$(d) \ LDFLAGS := $(LDFLAGS) $(shell $(PKGCONFIG) $(PKGCONFIGFLAGS) --libs json) endif +ifeq ($(TESTTYPE),release) +TESTCFLAGS := $(RELEASECFLAGS) +TESTLIB := libhubbub.a +else +TESTCFLAGS := $(DEBUGCFLAGS) +TESTLIB := libhubbub-debug.a +endif + ifdef PROFILE CFLAGS := $(CFLAGS) -pg -fno-omit-frame-pointer LDFLAGS := $(LDFLAGS) -pg @@ -75,7 +84,7 @@ define dep_test DEP_$(d) += $(2) $(2): $(1) @$$(RM) $$(RMFLAGS) $(2) - @$$(CC) $$(DEBUGCFLAGS) -MM -MT '$(2) $(3)' -MF $(2) $(1) + @$$(CC) $$(TESTCFLAGS) -MM -MT '$(2) $(3)' -MF $(2) $(1) endef @@ -86,11 +95,11 @@ define compile_test ifeq ($(HOST),riscos) $(2): $(3) else -$(2): $(3) $(TOP)/$(COMPONENT)-debug.a +$(2): $(3) $(TOP)/$(TESTLIB) endif @$$(ECHO) $$(ECHOFLAGS) "==> $(1)" - @$$(CC) -c -g $$(DEBUGCFLAGS) -o $$@.o $(1) - @$$(LD) -g -o $$@ $$@.o -lhubbub-debug $$(LDFLAGS) -lgcov + @$$(CC) -c -g $$(TESTCFLAGS) -o $$@.o $(1) + @$$(LD) -g -o $$@ $$@.o $$(TOP)/$$(TESTLIB) $$(LDFLAGS) -lgcov @$$(RM) $$(RMFLAGS) $$@.o endef |