summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-03-25 18:56:28 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-03-25 18:56:28 +0000
commit6c7033342bc1ee8a955e84fd06c2c2c4bef87dfa (patch)
treea61f5ea0f126b8baea4cae4b7b54666f9e9a1879
parent0685e317c1708fa2cdcf6bd0943cc7a9208adaf2 (diff)
downloadlibhubbub-6c7033342bc1ee8a955e84fd06c2c2c4bef87dfa.tar.gz
libhubbub-6c7033342bc1ee8a955e84fd06c2c2c4bef87dfa.tar.bz2
Simplify json requirements
svn path=/trunk/hubbub/; revision=6880
-rw-r--r--Makefile26
1 files changed, 8 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index b63ab6f..9e65544 100644
--- a/Makefile
+++ b/Makefile
@@ -23,32 +23,22 @@ else
LDFLAGS := $(LDFLAGS) -lparserutils
endif
-ifeq ($(MAKECMDGOALS),test)
- NEED_JSON := yes
-else
- ifeq ($(MAKECMDGOALS),profile)
- NEED_JSON := yes
- else
- ifeq ($(MAKECMDGOALS),coverage)
- NEED_JSON := yes
- endif
- endif
-endif
+include build/makefiles/Makefile.top
-ifeq ($(NEED_JSON),yes)
+ifeq ($(WANT_TEST),yes)
# We require the presence of libjson -- http://oss.metaparadigm.com/json-c/
ifneq ($(PKGCONFIG),)
- CFLAGS := $(CFLAGS) $(shell $(PKGCONFIG) $(PKGCONFIGFLAGS) --cflags json)
- LDFLAGS := $(LDFLAGS) $(shell $(PKGCONFIG) $(PKGCONFIGFLAGS) --libs json)
+ TESTCFLAGS := $(TESTCFLAGS) \
+ $(shell $(PKGCONFIG) $(PKGCONFIGFLAGS) --cflags json)
+ TESTLDFLAGS := $(TESTLDFLAGS) \
+ $(shell $(PKGCONFIG) $(PKGCONFIGFLAGS) --libs json)
else
- LDFLAGS := $(LDFLAGS) -ljson
+ TESTLDFLAGS := $(TESTLDFLAGS) -ljson
endif
- CFLAGS := $(CFLAGS) -Wno-unused-parameter
+ TESTCFLAGS := $(TESTCFLAGS) -Wno-unused-parameter
endif
-include build/makefiles/Makefile.top
-
# Extra installation rules
INSTALL_ITEMS := $(INSTALL_ITEMS) /include/hubbub:include/hubbub/errors.h
INSTALL_ITEMS := $(INSTALL_ITEMS) /include/hubbub:include/hubbub/functypes.h