From 6c7033342bc1ee8a955e84fd06c2c2c4bef87dfa Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 25 Mar 2009 18:56:28 +0000 Subject: Simplify json requirements svn path=/trunk/hubbub/; revision=6880 --- Makefile | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.3