summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@netsurf-browser.org>2009-02-14 11:12:22 +0000
committerDaniel Silverstone <dsilvers@netsurf-browser.org>2009-02-14 11:12:22 +0000
commit4456645b451300aff4a763e966746e247ec5ae39 (patch)
tree0e2d93b749e073e79336601a0aee6c3306456960 /Makefile
parent472d9ed91f2e43642edd7ae92269b76a293e004e (diff)
downloadlibhubbub-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 'Makefile')
-rw-r--r--Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a5db312..72eaeec 100644
--- a/Makefile
+++ b/Makefile
@@ -22,11 +22,11 @@ DOXYGEN := doxygen
WARNFLAGS := -Wall -Wextra -Wundef -Wpointer-arith -Wcast-align \
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wnested-externs -Werror -pedantic
-CFLAGS = -std=c99 -D_BSD_SOURCE -I$(TOP)/include/ $(WARNFLAGS)
+CFLAGS = -std=c99 -D_BSD_SOURCE -I$(TOP)/include/ $(WARNFLAGS) $(CSHAREDFLAGS)
RELEASECFLAGS = $(CFLAGS) -DNDEBUG -O2
DEBUGCFLAGS = $(CFLAGS) -O0 -g
ARFLAGS := -cru
-LDFLAGS = -L$(TOP)/
+LDFLAGS = -L$(TOP)/ $(LDSHAREDFLAGS)
CPFLAGS :=
RMFLAGS := -f
@@ -42,5 +42,14 @@ EXEEXT :=
# Default installation prefix
PREFIX ?= /usr/local
+TARGET := nix
+
+ifeq ($(BUILD_SHARED),yes)
+
+TARGET := nix-shared
+CSHAREDFLAGS := -fPIC -DPIC
+LDSHAREDFLAGS := -Wl,-shared
+
+endif
include build/Makefile.common