From 4456645b451300aff4a763e966746e247ec5ae39 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 14 Feb 2009 11:12:22 +0000 Subject: 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 --- Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.3