Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/44487224252ad91c44837...
...commit
http://git.netsurf-browser.org/netsurf.git/commit/44487224252ad91c448373c...
...tree
http://git.netsurf-browser.org/netsurf.git/tree/44487224252ad91c448373cd1...
The branch, master has been updated
via 44487224252ad91c448373cd1974f1ef6c53579f (commit)
via c87cbe565580975bf8300578ec556931a5f5a409 (commit)
via fa6e1379d0cc8c904c60251eee55d58dabf60784 (commit)
via 16d67095a6731f329bad971985e8983cdc054efe (commit)
via 45906b9dc2c87181f359289abc034f84b44947c4 (commit)
from 17e20537d4c6cdcb55f1ab68c950264c79ca69b2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/44487224252ad91c448...
commit 44487224252ad91c448373cd1974f1ef6c53579f
Author: Vincent Sanders <vince(a)netsurf-browser.org>
Commit: Vincent Sanders <vince(a)netsurf-browser.org>
allow flags to be selected based on compiler version
diff --git a/Makefile b/Makefile
index a1c6e5d..1f83cba 100644
--- a/Makefile
+++ b/Makefile
@@ -71,7 +71,7 @@ else
TARGET := beos
endif
# BeOS still uses gcc2
- GCCVER := 2
+ CC_MAJOR := 2
else
ifeq ($(HOST),AmigaOS)
HOST := amiga
@@ -282,6 +282,12 @@ else
endif
endif
+# compiler versioning to adjust warning flags
+CC_MAJOR := $(shell $(CC) -dumpversion | cut -f1 -d. )
+CC_MINOR := $(shell $(CC) -dumpversion | cut -f2 -d. )
+define cc_ver_ge
+$(shell expr $(CC_MAJOR) \>= $(1) \& $(CC_MINOR) \>= $(2))
+endef
# CCACHE
ifeq ($(origin CCACHE),undefined)
@@ -401,9 +407,13 @@ WARNFLAGS = -W -Wall -Wundef -Wpointer-arith \
-Wcast-align -Wwrite-strings -Wstrict-prototypes \
-Wmissing-prototypes -Wmissing-declarations -Wredundant-decls \
-Wnested-externs -Wuninitialized
-ifneq ($(GCCVER),2)
+ifneq ($(CC_MAJOR),2)
WARNFLAGS += -Wno-unused-parameter
endif
+# deal with lots of unwanted warnings from javascript
+ifeq ($(call cc_ver_ge,4,6),1)
+ WARNFLAGS += -Wno-unused-but-set-variable
+endif
# Pull in the configuration
include Makefile.defaults
diff --git a/Makefile.sources.javascript b/Makefile.sources.javascript
index 1ece3b6..76a6ff1 100644
--- a/Makefile.sources.javascript
+++ b/Makefile.sources.javascript
@@ -54,7 +54,6 @@ S_JAVASCRIPT += content.c jsapi.c $(addprefix jsapi/,$(S_JSAPI))
$(eval $(foreach V,$(filter JSAPI_BINDING_%,$(.VARIABLES)),$(call
convert_jsapi_binding,$($(V)),$(OBJROOT)/$(patsubst JSAPI_BINDING_%,%,$(V)).c,$(patsubst
JSAPI_BINDING_%,%,$(V))_jsapi)))
-
else
S_JAVASCRIPT += none.c
endif
diff --git a/monkey/Makefile.target b/monkey/Makefile.target
index 4e8ac81..fa15a50 100644
--- a/monkey/Makefile.target
+++ b/monkey/Makefile.target
@@ -33,7 +33,6 @@ $(eval $(call
pkg_config_find_and_add_enabled,JS,mozilla-js,JavaScript))
# no pkg-config for this library
$(eval $(call feature_enabled,WEBP,-DWITH_WEBP,-lwebp -lvpx,WebP (libwebp)))
-#-Wno-unused-but-set-variable
WARNFLAGS += -Werror
MONKEYCFLAGS := -std=c99 -Dmonkey -Dnsmonkey \
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/c87cbe565580975bf83...
commit c87cbe565580975bf8300578ec556931a5f5a409
Author: Vincent Sanders <vince(a)netsurf-browser.org>
Commit: Vincent Sanders <vince(a)netsurf-browser.org>
split target defaults out
diff --git a/Makefile.defaults b/Makefile.defaults
index 7e97c6e..812a5a9 100644
--- a/Makefile.defaults
+++ b/Makefile.defaults
@@ -98,345 +98,8 @@ CFLAGS :=
# Default installation/execution prefix
PREFIX ?= /usr/local
-# ----------------------------------------------------------------------------
-# RISC OS-specific options
-# ----------------------------------------------------------------------------
-ifeq ($(TARGET),riscos)
-
- # Enable NetSurf's use of libsvgtiny for displaying SVGs
- # Valid options: YES, NO
- NETSURF_USE_NSSVG := YES
-
- # Enable NetSurf's support for displaying RISC OS Draw files
- # Valid options: YES, NO
- NETSURF_USE_DRAW := YES
-
- # Enable NetSurf's support for displaying RISC OS Sprites
- # Valid options: YES, NO
- NETSURF_USE_SPRITE := YES
-
- # Enable NetSurf's use of AWRender for displaying ArtWorks files
- # Valid options: YES, NO
- NETSURF_USE_ARTWORKS := YES
-
- # Enable NetSurf's support for the Acorn plugin protocol
- # Valid options: YES, NO
- NETSURF_USE_PLUGINS := NO
-
- # Enable NetSurf's use of pencil for Drawfile export
- # Valid options: YES, NO
- NETSURF_USE_DRAW_EXPORT := YES
-
- # Optimisation levels
- CFLAGS += -O2
-
-endif
-
-# ----------------------------------------------------------------------------
-# GTK-specific options
-# ----------------------------------------------------------------------------
-ifeq ($(TARGET),gtk)
-
- # Where to search for NetSurf's resources after looking in ~/.netsurf and
- # $NETSURFRES. It must have a trailing /
- NETSURF_GTK_RESOURCES := $(PREFIX)/share/netsurf/
-
- # Where to install the netsurf binary
- NETSURF_GTK_BIN := $(PREFIX)/bin/
-
- # Enable NetSurf's use of librsvg in conjunction with Cairo to display SVGs
- # Valid options: YES, NO, AUTO
- NETSURF_USE_RSVG := AUTO
-
- # Enable NetSurf's use of libsvgtiny for displaying SVGs
- # Valid options: YES, NO, AUTO
- NETSURF_USE_NSSVG := AUTO
-
- # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
- # Valid options: YES, NO, AUTO
- NETSURF_USE_ROSPRITE := AUTO
-
- # Configuration overrides for Mac OS X
- ifeq ($(HOST),macosx)
- NETSURF_USE_LIBICONV_PLUG := NO
- NETSURF_USE_HARU_PDF := NO
- endif
-
- # Set default GTK version to build for (2 or 3)
- NETSURF_GTK_MAJOR := 2
-
- # Optimisation levels
- CFLAGS += -O2
-
-endif
-
-# ----------------------------------------------------------------------------
-# Monkey-specific options
-# ----------------------------------------------------------------------------
-ifeq ($(TARGET),monkey)
- # How did I get mixed up with this fucking monkey anyhow?
- NETSURF_MONKEY_RESOURCES := $(PREFIX)/share/netsurf/
- NETSURF_MONKEY_BIN := $(PREFIX)/bin/
- NETSURF_USE_RSVG := NO
- NETSURF_USE_NSSVG := NO
- NETSURF_USE_ROSPRITE := NO
- NETSURF_USE_HARU_PDF := NO
- NETSURF_USE_LIBICONV_PLUG := NO
- CFLAGS += -O2
-endif
-
-# ----------------------------------------------------------------------------
-# BeOS-specific options
-# ----------------------------------------------------------------------------
-ifeq ($(TARGET),beos)
-
-
- # Where to install the netsurf binary
- NETSURF_BEOS_BIN := /boot/apps/netsurf/
-
- # TODO:HAIKU -- not sure if ~/.netsurf applies in beos
- # Where to search for NetSurf's resources after looking in ~/.netsurf and
- # $NETSURFRES. It must have a trailing /
- NETSURF_BEOS_RESOURCES := /boot/apps/netsurf/res/
-
- # Enable NetSurf's use of libsvgtiny for displaying SVGs
- # Valid options: YES, NO, AUTO
- NETSURF_USE_NSSVG := YES
-
- # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
- # Valid options: YES, NO, AUTO
- NETSURF_USE_ROSPRITE := AUTO
-
- # Enable NetSurf's use of libharu for PDF export.
- # Valid options: YES, NO
- NETSURF_USE_HARU_PDF := NO
-
- # Force using glibc internal iconv implementation instead of external libiconv
- # Valid options: YES, NO
- NETSURF_USE_LIBICONV_PLUG := NO
-
- # Optimisation levels
- CFLAGS += -O2
-
-endif
-
-# ----------------------------------------------------------------------------
-# Amiga-specific options
-# ----------------------------------------------------------------------------
-ifeq ($(TARGET),amiga)
-
- # Force using glibc internal iconv implementation instead of external libiconv
- # Valid options: YES, NO
- NETSURF_USE_LIBICONV_PLUG := YES
-
- # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
- # Valid options: YES, NO, AUTO
- NETSURF_USE_ROSPRITE := NO
-
- # Enable NetSurf's use of libmng for displaying MNGs, JNGs and PNGs
- # Valid options: YES, NO (at least one of PNG/MNG/DT highly recommended)
- NETSURF_USE_MNG := NO
-
- # Enable NetSurf's use of libwebp for displaying WebPs
- # Valid options: YES, NO
- NETSURF_USE_WEBP := NO
-
- # Enable NetSurf to display Amiga icons
- # Valid options: YES, NO (recommended)
- NETSURF_USE_AMIGA_ICON := YES
-
- # Enable NetSurf's use of DataTypes for unknown filetypes
- # Valid options: YES, NO
- NETSURF_USE_AMIGA_DATATYPES := YES
-
- # Enable NetSurf's use of libsvgtiny for displaying SVGs
- # Valid options: YES, NO
- NETSURF_USE_NSSVG := YES
-
- # Enable NetSurf's use of libcairo for some plotter functions
- # This will also link NetSurf with shared objects, and
- # requires AmigaOS 4.1 or higher to run the resulting executable
- # Valid options: YES, NO, AUTO
- NETSURF_USE_AMIGA_CAIRO := AUTO
-
- # Optimisation levels
- CFLAGS += -O2 -gstabs
-
-endif
-
-# ----------------------------------------------------------------------------
-# Framebuffer-target-specific options
-# ----------------------------------------------------------------------------
-ifeq ($(TARGET),framebuffer)
- # Optimisation levels
- CFLAGS += -O2
-
- # Framebuffer default surface provider.
- # Valid values are: x, sdl, linux, vnc, able,
- NETSURF_FB_FRONTEND := sdl
-
- # Use libharu to enable PDF export and GTK printing support.
- # Valid options: YES, NO
- NETSURF_USE_HARU_PDF := NO
-
- # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
- # Valid options: YES, NO, AUTO
- NETSURF_USE_ROSPRITE := AUTO
-
- # Library to use for font plotting
- # Valid options: internal, freetype
- NETSURF_FB_FONTLIB := internal
-
- # Default freetype font files
- NETSURF_FB_FONT_SANS_SERIF := DejaVuSans.ttf
- NETSURF_FB_FONT_SANS_SERIF_BOLD := DejaVuSans-Bold.ttf
- NETSURF_FB_FONT_SANS_SERIF_ITALIC := DejaVuSans-Oblique.ttf
- NETSURF_FB_FONT_SANS_SERIF_ITALIC_BOLD := DejaVuSans-BoldOblique.ttf
- NETSURF_FB_FONT_SERIF := DejaVuSerif.ttf
- NETSURF_FB_FONT_SERIF_BOLD := DejaVuSerif-Bold.ttf
- NETSURF_FB_FONT_MONOSPACE := DejaVuSansMono.ttf
- NETSURF_FB_FONT_MONOSPACE_BOLD := DejaVuSansMono-Bold.ttf
- NETSURF_FB_FONT_CURSIVE := Comic_Sans_MS.ttf
- NETSURF_FB_FONT_FANTASY := Impact.ttf
-
- # Default binary install path
- NETSURF_FRAMEBUFFER_BIN := $(PREFIX)/bin/
-
- # Default resource install path
- NETSURF_FRAMEBUFFER_RESOURCES := $(PREFIX)/share/netsurf/
-
- # Default framebuffer search path
- NETSURF_FB_RESPATH :=
$${HOME}/.netsurf/:$${NETSURFRES}:$(NETSURF_FRAMEBUFFER_RESOURCES):./framebuffer/res
-
- # freetype compiled in font serch path
- NETSURF_FB_FONTPATH :=
/usr/share/fonts/truetype/ttf-dejavu:/usr/share/fonts/truetype/msttcorefonts
-
-
-endif
-
-# ----------------------------------------------------------------------------
-# windows-specific options
-# ----------------------------------------------------------------------------
-ifeq ($(TARGET),windows)
-
- # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
- # Valid options: YES, NO, AUTO
- NETSURF_USE_ROSPRITE := NO
-
- # Enable NetSurf's use of libsvgtiny for displaying SVGs
- # Valid options: YES, NO
- NETSURF_USE_NSSVG := NO
-
- # Force using glibc internal iconv implementation instead of external libiconv
- # Valid options: YES, NO
- NETSURF_USE_LIBICONV_PLUG := NO
-
- # mng support does not currently build on windows
- NETSURF_USE_MNG := NO
-
- # no pdf support
- NETSURF_USE_HARU_PDF := NO
-
- # Optimisation levels
- CFLAGS += -O2
-
-endif
-
-# ----------------------------------------------------------------------------
-# Atari-specific options
-# ----------------------------------------------------------------------------
-ifeq ($(TARGET),atari)
-
- # Force using glibc internal iconv implementation instead of external libiconv
- # Valid options: YES, NO
- NETSURF_USE_LIBICONV_PLUG := NO
-
- # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
- # Valid options: YES, NO, AUTO
- NETSURF_USE_ROSPRITE := NO
-
- # Enable NetSurf's use of libwebp for displaying WebPs
- # Valid options: YES, NO
- NETSURF_USE_WEBP := NO
-
- # Enable NetSurf's use of librsvg in conjunction with Cairo to display SVGs
- # Valid options: YES, NO, AUTO
- NETSURF_USE_RSVG := AUTO
-
- # Enable NetSurf's use of libsvgtiny for displaying SVGs
- # Valid options: YES, NO, AUTO
- NETSURF_USE_NSSVG := AUTO
-
- NETSURF_USE_MNG := NO
-
- # enable true type fonts via freetype2
- # Valid options: YES, NO
- NETSURF_USE_ATARI_FREETYPE_FONT := YES
-
- # Enable use of netsurf embedded font
- # Valid options: YES, NO
- NETSURF_USE_ATARI_NETSURF_FONT := YES
-
- # Configure support for screen drivers with no true colour mode
- # Valid options: YES, NO
- NETSURF_USE_ATARI_8BPP_SUPPORT := NO
-
- # Configure the CPU target
- # Valid options: 68000, 68020-60, 5475 (coldfire)
- ATARI_ARCH = 68020-60
-
- # enable optimizations
- # -O2 is currently broken with m68000 / m68020-60 builds
- CFLAGS += -O1
-
- # override warning flags removing -Wall
- WARNFLAGS = -W -Wundef -Wpointer-arith \
- -Wcast-align -Wwrite-strings -Wstrict-prototypes \
- -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls \
- -Wnested-externs -Wuninitialized -Wl,-t
-
-endif
-
-# ----------------------------------------------------------------------------
-# Cocoa-specific options
-# ----------------------------------------------------------------------------
-ifeq ($(TARGET),cocoa)
-
- # Force using glibc internal iconv implementation instead of external libiconv
- # Valid options: YES, NO
- NETSURF_USE_LIBICONV_PLUG := NO
-
- # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
- # Valid options: YES, NO, AUTO
- NETSURF_USE_ROSPRITE := NO
-
- # Enable NetSurf's use of libwebp for displaying WebPs
- # Valid options: YES, NO
- NETSURF_USE_WEBP := NO
-
- # Enable NetSurf's use of librsvg in conjunction with Cairo to display SVGs
- # Valid options: YES, NO, AUTO
- NETSURF_USE_RSVG := AUTO
-
- # Enable NetSurf's use of libsvgtiny for displaying SVGs
- # Valid options: YES, NO, AUTO
- NETSURF_USE_NSSVG := AUTO
-
- NETSURF_USE_MNG := NO
- NETSURF_USE_BMP := NO
- NETSURF_USE_GIF := NO
- NETSURF_USE_PNG := NO
- NETSURF_USE_JPEG := NO
- NETSURF_USE_IMAGEIO := YES
-
- DEVELOPER_PATH := /Developer
- MACOSX_VERSION := 10.5
- SDK_VERSION := $(MACOSX_VERSION)
-
- # Optimisation levels
- CFLAGS += -O2
-
-endif
+# Incude defaults specific to a TARGET
+-include $(TARGET)/Makefile.defaults
# Include any local configuration
ifneq ($(MAKEFILE_DEFAULTS_FINISHED),)
diff --git a/amiga/Makefile.defaults b/amiga/Makefile.defaults
new file mode 100644
index 0000000..42bcb73
--- /dev/null
+++ b/amiga/Makefile.defaults
@@ -0,0 +1,40 @@
+# ----------------------------------------------------------------------------
+# Amiga-specific options
+# ----------------------------------------------------------------------------
+
+ # Force using glibc internal iconv implementation instead of external libiconv
+ # Valid options: YES, NO
+ NETSURF_USE_LIBICONV_PLUG := YES
+
+ # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_ROSPRITE := NO
+
+ # Enable NetSurf's use of libmng for displaying MNGs, JNGs and PNGs
+ # Valid options: YES, NO (at least one of PNG/MNG/DT highly recommended)
+ NETSURF_USE_MNG := NO
+
+ # Enable NetSurf's use of libwebp for displaying WebPs
+ # Valid options: YES, NO
+ NETSURF_USE_WEBP := NO
+
+ # Enable NetSurf to display Amiga icons
+ # Valid options: YES, NO (recommended)
+ NETSURF_USE_AMIGA_ICON := YES
+
+ # Enable NetSurf's use of DataTypes for unknown filetypes
+ # Valid options: YES, NO
+ NETSURF_USE_AMIGA_DATATYPES := YES
+
+ # Enable NetSurf's use of libsvgtiny for displaying SVGs
+ # Valid options: YES, NO
+ NETSURF_USE_NSSVG := YES
+
+ # Enable NetSurf's use of libcairo for some plotter functions
+ # This will also link NetSurf with shared objects, and
+ # requires AmigaOS 4.1 or higher to run the resulting executable
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_AMIGA_CAIRO := AUTO
+
+ # Optimisation levels
+ CFLAGS += -O2 -gstabs
diff --git a/atari/Makefile.defaults b/atari/Makefile.defaults
new file mode 100644
index 0000000..1503588
--- /dev/null
+++ b/atari/Makefile.defaults
@@ -0,0 +1,52 @@
+# ----------------------------------------------------------------------------
+# Atari-specific options
+# ----------------------------------------------------------------------------
+
+ # Force using glibc internal iconv implementation instead of external libiconv
+ # Valid options: YES, NO
+ NETSURF_USE_LIBICONV_PLUG := NO
+
+ # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_ROSPRITE := NO
+
+ # Enable NetSurf's use of libwebp for displaying WebPs
+ # Valid options: YES, NO
+ NETSURF_USE_WEBP := NO
+
+ # Enable NetSurf's use of librsvg in conjunction with Cairo to display SVGs
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_RSVG := AUTO
+
+ # Enable NetSurf's use of libsvgtiny for displaying SVGs
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_NSSVG := AUTO
+
+ NETSURF_USE_MNG := NO
+
+ # enable true type fonts via freetype2
+ # Valid options: YES, NO
+ NETSURF_USE_ATARI_FREETYPE_FONT := YES
+
+ # Enable use of netsurf embedded font
+ # Valid options: YES, NO
+ NETSURF_USE_ATARI_NETSURF_FONT := YES
+
+ # Configure support for screen drivers with no true colour mode
+ # Valid options: YES, NO
+ NETSURF_USE_ATARI_8BPP_SUPPORT := NO
+
+ # Configure the CPU target
+ # Valid options: 68000, 68020-60, 5475 (coldfire)
+ ATARI_ARCH = 68020-60
+
+ # enable optimizations
+ # -O2 is currently broken with m68000 / m68020-60 builds
+ CFLAGS += -O1
+
+ # override warning flags removing -Wall
+ WARNFLAGS = -W -Wundef -Wpointer-arith \
+ -Wcast-align -Wwrite-strings -Wstrict-prototypes \
+ -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls \
+ -Wnested-externs -Wuninitialized -Wl,-t
+
diff --git a/beos/Makefile.defaults b/beos/Makefile.defaults
new file mode 100644
index 0000000..d5bf6b3
--- /dev/null
+++ b/beos/Makefile.defaults
@@ -0,0 +1,32 @@
+# ----------------------------------------------------------------------------
+# BeOS-specific options
+# ----------------------------------------------------------------------------
+
+
+ # Where to install the netsurf binary
+ NETSURF_BEOS_BIN := /boot/apps/netsurf/
+
+ # TODO:HAIKU -- not sure if ~/.netsurf applies in beos
+ # Where to search for NetSurf's resources after looking in ~/.netsurf and
+ # $NETSURFRES. It must have a trailing /
+ NETSURF_BEOS_RESOURCES := /boot/apps/netsurf/res/
+
+ # Enable NetSurf's use of libsvgtiny for displaying SVGs
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_NSSVG := YES
+
+ # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_ROSPRITE := AUTO
+
+ # Enable NetSurf's use of libharu for PDF export.
+ # Valid options: YES, NO
+ NETSURF_USE_HARU_PDF := NO
+
+ # Force using glibc internal iconv implementation instead of external libiconv
+ # Valid options: YES, NO
+ NETSURF_USE_LIBICONV_PLUG := NO
+
+ # Optimisation levels
+ CFLAGS += -O2
+
diff --git a/cocoa/Makefile.defaults b/cocoa/Makefile.defaults
new file mode 100644
index 0000000..b2f64ec
--- /dev/null
+++ b/cocoa/Makefile.defaults
@@ -0,0 +1,37 @@
+# ----------------------------------------------------------------------------
+# Cocoa-specific options
+# ----------------------------------------------------------------------------
+
+ # Force using glibc internal iconv implementation instead of external libiconv
+ # Valid options: YES, NO
+ NETSURF_USE_LIBICONV_PLUG := NO
+
+ # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_ROSPRITE := NO
+
+ # Enable NetSurf's use of libwebp for displaying WebPs
+ # Valid options: YES, NO
+ NETSURF_USE_WEBP := NO
+
+ # Enable NetSurf's use of librsvg in conjunction with Cairo to display SVGs
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_RSVG := AUTO
+
+ # Enable NetSurf's use of libsvgtiny for displaying SVGs
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_NSSVG := AUTO
+
+ NETSURF_USE_MNG := NO
+ NETSURF_USE_BMP := NO
+ NETSURF_USE_GIF := NO
+ NETSURF_USE_PNG := NO
+ NETSURF_USE_JPEG := NO
+ NETSURF_USE_IMAGEIO := YES
+
+ DEVELOPER_PATH := /Developer
+ MACOSX_VERSION := 10.5
+ SDK_VERSION := $(MACOSX_VERSION)
+
+ # Optimisation levels
+ CFLAGS += -O2
diff --git a/framebuffer/Makefile.defaults b/framebuffer/Makefile.defaults
new file mode 100644
index 0000000..6e2a3d1
--- /dev/null
+++ b/framebuffer/Makefile.defaults
@@ -0,0 +1,47 @@
+# ----------------------------------------------------------------------------
+# Framebuffer-target-specific options
+# ----------------------------------------------------------------------------
+
+ # Optimisation levels
+ CFLAGS += -O2
+
+ # Framebuffer default surface provider.
+ # Valid values are: x, sdl, linux, vnc, able,
+ NETSURF_FB_FRONTEND := sdl
+
+ # Use libharu to enable PDF export and GTK printing support.
+ # Valid options: YES, NO
+ NETSURF_USE_HARU_PDF := NO
+
+ # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_ROSPRITE := AUTO
+
+ # Library to use for font plotting
+ # Valid options: internal, freetype
+ NETSURF_FB_FONTLIB := internal
+
+ # Default freetype font files
+ NETSURF_FB_FONT_SANS_SERIF := DejaVuSans.ttf
+ NETSURF_FB_FONT_SANS_SERIF_BOLD := DejaVuSans-Bold.ttf
+ NETSURF_FB_FONT_SANS_SERIF_ITALIC := DejaVuSans-Oblique.ttf
+ NETSURF_FB_FONT_SANS_SERIF_ITALIC_BOLD := DejaVuSans-BoldOblique.ttf
+ NETSURF_FB_FONT_SERIF := DejaVuSerif.ttf
+ NETSURF_FB_FONT_SERIF_BOLD := DejaVuSerif-Bold.ttf
+ NETSURF_FB_FONT_MONOSPACE := DejaVuSansMono.ttf
+ NETSURF_FB_FONT_MONOSPACE_BOLD := DejaVuSansMono-Bold.ttf
+ NETSURF_FB_FONT_CURSIVE := Comic_Sans_MS.ttf
+ NETSURF_FB_FONT_FANTASY := Impact.ttf
+
+ # Default binary install path
+ NETSURF_FRAMEBUFFER_BIN := $(PREFIX)/bin/
+
+ # Default resource install path
+ NETSURF_FRAMEBUFFER_RESOURCES := $(PREFIX)/share/netsurf/
+
+ # Default framebuffer search path
+ NETSURF_FB_RESPATH :=
$${HOME}/.netsurf/:$${NETSURFRES}:$(NETSURF_FRAMEBUFFER_RESOURCES):./framebuffer/res
+
+ # freetype compiled in font serch path
+ NETSURF_FB_FONTPATH :=
/usr/share/fonts/truetype/ttf-dejavu:/usr/share/fonts/truetype/msttcorefonts
+
diff --git a/gtk/Makefile.defaults b/gtk/Makefile.defaults
new file mode 100644
index 0000000..23d4c17
--- /dev/null
+++ b/gtk/Makefile.defaults
@@ -0,0 +1,34 @@
+# ----------------------------------------------------------------------------
+# GTK-specific options
+# ----------------------------------------------------------------------------
+
+ # Where to search for NetSurf's resources after looking in ~/.netsurf and
+ # $NETSURFRES. It must have a trailing /
+ NETSURF_GTK_RESOURCES := $(PREFIX)/share/netsurf/
+
+ # Where to install the netsurf binary
+ NETSURF_GTK_BIN := $(PREFIX)/bin/
+
+ # Enable NetSurf's use of librsvg in conjunction with Cairo to display SVGs
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_RSVG := AUTO
+
+ # Enable NetSurf's use of libsvgtiny for displaying SVGs
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_NSSVG := AUTO
+
+ # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_ROSPRITE := AUTO
+
+ # Configuration overrides for Mac OS X
+ ifeq ($(HOST),macosx)
+ NETSURF_USE_LIBICONV_PLUG := NO
+ NETSURF_USE_HARU_PDF := NO
+ endif
+
+ # Set default GTK version to build for (2 or 3)
+ NETSURF_GTK_MAJOR := 2
+
+ # Optimisation levels
+ CFLAGS += -O2
diff --git a/monkey/Makefile.defaults b/monkey/Makefile.defaults
new file mode 100644
index 0000000..659c1e3
--- /dev/null
+++ b/monkey/Makefile.defaults
@@ -0,0 +1,13 @@
+# ----------------------------------------------------------------------------
+# Monkey-specific options
+# ----------------------------------------------------------------------------
+
+ # How did I get mixed up with this fucking monkey anyhow?
+ NETSURF_MONKEY_RESOURCES := $(PREFIX)/share/netsurf/
+ NETSURF_MONKEY_BIN := $(PREFIX)/bin/
+ NETSURF_USE_RSVG := NO
+ NETSURF_USE_NSSVG := NO
+ NETSURF_USE_ROSPRITE := NO
+ NETSURF_USE_HARU_PDF := NO
+ NETSURF_USE_LIBICONV_PLUG := NO
+ CFLAGS += -O2
diff --git a/riscos/Makefile.defaults b/riscos/Makefile.defaults
new file mode 100644
index 0000000..f48024f
--- /dev/null
+++ b/riscos/Makefile.defaults
@@ -0,0 +1,31 @@
+# ----------------------------------------------------------------------------
+# RISC OS-specific options
+# ----------------------------------------------------------------------------
+
+ # Enable NetSurf's use of libsvgtiny for displaying SVGs
+ # Valid options: YES, NO
+ NETSURF_USE_NSSVG := YES
+
+ # Enable NetSurf's support for displaying RISC OS Draw files
+ # Valid options: YES, NO
+ NETSURF_USE_DRAW := YES
+
+ # Enable NetSurf's support for displaying RISC OS Sprites
+ # Valid options: YES, NO
+ NETSURF_USE_SPRITE := YES
+
+ # Enable NetSurf's use of AWRender for displaying ArtWorks files
+ # Valid options: YES, NO
+ NETSURF_USE_ARTWORKS := YES
+
+ # Enable NetSurf's support for the Acorn plugin protocol
+ # Valid options: YES, NO
+ NETSURF_USE_PLUGINS := NO
+
+ # Enable NetSurf's use of pencil for Drawfile export
+ # Valid options: YES, NO
+ NETSURF_USE_DRAW_EXPORT := YES
+
+ # Optimisation levels
+ CFLAGS += -O2
+
diff --git a/windows/Makefile.defaults b/windows/Makefile.defaults
new file mode 100644
index 0000000..68fb7af
--- /dev/null
+++ b/windows/Makefile.defaults
@@ -0,0 +1,24 @@
+# ----------------------------------------------------------------------------
+# windows-specific options
+# ----------------------------------------------------------------------------
+
+ # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_ROSPRITE := NO
+
+ # Enable NetSurf's use of libsvgtiny for displaying SVGs
+ # Valid options: YES, NO
+ NETSURF_USE_NSSVG := NO
+
+ # Force using glibc internal iconv implementation instead of external libiconv
+ # Valid options: YES, NO
+ NETSURF_USE_LIBICONV_PLUG := NO
+
+ # mng support does not currently build on windows
+ NETSURF_USE_MNG := NO
+
+ # no pdf support
+ NETSURF_USE_HARU_PDF := NO
+
+ # Optimisation levels
+ CFLAGS += -O2
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/fa6e1379d0cc8c904c6...
commit fa6e1379d0cc8c904c60251eee55d58dabf60784
Author: Vincent Sanders <vince(a)netsurf-browser.org>
Commit: Vincent Sanders <vince(a)netsurf-browser.org>
move the cut n pasted -Wuninitialized from Makefile.config alongside
all the other warning flags in the standard location
diff --git a/Makefile b/Makefile
index 91f3aac..a1c6e5d 100644
--- a/Makefile
+++ b/Makefile
@@ -400,7 +400,7 @@ endef
WARNFLAGS = -W -Wall -Wundef -Wpointer-arith \
-Wcast-align -Wwrite-strings -Wstrict-prototypes \
-Wmissing-prototypes -Wmissing-declarations -Wredundant-decls \
- -Wnested-externs
+ -Wnested-externs -Wuninitialized
ifneq ($(GCCVER),2)
WARNFLAGS += -Wno-unused-parameter
endif
diff --git a/Makefile.defaults b/Makefile.defaults
index 5633dd2..7e97c6e 100644
--- a/Makefile.defaults
+++ b/Makefile.defaults
@@ -128,7 +128,7 @@ ifeq ($(TARGET),riscos)
NETSURF_USE_DRAW_EXPORT := YES
# Optimisation levels
- CFLAGS += -O2 -Wuninitialized
+ CFLAGS += -O2
endif
@@ -166,7 +166,7 @@ ifeq ($(TARGET),gtk)
NETSURF_GTK_MAJOR := 2
# Optimisation levels
- CFLAGS += -O2 -Wuninitialized
+ CFLAGS += -O2
endif
@@ -182,7 +182,7 @@ ifeq ($(TARGET),monkey)
NETSURF_USE_ROSPRITE := NO
NETSURF_USE_HARU_PDF := NO
NETSURF_USE_LIBICONV_PLUG := NO
- CFLAGS += -O2 -Wuninitialized
+ CFLAGS += -O2
endif
# ----------------------------------------------------------------------------
@@ -216,7 +216,7 @@ ifeq ($(TARGET),beos)
NETSURF_USE_LIBICONV_PLUG := NO
# Optimisation levels
- CFLAGS += -O2 -Wuninitialized
+ CFLAGS += -O2
endif
@@ -260,7 +260,7 @@ ifeq ($(TARGET),amiga)
NETSURF_USE_AMIGA_CAIRO := AUTO
# Optimisation levels
- CFLAGS += -O2 -Wuninitialized -gstabs
+ CFLAGS += -O2 -gstabs
endif
@@ -269,7 +269,7 @@ endif
# ----------------------------------------------------------------------------
ifeq ($(TARGET),framebuffer)
# Optimisation levels
- CFLAGS += -O2 -Wuninitialized
+ CFLAGS += -O2
# Framebuffer default surface provider.
# Valid values are: x, sdl, linux, vnc, able,
@@ -338,7 +338,7 @@ ifeq ($(TARGET),windows)
NETSURF_USE_HARU_PDF := NO
# Optimisation levels
- CFLAGS += -O2 -Wuninitialized
+ CFLAGS += -O2
endif
@@ -366,7 +366,7 @@ ifeq ($(TARGET),atari)
# Enable NetSurf's use of libsvgtiny for displaying SVGs
# Valid options: YES, NO, AUTO
NETSURF_USE_NSSVG := AUTO
-
+
NETSURF_USE_MNG := NO
# enable true type fonts via freetype2
@@ -387,12 +387,13 @@ ifeq ($(TARGET),atari)
# enable optimizations
# -O2 is currently broken with m68000 / m68020-60 builds
- CFLAGS += -O1 -Wuninitialized
+ CFLAGS += -O1
+ # override warning flags removing -Wall
WARNFLAGS = -W -Wundef -Wpointer-arith \
-Wcast-align -Wwrite-strings -Wstrict-prototypes \
-Wmissing-prototypes -Wmissing-declarations -Wredundant-decls \
- -Wnested-externs -Wl,-t
+ -Wnested-externs -Wuninitialized -Wl,-t
endif
@@ -420,7 +421,7 @@ ifeq ($(TARGET),cocoa)
# Enable NetSurf's use of libsvgtiny for displaying SVGs
# Valid options: YES, NO, AUTO
NETSURF_USE_NSSVG := AUTO
-
+
NETSURF_USE_MNG := NO
NETSURF_USE_BMP := NO
NETSURF_USE_GIF := NO
@@ -433,7 +434,7 @@ ifeq ($(TARGET),cocoa)
SDK_VERSION := $(MACOSX_VERSION)
# Optimisation levels
- CFLAGS += -O2 -Wuninitialized
+ CFLAGS += -O2
endif
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/16d67095a6731f329ba...
commit 16d67095a6731f329bad971985e8983cdc054efe
Author: Vincent Sanders <vince(a)netsurf-browser.org>
Commit: Vincent Sanders <vince(a)netsurf-browser.org>
add pkg-config macro for libraries which are not controled by configuration
diff --git a/Makefile b/Makefile
index d8ce8a6..91f3aac 100644
--- a/Makefile
+++ b/Makefile
@@ -318,6 +318,31 @@ endef
# Extend flags with appropriate values from pkg-config for enabled features
#
+# 1: pkg-config required modules for feature
+# 2: Human-readable name for the feature
+define pkg_config_find_and_add
+ ifeq ($$(PKG_CONFIG),)
+ $$(error pkg-config is required to auto-detect feature availability)
+ endif
+
+ PKG_CONFIG_$(1)_EXISTS := $$(shell $$(PKG_CONFIG) --exists $(1) && echo yes)
+
+ ifeq ($$(PKG_CONFIG_$(1)_EXISTS),yes)
+ CFLAGS += $$(shell $$(PKG_CONFIG) --cflags $(1))
+ LDFLAGS += $$(shell $$(PKG_CONFIG) --libs $(1))
+ ifneq ($(MAKECMDGOALS),clean)
+ $$(info PKG.CNFG: $(2) ($(1)) enabled)
+ endif
+ else
+ ifneq ($(MAKECMDGOALS),clean)
+ $$(info PKG.CNFG: $(2) ($(1)) failed)
+ $$(error Unable to find library for: $(2) ($(1)))
+ endif
+ endif
+endef
+
+# Extend flags with appropriate values from pkg-config for enabled features
+#
# 1: Feature name (ie, NETSURF_USE_RSVG -> RSVG)
# 2: pkg-config required modules for feature
# 3: Human-readable name for the feature
diff --git a/gtk/Makefile.target b/gtk/Makefile.target
index 3da4346..f9b5436 100644
--- a/gtk/Makefile.target
+++ b/gtk/Makefile.target
@@ -7,9 +7,6 @@
# GTK flag setup (using pkg-config)
# ----------------------------------------------------------------------------
-LDFLAGS += $(shell $(PKG_CONFIG) --libs libcurl libdom libcss)
-LDFLAGS += $(shell $(PKG_CONFIG) --libs openssl)
-
# define additional CFLAGS and LDFLAGS requirements for pkg-configed libs here
NETSURF_FEATURE_RSVG_CFLAGS := -DWITH_RSVG
NETSURF_FEATURE_NSSVG_CFLAGS := -DWITH_NS_SVG
@@ -24,7 +21,7 @@ NETSURF_FEATURE_VIDEO_CFLAGS := -DWITH_VIDEO
# add a line similar to below for each optional lib here
# note: webp lacks pkg-config file
-$(eval $(call pkg_config_find_and_add_enabled,PNG,libpng,PNG ))
+$(eval $(call pkg_config_find_and_add_enabled,PNG,libpng,PNG))
$(eval $(call pkg_config_find_and_add_enabled,BMP,libnsbmp,BMP))
$(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF))
$(eval $(call pkg_config_find_and_add_enabled,RSVG,librsvg-2.0,SVG))
@@ -54,16 +51,22 @@ GTKCFLAGS := -std=c99 -Dgtk -Dnsgtk \
-D_POSIX_C_SOURCE=200112L \
-D_NETBSD_SOURCE \
-DGTK_RESPATH=\"$(NETSURF_GTK_RESOURCES)\" \
- $(WARNFLAGS) -I. -g \
- $(shell $(PKG_CONFIG) --cflags gtk+-$(NETSURF_GTK_MAJOR).0) \
- $(shell $(PKG_CONFIG) --cflags libhubbub libcurl) \
- $(shell $(PKG_CONFIG) --cflags openssl) \
- $(shell xml2-config --cflags)
+ $(WARNFLAGS) -I. -g
+
+# non optional pkg-configed libs
+$(eval $(call pkg_config_find_and_add,libcss,CSS))
+$(eval $(call pkg_config_find_and_add,libdom,DOM))
+$(eval $(call pkg_config_find_and_add,libhubbub,Hubbub))
+$(eval $(call pkg_config_find_and_add,openssl,OpenSSL))
+$(eval $(call pkg_config_find_and_add,libcurl,Curl ))
+$(eval $(call
pkg_config_find_and_add,gtk+-$(NETSURF_GTK_MAJOR).0,GTK-$(NETSURF_GTK_MAJOR)))
+$(eval $(call pkg_config_find_and_add,gthread-2.0,GThread2))
+$(eval $(call pkg_config_find_and_add,gmodule-2.0,GModule2))
+$(eval $(call pkg_config_find_and_add,lcms,lcms))
-GTKLDFLAGS := $(shell $(PKG_CONFIG) --cflags --libs gtk+-$(NETSURF_GTK_MAJOR).0
gthread-2.0 gmodule-2.0 lcms)
CFLAGS += $(GTKCFLAGS)
-LDFLAGS += -lm $(GTKLDFLAGS)
+LDFLAGS += -lm
# ---------------------------------------------------------------------------
# Windows flag setup
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/45906b9dc2c87181f35...
commit 45906b9dc2c87181f359289abc034f84b44947c4
Author: Vincent Sanders <vince(a)netsurf-browser.org>
Commit: Vincent Sanders <vince(a)netsurf-browser.org>
make macro name more correct
diff --git a/Makefile b/Makefile
index 9cfc484..d8ce8a6 100644
--- a/Makefile
+++ b/Makefile
@@ -316,10 +316,12 @@ define feature_enabled
endif
endef
+# Extend flags with appropriate values from pkg-config for enabled features
+#
# 1: Feature name (ie, NETSURF_USE_RSVG -> RSVG)
# 2: pkg-config required modules for feature
# 3: Human-readable name for the feature
-define pkg_config_find_and_add
+define pkg_config_find_and_add_enabled
ifeq ($$(PKG_CONFIG),)
$$(error pkg-config is required to auto-detect feature availability)
endif
diff --git a/amiga/Makefile.target b/amiga/Makefile.target
index af4b0bd..ec43fdd 100644
--- a/amiga/Makefile.target
+++ b/amiga/Makefile.target
@@ -41,12 +41,12 @@ ifeq ($(HOST),amiga)
LDFLAGS += -use-dynld -ldl -lcairo -lpixman-1 -lfreetype -lfontconfig -lpng -lexpat
endif
else
- $(eval $(call pkg_config_find_and_add,ROSPRITE,librosprite,Sprite))
- $(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
- $(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
- $(eval $(call pkg_config_find_and_add,PNG,libpng,PNG))
- $(eval $(call pkg_config_find_and_add,NSSVG,libsvgtiny,NSSVG))
- $(eval $(call pkg_config_find_and_add,AMIGA_CAIRO,cairo,Cairo))
+ $(eval $(call pkg_config_find_and_add_enabled,ROSPRITE,librosprite,Sprite))
+ $(eval $(call pkg_config_find_and_add_enabled,BMP,libnsbmp,BMP))
+ $(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF))
+ $(eval $(call pkg_config_find_and_add_enabled,PNG,libpng,PNG))
+ $(eval $(call pkg_config_find_and_add_enabled,NSSVG,libsvgtiny,NSSVG))
+ $(eval $(call pkg_config_find_and_add_enabled,AMIGA_CAIRO,cairo,Cairo))
$(eval $(call feature_enabled,AMIGA_ICON,-DWITH_AMIGA_ICON,,Amiga icon))
$(eval $(call feature_enabled,AMIGA_DATATYPES,-DWITH_AMIGA_DATATYPES,,DataTypes))
diff --git a/atari/Makefile.target b/atari/Makefile.target
index ad90807..7f05734 100644
--- a/atari/Makefile.target
+++ b/atari/Makefile.target
@@ -55,8 +55,8 @@ NETSURF_USE_JS:=YES
NETSURF_USE_MOZJS:=YES
endif
-$(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
-$(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
+$(eval $(call pkg_config_find_and_add_enabled,BMP,libnsbmp,BMP))
+$(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF))
CFLAGS += -U__STRICT_ANSI__ -std=c99 -I. -Dsmall $(WARNFLAGS) -Dnsatari \
-D_BSD_SOURCE \
diff --git a/beos/Makefile.target b/beos/Makefile.target
index 27981be..9a7e79a 100644
--- a/beos/Makefile.target
+++ b/beos/Makefile.target
@@ -78,9 +78,9 @@
NETSURF_FEATURE_BMP_CFLAGS := -DWITH_BMP
NETSURF_FEATURE_GIF_CFLAGS := -DWITH_GIF
NETSURF_FEATURE_PNG_CFLAGS := -DWITH_PNG
- $(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
- $(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
- $(eval $(call pkg_config_find_and_add,PNG,libpng,PNG ))
+ $(eval $(call pkg_config_find_and_add_enabled,BMP,libnsbmp,BMP))
+ $(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF))
+ $(eval $(call pkg_config_find_and_add_enabled,PNG,libpng,PNG ))
endif
# ----------------------------------------------------------------------------
diff --git a/cocoa/Makefile.target b/cocoa/Makefile.target
index 27f3b08..d975a0c 100644
--- a/cocoa/Makefile.target
+++ b/cocoa/Makefile.target
@@ -53,10 +53,10 @@ endif
NETSURF_FEATURE_PNG_CFLAGS := -DWITH_PNG
NETSURF_FEATURE_NSSVG_CFLAGS := -DWITH_NS_SVG
- $(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
- $(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
- $(eval $(call pkg_config_find_and_add,PNG,libpng,PNG))
- $(eval $(call pkg_config_find_and_add,NSSVG,libsvgtiny,SVG))
+ $(eval $(call pkg_config_find_and_add_enabled,BMP,libnsbmp,BMP))
+ $(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF))
+ $(eval $(call pkg_config_find_and_add_enabled,PNG,libpng,PNG))
+ $(eval $(call pkg_config_find_and_add_enabled,NSSVG,libsvgtiny,SVG))
$(eval $(call feature_enabled,IMAGEIO,-DWITH_APPLE_IMAGE,,Apple ImageIO ))
ifneq ($(UNIVERSAL),)
diff --git a/framebuffer/Makefile.target b/framebuffer/Makefile.target
index f554997..f3d91de 100644
--- a/framebuffer/Makefile.target
+++ b/framebuffer/Makefile.target
@@ -38,11 +38,11 @@ CFLAGS +=
'-DNETSURF_FB_FONT_MONOSPACE_BOLD="$(NETSURF_FB_FONT_MONOSPACE_BOLD)"'
CFLAGS += '-DNETSURF_FB_FONT_CURSIVE="$(NETSURF_FB_FONT_CURSIVE)"'
CFLAGS += '-DNETSURF_FB_FONT_FANTASY="$(NETSURF_FB_FONT_FANTASY)"'
-$(eval $(call pkg_config_find_and_add,ROSPRITE,librosprite,Sprite))
-$(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
-$(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
-$(eval $(call pkg_config_find_and_add,MOZJS,mozjs185,JavaScript))
-$(eval $(call pkg_config_find_and_add,JS,mozilla-js,JavaScript))
+$(eval $(call pkg_config_find_and_add_enabled,ROSPRITE,librosprite,Sprite))
+$(eval $(call pkg_config_find_and_add_enabled,BMP,libnsbmp,BMP))
+$(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF))
+$(eval $(call pkg_config_find_and_add_enabled,MOZJS,mozjs185,JavaScript))
+$(eval $(call pkg_config_find_and_add_enabled,JS,mozilla-js,JavaScript))
CFLAGS += -std=c99 -g -I. -Dsmall $(WARNFLAGS) \
-D_BSD_SOURCE \
diff --git a/gtk/Makefile.target b/gtk/Makefile.target
index 1b2bef5..3da4346 100644
--- a/gtk/Makefile.target
+++ b/gtk/Makefile.target
@@ -24,16 +24,16 @@ NETSURF_FEATURE_VIDEO_CFLAGS := -DWITH_VIDEO
# add a line similar to below for each optional lib here
# note: webp lacks pkg-config file
-$(eval $(call pkg_config_find_and_add,PNG,libpng,PNG ))
-$(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
-$(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
-$(eval $(call pkg_config_find_and_add,RSVG,librsvg-2.0,SVG))
-$(eval $(call pkg_config_find_and_add,NSSVG,libsvgtiny,SVG))
-$(eval $(call pkg_config_find_and_add,ROSPRITE,librosprite,Sprite))
+$(eval $(call pkg_config_find_and_add_enabled,PNG,libpng,PNG ))
+$(eval $(call pkg_config_find_and_add_enabled,BMP,libnsbmp,BMP))
+$(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF))
+$(eval $(call pkg_config_find_and_add_enabled,RSVG,librsvg-2.0,SVG))
+$(eval $(call pkg_config_find_and_add_enabled,NSSVG,libsvgtiny,SVG))
+$(eval $(call pkg_config_find_and_add_enabled,ROSPRITE,librosprite,Sprite))
$(eval $(call feature_enabled,WEBP,-DWITH_WEBP,-lwebp,WebP (libwebp)))
-$(eval $(call pkg_config_find_and_add,MOZJS,mozjs185,JavaScript))
-$(eval $(call pkg_config_find_and_add,JS,mozilla-js,JavaScript))
-$(eval $(call pkg_config_find_and_add,VIDEO,gstreamer-0.10,Video))
+$(eval $(call pkg_config_find_and_add_enabled,MOZJS,mozjs185,JavaScript))
+$(eval $(call pkg_config_find_and_add_enabled,JS,mozilla-js,JavaScript))
+$(eval $(call pkg_config_find_and_add_enabled,VIDEO,gstreamer-0.10,Video))
# GTK and GLIB flags to disable depricated usage
GTKDEPFLAGS := -DG_DISABLE_SINGLE_INCLUDES \
diff --git a/monkey/Makefile.target b/monkey/Makefile.target
index d43fe8d..4e8ac81 100644
--- a/monkey/Makefile.target
+++ b/monkey/Makefile.target
@@ -22,17 +22,20 @@ NETSURF_FEATURE_JS_CFLAGS := -DWITH_JS -DJS_HAS_FILE_OBJECT=0
NETSURF_FEATURE_MOZJS_CFLAGS := -DWITH_MOZJS -DJS_HAS_FILE_OBJECT=0
# add a line similar to below for each optional pkg-configed lib here
-$(eval $(call pkg_config_find_and_add,NSSVG,libsvgtiny,SVG))
-$(eval $(call pkg_config_find_and_add,ROSPRITE,librosprite,Sprite))
-$(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
-$(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
-$(eval $(call pkg_config_find_and_add,PNG,libpng,PNG ))
-$(eval $(call pkg_config_find_and_add,MOZJS,mozjs185,JavaScript))
-$(eval $(call pkg_config_find_and_add,JS,mozilla-js,JavaScript))
+$(eval $(call pkg_config_find_and_add_enabled,NSSVG,libsvgtiny,SVG))
+$(eval $(call pkg_config_find_and_add_enabled,ROSPRITE,librosprite,Sprite))
+$(eval $(call pkg_config_find_and_add_enabled,BMP,libnsbmp,BMP))
+$(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF))
+$(eval $(call pkg_config_find_and_add_enabled,PNG,libpng,PNG ))
+$(eval $(call pkg_config_find_and_add_enabled,MOZJS,mozjs185,JavaScript))
+$(eval $(call pkg_config_find_and_add_enabled,JS,mozilla-js,JavaScript))
# no pkg-config for this library
$(eval $(call feature_enabled,WEBP,-DWITH_WEBP,-lwebp -lvpx,WebP (libwebp)))
+#-Wno-unused-but-set-variable
+WARNFLAGS += -Werror
+
MONKEYCFLAGS := -std=c99 -Dmonkey -Dnsmonkey \
-D_BSD_SOURCE \
-D_XOPEN_SOURCE=600 \
@@ -47,19 +50,17 @@ MONKEYCFLAGS := -std=c99 -Dmonkey -Dnsmonkey \
MONKEYLDFLAGS := -lm $(shell $(PKG_CONFIG) --cflags --libs glib-2.0 lcms)
-MONKEYWARNFLAGS := -Werror
-#-Wno-unused-but-set-variable
-CFLAGS += $(MONKEYCFLAGS) $(MONKEYWARNFLAGS)
+CFLAGS += $(MONKEYCFLAGS)
LDFLAGS += $(MONKEYLDFLAGS)
- # ---------------------------------------------------------------------------
- # Windows flag setup
- # ---------------------------------------------------------------------------
+# ---------------------------------------------------------------------------
+# Windows flag setup
+# ---------------------------------------------------------------------------
- ifeq ($(HOST),Windows_NT)
- CFLAGS += -U__STRICT_ANSI__
- endif
+ifeq ($(HOST),Windows_NT)
+ CFLAGS += -U__STRICT_ANSI__
+endif
# ----------------------------------------------------------------------------
# Source file setup
diff --git a/riscos/Makefile.target b/riscos/Makefile.target
index bc09b7f..e7370e7 100644
--- a/riscos/Makefile.target
+++ b/riscos/Makefile.target
@@ -30,11 +30,11 @@ else
NETSURF_FEATURE_PNG_CFLAGS := -DWITH_PNG
NETSURF_FEATURE_JS_CFLAGS := -DWITH_JS -DJS_HAS_FILE_OBJECT=0
NETSURF_FEATURE_MOZJS_CFLAGS := -DWITH_MOZJS -DJS_HAS_FILE_OBJECT=0
- $(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
- $(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
- $(eval $(call pkg_config_find_and_add,PNG,libpng,PNG ))
- $(eval $(call pkg_config_find_and_add,MOZJS,mozjs185,JavaScript))
- $(eval $(call pkg_config_find_and_add,JS,mozilla-js,JavaScript))
+ $(eval $(call pkg_config_find_and_add_enabled,BMP,libnsbmp,BMP))
+ $(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF))
+ $(eval $(call pkg_config_find_and_add_enabled,PNG,libpng,PNG ))
+ $(eval $(call pkg_config_find_and_add_enabled,MOZJS,mozjs185,JavaScript))
+ $(eval $(call pkg_config_find_and_add_enabled,JS,mozilla-js,JavaScript))
endif
TPD_RISCOS = $(foreach TPL,$(notdir $(TPL_RISCOS)), \
-----------------------------------------------------------------------
Summary of changes:
Makefile | 45 +++++-
Makefile.defaults | 340 +----------------------------------------
Makefile.sources.javascript | 1 -
amiga/Makefile.defaults | 40 +++++
amiga/Makefile.target | 12 +-
atari/Makefile.defaults | 52 +++++++
atari/Makefile.target | 4 +-
beos/Makefile.defaults | 32 ++++
beos/Makefile.target | 6 +-
cocoa/Makefile.defaults | 37 +++++
cocoa/Makefile.target | 8 +-
framebuffer/Makefile.defaults | 47 ++++++
framebuffer/Makefile.target | 10 +-
gtk/Makefile.defaults | 34 ++++
gtk/Makefile.target | 41 +++---
monkey/Makefile.defaults | 13 ++
monkey/Makefile.target | 32 ++--
riscos/Makefile.defaults | 31 ++++
riscos/Makefile.target | 10 +-
windows/Makefile.defaults | 24 +++
20 files changed, 416 insertions(+), 403 deletions(-)
create mode 100644 amiga/Makefile.defaults
create mode 100644 atari/Makefile.defaults
create mode 100644 beos/Makefile.defaults
create mode 100644 cocoa/Makefile.defaults
create mode 100644 framebuffer/Makefile.defaults
create mode 100644 gtk/Makefile.defaults
create mode 100644 monkey/Makefile.defaults
create mode 100644 riscos/Makefile.defaults
create mode 100644 windows/Makefile.defaults
diff --git a/Makefile b/Makefile
index 9cfc484..1f83cba 100644
--- a/Makefile
+++ b/Makefile
@@ -71,7 +71,7 @@ else
TARGET := beos
endif
# BeOS still uses gcc2
- GCCVER := 2
+ CC_MAJOR := 2
else
ifeq ($(HOST),AmigaOS)
HOST := amiga
@@ -282,6 +282,12 @@ else
endif
endif
+# compiler versioning to adjust warning flags
+CC_MAJOR := $(shell $(CC) -dumpversion | cut -f1 -d. )
+CC_MINOR := $(shell $(CC) -dumpversion | cut -f2 -d. )
+define cc_ver_ge
+$(shell expr $(CC_MAJOR) \>= $(1) \& $(CC_MINOR) \>= $(2))
+endef
# CCACHE
ifeq ($(origin CCACHE),undefined)
@@ -316,10 +322,37 @@ define feature_enabled
endif
endef
+# Extend flags with appropriate values from pkg-config for enabled features
+#
+# 1: pkg-config required modules for feature
+# 2: Human-readable name for the feature
+define pkg_config_find_and_add
+ ifeq ($$(PKG_CONFIG),)
+ $$(error pkg-config is required to auto-detect feature availability)
+ endif
+
+ PKG_CONFIG_$(1)_EXISTS := $$(shell $$(PKG_CONFIG) --exists $(1) && echo yes)
+
+ ifeq ($$(PKG_CONFIG_$(1)_EXISTS),yes)
+ CFLAGS += $$(shell $$(PKG_CONFIG) --cflags $(1))
+ LDFLAGS += $$(shell $$(PKG_CONFIG) --libs $(1))
+ ifneq ($(MAKECMDGOALS),clean)
+ $$(info PKG.CNFG: $(2) ($(1)) enabled)
+ endif
+ else
+ ifneq ($(MAKECMDGOALS),clean)
+ $$(info PKG.CNFG: $(2) ($(1)) failed)
+ $$(error Unable to find library for: $(2) ($(1)))
+ endif
+ endif
+endef
+
+# Extend flags with appropriate values from pkg-config for enabled features
+#
# 1: Feature name (ie, NETSURF_USE_RSVG -> RSVG)
# 2: pkg-config required modules for feature
# 3: Human-readable name for the feature
-define pkg_config_find_and_add
+define pkg_config_find_and_add_enabled
ifeq ($$(PKG_CONFIG),)
$$(error pkg-config is required to auto-detect feature availability)
endif
@@ -373,10 +406,14 @@ endef
WARNFLAGS = -W -Wall -Wundef -Wpointer-arith \
-Wcast-align -Wwrite-strings -Wstrict-prototypes \
-Wmissing-prototypes -Wmissing-declarations -Wredundant-decls \
- -Wnested-externs
-ifneq ($(GCCVER),2)
+ -Wnested-externs -Wuninitialized
+ifneq ($(CC_MAJOR),2)
WARNFLAGS += -Wno-unused-parameter
endif
+# deal with lots of unwanted warnings from javascript
+ifeq ($(call cc_ver_ge,4,6),1)
+ WARNFLAGS += -Wno-unused-but-set-variable
+endif
# Pull in the configuration
include Makefile.defaults
diff --git a/Makefile.defaults b/Makefile.defaults
index 5633dd2..812a5a9 100644
--- a/Makefile.defaults
+++ b/Makefile.defaults
@@ -98,344 +98,8 @@ CFLAGS :=
# Default installation/execution prefix
PREFIX ?= /usr/local
-# ----------------------------------------------------------------------------
-# RISC OS-specific options
-# ----------------------------------------------------------------------------
-ifeq ($(TARGET),riscos)
-
- # Enable NetSurf's use of libsvgtiny for displaying SVGs
- # Valid options: YES, NO
- NETSURF_USE_NSSVG := YES
-
- # Enable NetSurf's support for displaying RISC OS Draw files
- # Valid options: YES, NO
- NETSURF_USE_DRAW := YES
-
- # Enable NetSurf's support for displaying RISC OS Sprites
- # Valid options: YES, NO
- NETSURF_USE_SPRITE := YES
-
- # Enable NetSurf's use of AWRender for displaying ArtWorks files
- # Valid options: YES, NO
- NETSURF_USE_ARTWORKS := YES
-
- # Enable NetSurf's support for the Acorn plugin protocol
- # Valid options: YES, NO
- NETSURF_USE_PLUGINS := NO
-
- # Enable NetSurf's use of pencil for Drawfile export
- # Valid options: YES, NO
- NETSURF_USE_DRAW_EXPORT := YES
-
- # Optimisation levels
- CFLAGS += -O2 -Wuninitialized
-
-endif
-
-# ----------------------------------------------------------------------------
-# GTK-specific options
-# ----------------------------------------------------------------------------
-ifeq ($(TARGET),gtk)
-
- # Where to search for NetSurf's resources after looking in ~/.netsurf and
- # $NETSURFRES. It must have a trailing /
- NETSURF_GTK_RESOURCES := $(PREFIX)/share/netsurf/
-
- # Where to install the netsurf binary
- NETSURF_GTK_BIN := $(PREFIX)/bin/
-
- # Enable NetSurf's use of librsvg in conjunction with Cairo to display SVGs
- # Valid options: YES, NO, AUTO
- NETSURF_USE_RSVG := AUTO
-
- # Enable NetSurf's use of libsvgtiny for displaying SVGs
- # Valid options: YES, NO, AUTO
- NETSURF_USE_NSSVG := AUTO
-
- # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
- # Valid options: YES, NO, AUTO
- NETSURF_USE_ROSPRITE := AUTO
-
- # Configuration overrides for Mac OS X
- ifeq ($(HOST),macosx)
- NETSURF_USE_LIBICONV_PLUG := NO
- NETSURF_USE_HARU_PDF := NO
- endif
-
- # Set default GTK version to build for (2 or 3)
- NETSURF_GTK_MAJOR := 2
-
- # Optimisation levels
- CFLAGS += -O2 -Wuninitialized
-
-endif
-
-# ----------------------------------------------------------------------------
-# Monkey-specific options
-# ----------------------------------------------------------------------------
-ifeq ($(TARGET),monkey)
- # How did I get mixed up with this fucking monkey anyhow?
- NETSURF_MONKEY_RESOURCES := $(PREFIX)/share/netsurf/
- NETSURF_MONKEY_BIN := $(PREFIX)/bin/
- NETSURF_USE_RSVG := NO
- NETSURF_USE_NSSVG := NO
- NETSURF_USE_ROSPRITE := NO
- NETSURF_USE_HARU_PDF := NO
- NETSURF_USE_LIBICONV_PLUG := NO
- CFLAGS += -O2 -Wuninitialized
-endif
-
-# ----------------------------------------------------------------------------
-# BeOS-specific options
-# ----------------------------------------------------------------------------
-ifeq ($(TARGET),beos)
-
-
- # Where to install the netsurf binary
- NETSURF_BEOS_BIN := /boot/apps/netsurf/
-
- # TODO:HAIKU -- not sure if ~/.netsurf applies in beos
- # Where to search for NetSurf's resources after looking in ~/.netsurf and
- # $NETSURFRES. It must have a trailing /
- NETSURF_BEOS_RESOURCES := /boot/apps/netsurf/res/
-
- # Enable NetSurf's use of libsvgtiny for displaying SVGs
- # Valid options: YES, NO, AUTO
- NETSURF_USE_NSSVG := YES
-
- # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
- # Valid options: YES, NO, AUTO
- NETSURF_USE_ROSPRITE := AUTO
-
- # Enable NetSurf's use of libharu for PDF export.
- # Valid options: YES, NO
- NETSURF_USE_HARU_PDF := NO
-
- # Force using glibc internal iconv implementation instead of external libiconv
- # Valid options: YES, NO
- NETSURF_USE_LIBICONV_PLUG := NO
-
- # Optimisation levels
- CFLAGS += -O2 -Wuninitialized
-
-endif
-
-# ----------------------------------------------------------------------------
-# Amiga-specific options
-# ----------------------------------------------------------------------------
-ifeq ($(TARGET),amiga)
-
- # Force using glibc internal iconv implementation instead of external libiconv
- # Valid options: YES, NO
- NETSURF_USE_LIBICONV_PLUG := YES
-
- # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
- # Valid options: YES, NO, AUTO
- NETSURF_USE_ROSPRITE := NO
-
- # Enable NetSurf's use of libmng for displaying MNGs, JNGs and PNGs
- # Valid options: YES, NO (at least one of PNG/MNG/DT highly recommended)
- NETSURF_USE_MNG := NO
-
- # Enable NetSurf's use of libwebp for displaying WebPs
- # Valid options: YES, NO
- NETSURF_USE_WEBP := NO
-
- # Enable NetSurf to display Amiga icons
- # Valid options: YES, NO (recommended)
- NETSURF_USE_AMIGA_ICON := YES
-
- # Enable NetSurf's use of DataTypes for unknown filetypes
- # Valid options: YES, NO
- NETSURF_USE_AMIGA_DATATYPES := YES
-
- # Enable NetSurf's use of libsvgtiny for displaying SVGs
- # Valid options: YES, NO
- NETSURF_USE_NSSVG := YES
-
- # Enable NetSurf's use of libcairo for some plotter functions
- # This will also link NetSurf with shared objects, and
- # requires AmigaOS 4.1 or higher to run the resulting executable
- # Valid options: YES, NO, AUTO
- NETSURF_USE_AMIGA_CAIRO := AUTO
-
- # Optimisation levels
- CFLAGS += -O2 -Wuninitialized -gstabs
-
-endif
-
-# ----------------------------------------------------------------------------
-# Framebuffer-target-specific options
-# ----------------------------------------------------------------------------
-ifeq ($(TARGET),framebuffer)
- # Optimisation levels
- CFLAGS += -O2 -Wuninitialized
-
- # Framebuffer default surface provider.
- # Valid values are: x, sdl, linux, vnc, able,
- NETSURF_FB_FRONTEND := sdl
-
- # Use libharu to enable PDF export and GTK printing support.
- # Valid options: YES, NO
- NETSURF_USE_HARU_PDF := NO
-
- # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
- # Valid options: YES, NO, AUTO
- NETSURF_USE_ROSPRITE := AUTO
-
- # Library to use for font plotting
- # Valid options: internal, freetype
- NETSURF_FB_FONTLIB := internal
-
- # Default freetype font files
- NETSURF_FB_FONT_SANS_SERIF := DejaVuSans.ttf
- NETSURF_FB_FONT_SANS_SERIF_BOLD := DejaVuSans-Bold.ttf
- NETSURF_FB_FONT_SANS_SERIF_ITALIC := DejaVuSans-Oblique.ttf
- NETSURF_FB_FONT_SANS_SERIF_ITALIC_BOLD := DejaVuSans-BoldOblique.ttf
- NETSURF_FB_FONT_SERIF := DejaVuSerif.ttf
- NETSURF_FB_FONT_SERIF_BOLD := DejaVuSerif-Bold.ttf
- NETSURF_FB_FONT_MONOSPACE := DejaVuSansMono.ttf
- NETSURF_FB_FONT_MONOSPACE_BOLD := DejaVuSansMono-Bold.ttf
- NETSURF_FB_FONT_CURSIVE := Comic_Sans_MS.ttf
- NETSURF_FB_FONT_FANTASY := Impact.ttf
-
- # Default binary install path
- NETSURF_FRAMEBUFFER_BIN := $(PREFIX)/bin/
-
- # Default resource install path
- NETSURF_FRAMEBUFFER_RESOURCES := $(PREFIX)/share/netsurf/
-
- # Default framebuffer search path
- NETSURF_FB_RESPATH :=
$${HOME}/.netsurf/:$${NETSURFRES}:$(NETSURF_FRAMEBUFFER_RESOURCES):./framebuffer/res
-
- # freetype compiled in font serch path
- NETSURF_FB_FONTPATH :=
/usr/share/fonts/truetype/ttf-dejavu:/usr/share/fonts/truetype/msttcorefonts
-
-
-endif
-
-# ----------------------------------------------------------------------------
-# windows-specific options
-# ----------------------------------------------------------------------------
-ifeq ($(TARGET),windows)
-
- # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
- # Valid options: YES, NO, AUTO
- NETSURF_USE_ROSPRITE := NO
-
- # Enable NetSurf's use of libsvgtiny for displaying SVGs
- # Valid options: YES, NO
- NETSURF_USE_NSSVG := NO
-
- # Force using glibc internal iconv implementation instead of external libiconv
- # Valid options: YES, NO
- NETSURF_USE_LIBICONV_PLUG := NO
-
- # mng support does not currently build on windows
- NETSURF_USE_MNG := NO
-
- # no pdf support
- NETSURF_USE_HARU_PDF := NO
-
- # Optimisation levels
- CFLAGS += -O2 -Wuninitialized
-
-endif
-
-# ----------------------------------------------------------------------------
-# Atari-specific options
-# ----------------------------------------------------------------------------
-ifeq ($(TARGET),atari)
-
- # Force using glibc internal iconv implementation instead of external libiconv
- # Valid options: YES, NO
- NETSURF_USE_LIBICONV_PLUG := NO
-
- # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
- # Valid options: YES, NO, AUTO
- NETSURF_USE_ROSPRITE := NO
-
- # Enable NetSurf's use of libwebp for displaying WebPs
- # Valid options: YES, NO
- NETSURF_USE_WEBP := NO
-
- # Enable NetSurf's use of librsvg in conjunction with Cairo to display SVGs
- # Valid options: YES, NO, AUTO
- NETSURF_USE_RSVG := AUTO
-
- # Enable NetSurf's use of libsvgtiny for displaying SVGs
- # Valid options: YES, NO, AUTO
- NETSURF_USE_NSSVG := AUTO
-
- NETSURF_USE_MNG := NO
-
- # enable true type fonts via freetype2
- # Valid options: YES, NO
- NETSURF_USE_ATARI_FREETYPE_FONT := YES
-
- # Enable use of netsurf embedded font
- # Valid options: YES, NO
- NETSURF_USE_ATARI_NETSURF_FONT := YES
-
- # Configure support for screen drivers with no true colour mode
- # Valid options: YES, NO
- NETSURF_USE_ATARI_8BPP_SUPPORT := NO
-
- # Configure the CPU target
- # Valid options: 68000, 68020-60, 5475 (coldfire)
- ATARI_ARCH = 68020-60
-
- # enable optimizations
- # -O2 is currently broken with m68000 / m68020-60 builds
- CFLAGS += -O1 -Wuninitialized
-
- WARNFLAGS = -W -Wundef -Wpointer-arith \
- -Wcast-align -Wwrite-strings -Wstrict-prototypes \
- -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls \
- -Wnested-externs -Wl,-t
-
-endif
-
-# ----------------------------------------------------------------------------
-# Cocoa-specific options
-# ----------------------------------------------------------------------------
-ifeq ($(TARGET),cocoa)
-
- # Force using glibc internal iconv implementation instead of external libiconv
- # Valid options: YES, NO
- NETSURF_USE_LIBICONV_PLUG := NO
-
- # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
- # Valid options: YES, NO, AUTO
- NETSURF_USE_ROSPRITE := NO
-
- # Enable NetSurf's use of libwebp for displaying WebPs
- # Valid options: YES, NO
- NETSURF_USE_WEBP := NO
-
- # Enable NetSurf's use of librsvg in conjunction with Cairo to display SVGs
- # Valid options: YES, NO, AUTO
- NETSURF_USE_RSVG := AUTO
-
- # Enable NetSurf's use of libsvgtiny for displaying SVGs
- # Valid options: YES, NO, AUTO
- NETSURF_USE_NSSVG := AUTO
-
- NETSURF_USE_MNG := NO
- NETSURF_USE_BMP := NO
- NETSURF_USE_GIF := NO
- NETSURF_USE_PNG := NO
- NETSURF_USE_JPEG := NO
- NETSURF_USE_IMAGEIO := YES
-
- DEVELOPER_PATH := /Developer
- MACOSX_VERSION := 10.5
- SDK_VERSION := $(MACOSX_VERSION)
-
- # Optimisation levels
- CFLAGS += -O2 -Wuninitialized
-
-endif
+# Incude defaults specific to a TARGET
+-include $(TARGET)/Makefile.defaults
# Include any local configuration
ifneq ($(MAKEFILE_DEFAULTS_FINISHED),)
diff --git a/Makefile.sources.javascript b/Makefile.sources.javascript
index 1ece3b6..76a6ff1 100644
--- a/Makefile.sources.javascript
+++ b/Makefile.sources.javascript
@@ -54,7 +54,6 @@ S_JAVASCRIPT += content.c jsapi.c $(addprefix jsapi/,$(S_JSAPI))
$(eval $(foreach V,$(filter JSAPI_BINDING_%,$(.VARIABLES)),$(call
convert_jsapi_binding,$($(V)),$(OBJROOT)/$(patsubst JSAPI_BINDING_%,%,$(V)).c,$(patsubst
JSAPI_BINDING_%,%,$(V))_jsapi)))
-
else
S_JAVASCRIPT += none.c
endif
diff --git a/amiga/Makefile.defaults b/amiga/Makefile.defaults
new file mode 100644
index 0000000..42bcb73
--- /dev/null
+++ b/amiga/Makefile.defaults
@@ -0,0 +1,40 @@
+# ----------------------------------------------------------------------------
+# Amiga-specific options
+# ----------------------------------------------------------------------------
+
+ # Force using glibc internal iconv implementation instead of external libiconv
+ # Valid options: YES, NO
+ NETSURF_USE_LIBICONV_PLUG := YES
+
+ # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_ROSPRITE := NO
+
+ # Enable NetSurf's use of libmng for displaying MNGs, JNGs and PNGs
+ # Valid options: YES, NO (at least one of PNG/MNG/DT highly recommended)
+ NETSURF_USE_MNG := NO
+
+ # Enable NetSurf's use of libwebp for displaying WebPs
+ # Valid options: YES, NO
+ NETSURF_USE_WEBP := NO
+
+ # Enable NetSurf to display Amiga icons
+ # Valid options: YES, NO (recommended)
+ NETSURF_USE_AMIGA_ICON := YES
+
+ # Enable NetSurf's use of DataTypes for unknown filetypes
+ # Valid options: YES, NO
+ NETSURF_USE_AMIGA_DATATYPES := YES
+
+ # Enable NetSurf's use of libsvgtiny for displaying SVGs
+ # Valid options: YES, NO
+ NETSURF_USE_NSSVG := YES
+
+ # Enable NetSurf's use of libcairo for some plotter functions
+ # This will also link NetSurf with shared objects, and
+ # requires AmigaOS 4.1 or higher to run the resulting executable
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_AMIGA_CAIRO := AUTO
+
+ # Optimisation levels
+ CFLAGS += -O2 -gstabs
diff --git a/amiga/Makefile.target b/amiga/Makefile.target
index af4b0bd..ec43fdd 100644
--- a/amiga/Makefile.target
+++ b/amiga/Makefile.target
@@ -41,12 +41,12 @@ ifeq ($(HOST),amiga)
LDFLAGS += -use-dynld -ldl -lcairo -lpixman-1 -lfreetype -lfontconfig -lpng -lexpat
endif
else
- $(eval $(call pkg_config_find_and_add,ROSPRITE,librosprite,Sprite))
- $(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
- $(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
- $(eval $(call pkg_config_find_and_add,PNG,libpng,PNG))
- $(eval $(call pkg_config_find_and_add,NSSVG,libsvgtiny,NSSVG))
- $(eval $(call pkg_config_find_and_add,AMIGA_CAIRO,cairo,Cairo))
+ $(eval $(call pkg_config_find_and_add_enabled,ROSPRITE,librosprite,Sprite))
+ $(eval $(call pkg_config_find_and_add_enabled,BMP,libnsbmp,BMP))
+ $(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF))
+ $(eval $(call pkg_config_find_and_add_enabled,PNG,libpng,PNG))
+ $(eval $(call pkg_config_find_and_add_enabled,NSSVG,libsvgtiny,NSSVG))
+ $(eval $(call pkg_config_find_and_add_enabled,AMIGA_CAIRO,cairo,Cairo))
$(eval $(call feature_enabled,AMIGA_ICON,-DWITH_AMIGA_ICON,,Amiga icon))
$(eval $(call feature_enabled,AMIGA_DATATYPES,-DWITH_AMIGA_DATATYPES,,DataTypes))
diff --git a/atari/Makefile.defaults b/atari/Makefile.defaults
new file mode 100644
index 0000000..1503588
--- /dev/null
+++ b/atari/Makefile.defaults
@@ -0,0 +1,52 @@
+# ----------------------------------------------------------------------------
+# Atari-specific options
+# ----------------------------------------------------------------------------
+
+ # Force using glibc internal iconv implementation instead of external libiconv
+ # Valid options: YES, NO
+ NETSURF_USE_LIBICONV_PLUG := NO
+
+ # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_ROSPRITE := NO
+
+ # Enable NetSurf's use of libwebp for displaying WebPs
+ # Valid options: YES, NO
+ NETSURF_USE_WEBP := NO
+
+ # Enable NetSurf's use of librsvg in conjunction with Cairo to display SVGs
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_RSVG := AUTO
+
+ # Enable NetSurf's use of libsvgtiny for displaying SVGs
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_NSSVG := AUTO
+
+ NETSURF_USE_MNG := NO
+
+ # enable true type fonts via freetype2
+ # Valid options: YES, NO
+ NETSURF_USE_ATARI_FREETYPE_FONT := YES
+
+ # Enable use of netsurf embedded font
+ # Valid options: YES, NO
+ NETSURF_USE_ATARI_NETSURF_FONT := YES
+
+ # Configure support for screen drivers with no true colour mode
+ # Valid options: YES, NO
+ NETSURF_USE_ATARI_8BPP_SUPPORT := NO
+
+ # Configure the CPU target
+ # Valid options: 68000, 68020-60, 5475 (coldfire)
+ ATARI_ARCH = 68020-60
+
+ # enable optimizations
+ # -O2 is currently broken with m68000 / m68020-60 builds
+ CFLAGS += -O1
+
+ # override warning flags removing -Wall
+ WARNFLAGS = -W -Wundef -Wpointer-arith \
+ -Wcast-align -Wwrite-strings -Wstrict-prototypes \
+ -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls \
+ -Wnested-externs -Wuninitialized -Wl,-t
+
diff --git a/atari/Makefile.target b/atari/Makefile.target
index ad90807..7f05734 100644
--- a/atari/Makefile.target
+++ b/atari/Makefile.target
@@ -55,8 +55,8 @@ NETSURF_USE_JS:=YES
NETSURF_USE_MOZJS:=YES
endif
-$(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
-$(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
+$(eval $(call pkg_config_find_and_add_enabled,BMP,libnsbmp,BMP))
+$(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF))
CFLAGS += -U__STRICT_ANSI__ -std=c99 -I. -Dsmall $(WARNFLAGS) -Dnsatari \
-D_BSD_SOURCE \
diff --git a/beos/Makefile.defaults b/beos/Makefile.defaults
new file mode 100644
index 0000000..d5bf6b3
--- /dev/null
+++ b/beos/Makefile.defaults
@@ -0,0 +1,32 @@
+# ----------------------------------------------------------------------------
+# BeOS-specific options
+# ----------------------------------------------------------------------------
+
+
+ # Where to install the netsurf binary
+ NETSURF_BEOS_BIN := /boot/apps/netsurf/
+
+ # TODO:HAIKU -- not sure if ~/.netsurf applies in beos
+ # Where to search for NetSurf's resources after looking in ~/.netsurf and
+ # $NETSURFRES. It must have a trailing /
+ NETSURF_BEOS_RESOURCES := /boot/apps/netsurf/res/
+
+ # Enable NetSurf's use of libsvgtiny for displaying SVGs
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_NSSVG := YES
+
+ # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_ROSPRITE := AUTO
+
+ # Enable NetSurf's use of libharu for PDF export.
+ # Valid options: YES, NO
+ NETSURF_USE_HARU_PDF := NO
+
+ # Force using glibc internal iconv implementation instead of external libiconv
+ # Valid options: YES, NO
+ NETSURF_USE_LIBICONV_PLUG := NO
+
+ # Optimisation levels
+ CFLAGS += -O2
+
diff --git a/beos/Makefile.target b/beos/Makefile.target
index 27981be..9a7e79a 100644
--- a/beos/Makefile.target
+++ b/beos/Makefile.target
@@ -78,9 +78,9 @@
NETSURF_FEATURE_BMP_CFLAGS := -DWITH_BMP
NETSURF_FEATURE_GIF_CFLAGS := -DWITH_GIF
NETSURF_FEATURE_PNG_CFLAGS := -DWITH_PNG
- $(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
- $(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
- $(eval $(call pkg_config_find_and_add,PNG,libpng,PNG ))
+ $(eval $(call pkg_config_find_and_add_enabled,BMP,libnsbmp,BMP))
+ $(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF))
+ $(eval $(call pkg_config_find_and_add_enabled,PNG,libpng,PNG ))
endif
# ----------------------------------------------------------------------------
diff --git a/cocoa/Makefile.defaults b/cocoa/Makefile.defaults
new file mode 100644
index 0000000..b2f64ec
--- /dev/null
+++ b/cocoa/Makefile.defaults
@@ -0,0 +1,37 @@
+# ----------------------------------------------------------------------------
+# Cocoa-specific options
+# ----------------------------------------------------------------------------
+
+ # Force using glibc internal iconv implementation instead of external libiconv
+ # Valid options: YES, NO
+ NETSURF_USE_LIBICONV_PLUG := NO
+
+ # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_ROSPRITE := NO
+
+ # Enable NetSurf's use of libwebp for displaying WebPs
+ # Valid options: YES, NO
+ NETSURF_USE_WEBP := NO
+
+ # Enable NetSurf's use of librsvg in conjunction with Cairo to display SVGs
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_RSVG := AUTO
+
+ # Enable NetSurf's use of libsvgtiny for displaying SVGs
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_NSSVG := AUTO
+
+ NETSURF_USE_MNG := NO
+ NETSURF_USE_BMP := NO
+ NETSURF_USE_GIF := NO
+ NETSURF_USE_PNG := NO
+ NETSURF_USE_JPEG := NO
+ NETSURF_USE_IMAGEIO := YES
+
+ DEVELOPER_PATH := /Developer
+ MACOSX_VERSION := 10.5
+ SDK_VERSION := $(MACOSX_VERSION)
+
+ # Optimisation levels
+ CFLAGS += -O2
diff --git a/cocoa/Makefile.target b/cocoa/Makefile.target
index 27f3b08..d975a0c 100644
--- a/cocoa/Makefile.target
+++ b/cocoa/Makefile.target
@@ -53,10 +53,10 @@ endif
NETSURF_FEATURE_PNG_CFLAGS := -DWITH_PNG
NETSURF_FEATURE_NSSVG_CFLAGS := -DWITH_NS_SVG
- $(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
- $(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
- $(eval $(call pkg_config_find_and_add,PNG,libpng,PNG))
- $(eval $(call pkg_config_find_and_add,NSSVG,libsvgtiny,SVG))
+ $(eval $(call pkg_config_find_and_add_enabled,BMP,libnsbmp,BMP))
+ $(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF))
+ $(eval $(call pkg_config_find_and_add_enabled,PNG,libpng,PNG))
+ $(eval $(call pkg_config_find_and_add_enabled,NSSVG,libsvgtiny,SVG))
$(eval $(call feature_enabled,IMAGEIO,-DWITH_APPLE_IMAGE,,Apple ImageIO ))
ifneq ($(UNIVERSAL),)
diff --git a/framebuffer/Makefile.defaults b/framebuffer/Makefile.defaults
new file mode 100644
index 0000000..6e2a3d1
--- /dev/null
+++ b/framebuffer/Makefile.defaults
@@ -0,0 +1,47 @@
+# ----------------------------------------------------------------------------
+# Framebuffer-target-specific options
+# ----------------------------------------------------------------------------
+
+ # Optimisation levels
+ CFLAGS += -O2
+
+ # Framebuffer default surface provider.
+ # Valid values are: x, sdl, linux, vnc, able,
+ NETSURF_FB_FRONTEND := sdl
+
+ # Use libharu to enable PDF export and GTK printing support.
+ # Valid options: YES, NO
+ NETSURF_USE_HARU_PDF := NO
+
+ # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_ROSPRITE := AUTO
+
+ # Library to use for font plotting
+ # Valid options: internal, freetype
+ NETSURF_FB_FONTLIB := internal
+
+ # Default freetype font files
+ NETSURF_FB_FONT_SANS_SERIF := DejaVuSans.ttf
+ NETSURF_FB_FONT_SANS_SERIF_BOLD := DejaVuSans-Bold.ttf
+ NETSURF_FB_FONT_SANS_SERIF_ITALIC := DejaVuSans-Oblique.ttf
+ NETSURF_FB_FONT_SANS_SERIF_ITALIC_BOLD := DejaVuSans-BoldOblique.ttf
+ NETSURF_FB_FONT_SERIF := DejaVuSerif.ttf
+ NETSURF_FB_FONT_SERIF_BOLD := DejaVuSerif-Bold.ttf
+ NETSURF_FB_FONT_MONOSPACE := DejaVuSansMono.ttf
+ NETSURF_FB_FONT_MONOSPACE_BOLD := DejaVuSansMono-Bold.ttf
+ NETSURF_FB_FONT_CURSIVE := Comic_Sans_MS.ttf
+ NETSURF_FB_FONT_FANTASY := Impact.ttf
+
+ # Default binary install path
+ NETSURF_FRAMEBUFFER_BIN := $(PREFIX)/bin/
+
+ # Default resource install path
+ NETSURF_FRAMEBUFFER_RESOURCES := $(PREFIX)/share/netsurf/
+
+ # Default framebuffer search path
+ NETSURF_FB_RESPATH :=
$${HOME}/.netsurf/:$${NETSURFRES}:$(NETSURF_FRAMEBUFFER_RESOURCES):./framebuffer/res
+
+ # freetype compiled in font serch path
+ NETSURF_FB_FONTPATH :=
/usr/share/fonts/truetype/ttf-dejavu:/usr/share/fonts/truetype/msttcorefonts
+
diff --git a/framebuffer/Makefile.target b/framebuffer/Makefile.target
index f554997..f3d91de 100644
--- a/framebuffer/Makefile.target
+++ b/framebuffer/Makefile.target
@@ -38,11 +38,11 @@ CFLAGS +=
'-DNETSURF_FB_FONT_MONOSPACE_BOLD="$(NETSURF_FB_FONT_MONOSPACE_BOLD)"'
CFLAGS += '-DNETSURF_FB_FONT_CURSIVE="$(NETSURF_FB_FONT_CURSIVE)"'
CFLAGS += '-DNETSURF_FB_FONT_FANTASY="$(NETSURF_FB_FONT_FANTASY)"'
-$(eval $(call pkg_config_find_and_add,ROSPRITE,librosprite,Sprite))
-$(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
-$(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
-$(eval $(call pkg_config_find_and_add,MOZJS,mozjs185,JavaScript))
-$(eval $(call pkg_config_find_and_add,JS,mozilla-js,JavaScript))
+$(eval $(call pkg_config_find_and_add_enabled,ROSPRITE,librosprite,Sprite))
+$(eval $(call pkg_config_find_and_add_enabled,BMP,libnsbmp,BMP))
+$(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF))
+$(eval $(call pkg_config_find_and_add_enabled,MOZJS,mozjs185,JavaScript))
+$(eval $(call pkg_config_find_and_add_enabled,JS,mozilla-js,JavaScript))
CFLAGS += -std=c99 -g -I. -Dsmall $(WARNFLAGS) \
-D_BSD_SOURCE \
diff --git a/gtk/Makefile.defaults b/gtk/Makefile.defaults
new file mode 100644
index 0000000..23d4c17
--- /dev/null
+++ b/gtk/Makefile.defaults
@@ -0,0 +1,34 @@
+# ----------------------------------------------------------------------------
+# GTK-specific options
+# ----------------------------------------------------------------------------
+
+ # Where to search for NetSurf's resources after looking in ~/.netsurf and
+ # $NETSURFRES. It must have a trailing /
+ NETSURF_GTK_RESOURCES := $(PREFIX)/share/netsurf/
+
+ # Where to install the netsurf binary
+ NETSURF_GTK_BIN := $(PREFIX)/bin/
+
+ # Enable NetSurf's use of librsvg in conjunction with Cairo to display SVGs
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_RSVG := AUTO
+
+ # Enable NetSurf's use of libsvgtiny for displaying SVGs
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_NSSVG := AUTO
+
+ # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_ROSPRITE := AUTO
+
+ # Configuration overrides for Mac OS X
+ ifeq ($(HOST),macosx)
+ NETSURF_USE_LIBICONV_PLUG := NO
+ NETSURF_USE_HARU_PDF := NO
+ endif
+
+ # Set default GTK version to build for (2 or 3)
+ NETSURF_GTK_MAJOR := 2
+
+ # Optimisation levels
+ CFLAGS += -O2
diff --git a/gtk/Makefile.target b/gtk/Makefile.target
index 1b2bef5..f9b5436 100644
--- a/gtk/Makefile.target
+++ b/gtk/Makefile.target
@@ -7,9 +7,6 @@
# GTK flag setup (using pkg-config)
# ----------------------------------------------------------------------------
-LDFLAGS += $(shell $(PKG_CONFIG) --libs libcurl libdom libcss)
-LDFLAGS += $(shell $(PKG_CONFIG) --libs openssl)
-
# define additional CFLAGS and LDFLAGS requirements for pkg-configed libs here
NETSURF_FEATURE_RSVG_CFLAGS := -DWITH_RSVG
NETSURF_FEATURE_NSSVG_CFLAGS := -DWITH_NS_SVG
@@ -24,16 +21,16 @@ NETSURF_FEATURE_VIDEO_CFLAGS := -DWITH_VIDEO
# add a line similar to below for each optional lib here
# note: webp lacks pkg-config file
-$(eval $(call pkg_config_find_and_add,PNG,libpng,PNG ))
-$(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
-$(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
-$(eval $(call pkg_config_find_and_add,RSVG,librsvg-2.0,SVG))
-$(eval $(call pkg_config_find_and_add,NSSVG,libsvgtiny,SVG))
-$(eval $(call pkg_config_find_and_add,ROSPRITE,librosprite,Sprite))
+$(eval $(call pkg_config_find_and_add_enabled,PNG,libpng,PNG))
+$(eval $(call pkg_config_find_and_add_enabled,BMP,libnsbmp,BMP))
+$(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF))
+$(eval $(call pkg_config_find_and_add_enabled,RSVG,librsvg-2.0,SVG))
+$(eval $(call pkg_config_find_and_add_enabled,NSSVG,libsvgtiny,SVG))
+$(eval $(call pkg_config_find_and_add_enabled,ROSPRITE,librosprite,Sprite))
$(eval $(call feature_enabled,WEBP,-DWITH_WEBP,-lwebp,WebP (libwebp)))
-$(eval $(call pkg_config_find_and_add,MOZJS,mozjs185,JavaScript))
-$(eval $(call pkg_config_find_and_add,JS,mozilla-js,JavaScript))
-$(eval $(call pkg_config_find_and_add,VIDEO,gstreamer-0.10,Video))
+$(eval $(call pkg_config_find_and_add_enabled,MOZJS,mozjs185,JavaScript))
+$(eval $(call pkg_config_find_and_add_enabled,JS,mozilla-js,JavaScript))
+$(eval $(call pkg_config_find_and_add_enabled,VIDEO,gstreamer-0.10,Video))
# GTK and GLIB flags to disable depricated usage
GTKDEPFLAGS := -DG_DISABLE_SINGLE_INCLUDES \
@@ -54,16 +51,22 @@ GTKCFLAGS := -std=c99 -Dgtk -Dnsgtk \
-D_POSIX_C_SOURCE=200112L \
-D_NETBSD_SOURCE \
-DGTK_RESPATH=\"$(NETSURF_GTK_RESOURCES)\" \
- $(WARNFLAGS) -I. -g \
- $(shell $(PKG_CONFIG) --cflags gtk+-$(NETSURF_GTK_MAJOR).0) \
- $(shell $(PKG_CONFIG) --cflags libhubbub libcurl) \
- $(shell $(PKG_CONFIG) --cflags openssl) \
- $(shell xml2-config --cflags)
+ $(WARNFLAGS) -I. -g
+
+# non optional pkg-configed libs
+$(eval $(call pkg_config_find_and_add,libcss,CSS))
+$(eval $(call pkg_config_find_and_add,libdom,DOM))
+$(eval $(call pkg_config_find_and_add,libhubbub,Hubbub))
+$(eval $(call pkg_config_find_and_add,openssl,OpenSSL))
+$(eval $(call pkg_config_find_and_add,libcurl,Curl ))
+$(eval $(call
pkg_config_find_and_add,gtk+-$(NETSURF_GTK_MAJOR).0,GTK-$(NETSURF_GTK_MAJOR)))
+$(eval $(call pkg_config_find_and_add,gthread-2.0,GThread2))
+$(eval $(call pkg_config_find_and_add,gmodule-2.0,GModule2))
+$(eval $(call pkg_config_find_and_add,lcms,lcms))
-GTKLDFLAGS := $(shell $(PKG_CONFIG) --cflags --libs gtk+-$(NETSURF_GTK_MAJOR).0
gthread-2.0 gmodule-2.0 lcms)
CFLAGS += $(GTKCFLAGS)
-LDFLAGS += -lm $(GTKLDFLAGS)
+LDFLAGS += -lm
# ---------------------------------------------------------------------------
# Windows flag setup
diff --git a/monkey/Makefile.defaults b/monkey/Makefile.defaults
new file mode 100644
index 0000000..659c1e3
--- /dev/null
+++ b/monkey/Makefile.defaults
@@ -0,0 +1,13 @@
+# ----------------------------------------------------------------------------
+# Monkey-specific options
+# ----------------------------------------------------------------------------
+
+ # How did I get mixed up with this fucking monkey anyhow?
+ NETSURF_MONKEY_RESOURCES := $(PREFIX)/share/netsurf/
+ NETSURF_MONKEY_BIN := $(PREFIX)/bin/
+ NETSURF_USE_RSVG := NO
+ NETSURF_USE_NSSVG := NO
+ NETSURF_USE_ROSPRITE := NO
+ NETSURF_USE_HARU_PDF := NO
+ NETSURF_USE_LIBICONV_PLUG := NO
+ CFLAGS += -O2
diff --git a/monkey/Makefile.target b/monkey/Makefile.target
index d43fe8d..fa15a50 100644
--- a/monkey/Makefile.target
+++ b/monkey/Makefile.target
@@ -22,17 +22,19 @@ NETSURF_FEATURE_JS_CFLAGS := -DWITH_JS -DJS_HAS_FILE_OBJECT=0
NETSURF_FEATURE_MOZJS_CFLAGS := -DWITH_MOZJS -DJS_HAS_FILE_OBJECT=0
# add a line similar to below for each optional pkg-configed lib here
-$(eval $(call pkg_config_find_and_add,NSSVG,libsvgtiny,SVG))
-$(eval $(call pkg_config_find_and_add,ROSPRITE,librosprite,Sprite))
-$(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
-$(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
-$(eval $(call pkg_config_find_and_add,PNG,libpng,PNG ))
-$(eval $(call pkg_config_find_and_add,MOZJS,mozjs185,JavaScript))
-$(eval $(call pkg_config_find_and_add,JS,mozilla-js,JavaScript))
+$(eval $(call pkg_config_find_and_add_enabled,NSSVG,libsvgtiny,SVG))
+$(eval $(call pkg_config_find_and_add_enabled,ROSPRITE,librosprite,Sprite))
+$(eval $(call pkg_config_find_and_add_enabled,BMP,libnsbmp,BMP))
+$(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF))
+$(eval $(call pkg_config_find_and_add_enabled,PNG,libpng,PNG ))
+$(eval $(call pkg_config_find_and_add_enabled,MOZJS,mozjs185,JavaScript))
+$(eval $(call pkg_config_find_and_add_enabled,JS,mozilla-js,JavaScript))
# no pkg-config for this library
$(eval $(call feature_enabled,WEBP,-DWITH_WEBP,-lwebp -lvpx,WebP (libwebp)))
+WARNFLAGS += -Werror
+
MONKEYCFLAGS := -std=c99 -Dmonkey -Dnsmonkey \
-D_BSD_SOURCE \
-D_XOPEN_SOURCE=600 \
@@ -47,19 +49,17 @@ MONKEYCFLAGS := -std=c99 -Dmonkey -Dnsmonkey \
MONKEYLDFLAGS := -lm $(shell $(PKG_CONFIG) --cflags --libs glib-2.0 lcms)
-MONKEYWARNFLAGS := -Werror
-#-Wno-unused-but-set-variable
-CFLAGS += $(MONKEYCFLAGS) $(MONKEYWARNFLAGS)
+CFLAGS += $(MONKEYCFLAGS)
LDFLAGS += $(MONKEYLDFLAGS)
- # ---------------------------------------------------------------------------
- # Windows flag setup
- # ---------------------------------------------------------------------------
+# ---------------------------------------------------------------------------
+# Windows flag setup
+# ---------------------------------------------------------------------------
- ifeq ($(HOST),Windows_NT)
- CFLAGS += -U__STRICT_ANSI__
- endif
+ifeq ($(HOST),Windows_NT)
+ CFLAGS += -U__STRICT_ANSI__
+endif
# ----------------------------------------------------------------------------
# Source file setup
diff --git a/riscos/Makefile.defaults b/riscos/Makefile.defaults
new file mode 100644
index 0000000..f48024f
--- /dev/null
+++ b/riscos/Makefile.defaults
@@ -0,0 +1,31 @@
+# ----------------------------------------------------------------------------
+# RISC OS-specific options
+# ----------------------------------------------------------------------------
+
+ # Enable NetSurf's use of libsvgtiny for displaying SVGs
+ # Valid options: YES, NO
+ NETSURF_USE_NSSVG := YES
+
+ # Enable NetSurf's support for displaying RISC OS Draw files
+ # Valid options: YES, NO
+ NETSURF_USE_DRAW := YES
+
+ # Enable NetSurf's support for displaying RISC OS Sprites
+ # Valid options: YES, NO
+ NETSURF_USE_SPRITE := YES
+
+ # Enable NetSurf's use of AWRender for displaying ArtWorks files
+ # Valid options: YES, NO
+ NETSURF_USE_ARTWORKS := YES
+
+ # Enable NetSurf's support for the Acorn plugin protocol
+ # Valid options: YES, NO
+ NETSURF_USE_PLUGINS := NO
+
+ # Enable NetSurf's use of pencil for Drawfile export
+ # Valid options: YES, NO
+ NETSURF_USE_DRAW_EXPORT := YES
+
+ # Optimisation levels
+ CFLAGS += -O2
+
diff --git a/riscos/Makefile.target b/riscos/Makefile.target
index bc09b7f..e7370e7 100644
--- a/riscos/Makefile.target
+++ b/riscos/Makefile.target
@@ -30,11 +30,11 @@ else
NETSURF_FEATURE_PNG_CFLAGS := -DWITH_PNG
NETSURF_FEATURE_JS_CFLAGS := -DWITH_JS -DJS_HAS_FILE_OBJECT=0
NETSURF_FEATURE_MOZJS_CFLAGS := -DWITH_MOZJS -DJS_HAS_FILE_OBJECT=0
- $(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
- $(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
- $(eval $(call pkg_config_find_and_add,PNG,libpng,PNG ))
- $(eval $(call pkg_config_find_and_add,MOZJS,mozjs185,JavaScript))
- $(eval $(call pkg_config_find_and_add,JS,mozilla-js,JavaScript))
+ $(eval $(call pkg_config_find_and_add_enabled,BMP,libnsbmp,BMP))
+ $(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF))
+ $(eval $(call pkg_config_find_and_add_enabled,PNG,libpng,PNG ))
+ $(eval $(call pkg_config_find_and_add_enabled,MOZJS,mozjs185,JavaScript))
+ $(eval $(call pkg_config_find_and_add_enabled,JS,mozilla-js,JavaScript))
endif
TPD_RISCOS = $(foreach TPL,$(notdir $(TPL_RISCOS)), \
diff --git a/windows/Makefile.defaults b/windows/Makefile.defaults
new file mode 100644
index 0000000..68fb7af
--- /dev/null
+++ b/windows/Makefile.defaults
@@ -0,0 +1,24 @@
+# ----------------------------------------------------------------------------
+# windows-specific options
+# ----------------------------------------------------------------------------
+
+ # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_ROSPRITE := NO
+
+ # Enable NetSurf's use of libsvgtiny for displaying SVGs
+ # Valid options: YES, NO
+ NETSURF_USE_NSSVG := NO
+
+ # Force using glibc internal iconv implementation instead of external libiconv
+ # Valid options: YES, NO
+ NETSURF_USE_LIBICONV_PLUG := NO
+
+ # mng support does not currently build on windows
+ NETSURF_USE_MNG := NO
+
+ # no pdf support
+ NETSURF_USE_HARU_PDF := NO
+
+ # Optimisation levels
+ CFLAGS += -O2
--
NetSurf Browser