summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile20
-rw-r--r--Makefile.sources8
-rw-r--r--debug/debug_bitmap.c2
-rw-r--r--debug/filetyped.c2
4 files changed, 28 insertions, 4 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)
diff --git a/Makefile.sources b/Makefile.sources
index adb73167e..037bcca93 100644
--- a/Makefile.sources
+++ b/Makefile.sources
@@ -57,6 +57,9 @@ S_GTK := font_pango.c gtk_bitmap.c gtk_gui.c gtk_schedule.c \
gtk_history.c gtk_window.c gtk_filetype.c gtk_download.c
S_GTK := $(addprefix gtk/,$(S_GTK))
+# S_DEBUG are sources purely for the debug build
+S_DEBUG := netsurfd.c debug_bitmap.c filetyped.c fontd.c
+S_DEBUG := $(addprefix debug/,$(S_DEBUG))
# Some extra rules for building the scanner etc.
css/css_enum.c css/css_enum.h: css/css_enums css/makeenum
@@ -114,6 +117,11 @@ SOURCES := $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_GTK)
EXETARGET := nsgtk
endif
+ifeq ($(TARGET),debug)
+SOURCES := $(S_COMMON) $(S_IMAGE) $(S_DEBUG)
+EXETARGET := nsdebug
+endif
+
ifeq ($(SOURCES),)
$(error Unable to build NetSurf, could not determine set of sources to build)
endif
diff --git a/debug/debug_bitmap.c b/debug/debug_bitmap.c
index b560b481d..34154607a 100644
--- a/debug/debug_bitmap.c
+++ b/debug/debug_bitmap.c
@@ -119,7 +119,7 @@ bool bitmap_redraw(struct content *c, int x, int y,
* \return true on success, false on error and error reported
*/
-bool bitmap_save(struct bitmap *bitmap, const char *path)
+bool bitmap_save(struct bitmap *bitmap, const char *path, unsigned flags)
{
return true;
}
diff --git a/debug/filetyped.c b/debug/filetyped.c
index 2bb465b24..d15890ce4 100644
--- a/debug/filetyped.c
+++ b/debug/filetyped.c
@@ -43,6 +43,8 @@ const char *fetch_filetype(const char *unix_path)
return "image/png";
if (2 < l && strcasecmp(unix_path + l - 3, "jng") == 0)
return "image/jng";
+ if (2 < l && strcasecmp(unix_path + l - 3, "svg") == 0)
+ return "image/svg";
return "text/html";
}