summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2008-05-25 23:28:06 +0000
committerJames Bursa <james@netsurf-browser.org>2008-05-25 23:28:06 +0000
commitb53f36ebc2feb627d9fa79389e3db7b4a14c6d52 (patch)
treef937ab16f172cbc601ac091f57b71f8d2eda6915 /Makefile
parent70da04d69e87e6d11fc043dc769de2b5e027f071 (diff)
downloadnetsurf-b53f36ebc2feb627d9fa79389e3db7b4a14c6d52.tar.gz
netsurf-b53f36ebc2feb627d9fa79389e3db7b4a14c6d52.tar.bz2
Add TARGET=debug and fix the debug build.
svn path=/trunk/netsurf/; revision=4202
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 17 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index c245c1e9c..fe57b8a35 100644
--- a/Makefile
+++ b/Makefile
@@ -61,7 +61,9 @@ SUBTARGET =
ifneq ($(TARGET),riscos)
ifneq ($(TARGET),gtk)
-$(error Unknown TARGET "$(TARGET)", should either be "riscos" or "gtk")
+ifneq ($(TARGET),debug)
+$(error Unknown TARGET "$(TARGET)", should either be "riscos", "gtk", or "debug")
+endif
endif
endif
@@ -95,7 +97,7 @@ endif
PKG_CONFIG := $(GCCSDK_INSTALL_ENV)/ro-pkg-config
endif
else
-# Building for GTK
+# Building for GTK or debug
PKG_CONFIG := pkg-config
endif
@@ -151,7 +153,7 @@ ifeq ($(HOST),riscos)
CFLAGS += -I<OSLib$$Dir> -mthrowback
endif
ASFLAGS += -xassembler-with-cpp -I. -I$(GCCSDK_INSTALL_ENV)/include
-LDFLAGS += -L$(GCCSDK_INSTALL_ENV)/lib -lcares -lrufl -lpencil \
+LDFLAGS += -L$(GCCSDK_INSTALL_ENV)/lib -lrufl -lpencil \
-lsvgtiny
ifeq ($(HOST),riscos)
LDFLAGS += -LOSLib: -lOSLib32
@@ -166,6 +168,18 @@ endif
endif
endif
+ifeq ($(TARGET),debug)
+CFLAGS += -std=c99 \
+ -D_BSD_SOURCE \
+ -D_XOPEN_SOURCE=600 \
+ -D_POSIX_C_SOURCE=200112L \
+ -D_NETBSD_SOURCE \
+ $(WARNFLAGS) -I. -I../../libsprite/trunk/ -g -O \
+ $(shell $(PKG_CONFIG) --cflags librosprite) \
+ $(shell xml2-config --cflags)
+LDFLAGS += $(shell $(PKG_CONFIG) --libs librosprite)
+endif
+
$(OBJROOT)/created:
$(VQ)echo " MKDIR: $(OBJROOT)"
$(Q)$(MKDIR) $(OBJROOT)