From 308d2d3345950bf1768e7cf5945b3027a83995eb Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Fri, 27 Mar 2009 11:23:25 +0000 Subject: Rename Makefile.config to Makefile.defaults and update the docs svn path=/trunk/netsurf/; revision=6937 --- Docs/BUILDING-AmigaOS | 15 +-- Docs/BUILDING-Framebuffer | 24 ++--- Docs/BUILDING-GTK | 29 +++--- Makefile.config | 239 --------------------------------------------- Makefile.defaults | 241 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 277 insertions(+), 271 deletions(-) delete mode 100644 Makefile.config create mode 100644 Makefile.defaults diff --git a/Docs/BUILDING-AmigaOS b/Docs/BUILDING-AmigaOS index cf35c541f..6fed96c83 100644 --- a/Docs/BUILDING-AmigaOS +++ b/Docs/BUILDING-AmigaOS @@ -16,10 +16,11 @@ Building and executing NetSurf ================================= - First of all, you should examine the contents of Makefile.config and enable - and disable relevant features as you see fit. Some of these options can be - automatically detected and used, although it is better to explicitly enable - or disable options. + First of all, you should examine the contents of Makefile.defaults + and enable and disable relevant features as you see fit by creating + a Makefile.config. Some of these options can be automatically + detected and used, although it is better to explicitly enable or + disable options. You should then obtain NetSurf's dependencies, keeping in mind which options you have enabled in the configuration file. See the next section for @@ -31,7 +32,7 @@ If that produces errors, you probably don't have some of NetSurf's build dependencies installed. See "Obtaining NetSurf's dependencies" below, or turn - off the complaining features in Makefile.config. + off the complaining features in a Makefile.config. Running NetSurf from the build tree requires some setup: @@ -161,7 +162,7 @@ NetSurf uses James Shaw's librosprite for rendering RISC OS Sprite files on non-RISC OS platforms. The Makefile will automatically use librosprite, you - can disable it by editing Makefile.config. + can disable it by creating a Makefile.config. To build librosprite, check out from svn://svn.rjek.com/jshaw/libsprite/trunk @@ -173,7 +174,7 @@ NetSurf can use Haru PDF to enable PDF export and printing in GTK. This is currently enabled by default, and cannot be auto-detected by the Makefile. - If you wish to disable it, do so by editing Makefile.config. + If you wish to disable it, do so by creating a Makefile.config. Haru PDF can be obtained from http://libharu.sourceforge.net/, although we currently depend on features that the official version does not have. You diff --git a/Docs/BUILDING-Framebuffer b/Docs/BUILDING-Framebuffer index 8e3cb48d5..e1d1ee073 100644 --- a/Docs/BUILDING-Framebuffer +++ b/Docs/BUILDING-Framebuffer @@ -10,13 +10,12 @@ Building and executing NetSurf ================================= - First of all, you should examine the contents of Makefile.config and - enable and disable relevant features as you see fit in a - Makefile.config.override . Some of these options can be - automatically detected and used, and where this is the case they are - set to such. Others cannot be automatically detected from the - Makefile, so you will either need to install the dependencies, or - set them to NO. + First of all, you should examine the contents of Makefile.defaults + and enable and disable relevant features as you see fit in a + Makefile.config file. Some of these options can be automatically + detected and used, and where this is the case they are set to such. + Others cannot be automatically detected from the Makefile, so you + will either need to install the dependencies, or set them to NO. One option it is vitally important to set is the Framebuffer ports frontend type by setting the NETSURF_FB_FRONTEND variable. The port @@ -33,7 +32,7 @@ If that produces errors, you probably don't have some of NetSurf's build dependencies installed. See "Obtaining NetSurf's dependencies" below. Or turn - off the complaining features in Makefile.config. You may need to "make clean" + off the complaining features in your Makefile.config. You may need to "make clean" before attempting to build after installing the dependencies. Run NetSurf by executing the "nsfb" shell script: @@ -263,9 +262,10 @@ Index: framebuffer/fb_font_freetype.c Librosprite ------------- - NetSurf uses James Shaw's librosprite for rendering RISC OS Sprite files on - non-RISC OS platforms. The Makefile will automatically use librosprite if - it is installed. You can disable it entirely by editing Makefile.config. + NetSurf uses James Shaw's librosprite for rendering RISC OS Sprite + files on non-RISC OS platforms. The Makefile will automatically use + librosprite if it is installed. You can disable it entirely by + creating a Makefile.config file. To build librosprite, check out from svn://svn.rjek.com/jshaw/libsprite/trunk Build and install it: @@ -281,7 +281,7 @@ Index: framebuffer/fb_font_freetype.c NetSurf can use Haru PDF to enable PDF export and printing in GTK. This is currently enabled by default, and cannot be auto-detected by the Makefile. - If you wish to disable it, do so by editing Makefile.config. + If you wish to disable it, do so by creating a Makefile.config file. Haru PDF can be obtained from http://libharu.org/, although we currently depend on features that none of the official released versions does have. diff --git a/Docs/BUILDING-GTK b/Docs/BUILDING-GTK index d958bc5b5..9bf858d69 100644 --- a/Docs/BUILDING-GTK +++ b/Docs/BUILDING-GTK @@ -12,11 +12,12 @@ Building and executing NetSurf ================================= - First of all, you should examine the contents of Makefile.config and enable - and disable relevant features as you see fit. Some of these options can be - automatically detected and used, and where this is the case they are set to - such. Others cannot be automatically detected from the Makefile, so you will - either need to install the dependencies, or set them to NO. + First of all, you should examine the contents of Makefile.defaults + and enable and disable relevant features as you see fit by creating + a Makefile.config file. Some of these options can be automatically + detected and used, and where this is the case they are set to such. + Others cannot be automatically detected from the Makefile, so you + will either need to install the dependencies, or set them to NO. You should then obtain NetSurf's dependencies, keeping in mind which options you have enabled in the configuration file. See the next section for @@ -26,10 +27,11 @@ $ make - If that produces errors, you probably don't have some of NetSurf's build - dependencies installed. See "Obtaining NetSurf's dependencies" below. Or turn - off the complaining features in Makefile.config. You may need to "make clean" - before attempting to build after installing the dependencies. + If that produces errors, you probably don't have some of NetSurf's + build dependencies installed. See "Obtaining NetSurf's dependencies" + below. Or turn off the complaining features in a Makefile.config + file. You may need to "make clean" before attempting to build after + installing the dependencies. Run NetSurf by executing the "netsurf" shell script: @@ -119,9 +121,10 @@ Librosprite ------------- - NetSurf uses James Shaw's librosprite for rendering RISC OS Sprite files on - non-RISC OS platforms. The Makefile will automatically use librosprite if - it is installed. You can disable it entirely by editing Makefile.config. + NetSurf uses James Shaw's librosprite for rendering RISC OS Sprite + files on non-RISC OS platforms. The Makefile will automatically use + librosprite if it is installed. You can disable it entirely by + creating a Makefile.config file. To build librosprite, check out from svn://svn.rjek.com/jshaw/libsprite/trunk Build and install it: @@ -137,7 +140,7 @@ NetSurf can use Haru PDF to enable PDF export and printing in GTK. This is currently enabled by default, and cannot be auto-detected by the Makefile. - If you wish to disable it, do so by editing Makefile.config. + If you wish to disable it, do so by creating a Makefile.config file. Haru PDF can be obtained from http://libharu.org/, although we currently depend on features that none of the official released versions does have. diff --git a/Makefile.config b/Makefile.config deleted file mode 100644 index 2321053dc..000000000 --- a/Makefile.config +++ /dev/null @@ -1,239 +0,0 @@ -# -# NetSurf build configuration -# -# Some of these options support an 'AUTO' option, as well as YES and NO. -# When an option is set to AUTO, the Makefile will attempt to detect if that -# feature is available, enabling it if possible. -# -# Options marked "highly recommended" have a severe impact on NetSurf's -# use as a web browser and should be set to YES unless there is a particularly -# good reason not to. -# -# This file should be treated as INVIOLATE and only altered to alter the -# defaults by a core developer. If you wish to configure the build of NetSurf -# then instead please create a file called Makefile.config.override and simply -# override the statements you require in that. -# Remember that Makefile.config.override cannot override the TARGET. That must -# be set on the commandline. i.e. 'make TARGET=framebuffer' -# - -# ---------------------------------------------------------------------------- -# Options relating to all versions of NetSurf -# ---------------------------------------------------------------------------- - -# Enable NetSurf's use of libnsbmp for displaying BMPs and ICOs -# Valid options: YES, NO -NETSURF_USE_BMP := YES - -# Enable NetSurf's use of libnsgif for displaying GIFs -# Valid options: YES, NO (highly recommended) -NETSURF_USE_GIF := YES - -# Enable NetSurf's use of libjpeg for displaying JPEGs -# Valid options: YES, NO (highly recommended) -NETSURF_USE_JPEG := YES - -# Enable NetSurf's use of libpng for displaying PNGs. If MNG and PNG -# are both enabled then NetSurf will choose libpng for PNGs, leaving -# MNGs and JNGs to libmng. -# Valid options: YES, NO (at least one of PNG/MNG highly recommended) -NETSURF_USE_PNG := NO - -# Enable NetSurf's use of libmng for displaying MNGs, JNGs and PNGs -# Valid options: YES, NO (at least one of PNG/MNG highly recommended) -NETSURF_USE_MNG := YES - -# Enable NetSurf's use of libharu for PDF export and GTK printing support. -# There is no auto-detection available for this, as it does not have a -# pkg-config file. -# Valid options: YES, NO -NETSURF_USE_HARU_PDF := YES - -# Enable stripping the NetSurf binary -# Valid options: YES, NO -NETSURF_STRIP_BINARY := NO - -# Template used for constructing the User Agent: string. The first two -# replacements are major/minor version, second two are OS and architecture. -# Please don't be tempted to mention Mozilla here! Let's let that lie die. -NETSURF_UA_FORMAT_STRING := "NetSurf/%d.%d (%s; %s)" - -# Default home page, if one is not defined by the user. Note that this -# option does not apply to the RISC OS version, as it has its own local -# home page, and it can be changed by editing the end of gui_init2() in -# riscos/gui.c -NETSURF_HOMEPAGE := "http://www.netsurf-browser.org/welcome/" - -# Force using glibc internal iconv implementation instead of external libiconv -# Valid options: YES, NO -NETSURF_USE_LIBICONV_PLUG := YES - -# Initial CFLAGS. Optimisation level etc. tend to be target specific. -CFLAGS := - -# ---------------------------------------------------------------------------- -# RISC OS-specific options -# ---------------------------------------------------------------------------- -ifeq ($(TARGET),riscos) - - # Enable NetSurf's use of Hubbub to parse HTML, rather than libxml2 - # Valid options: YES, NO (highly recommended) - NETSURF_USE_HUBBUB := YES - - # Enable NetSurf's use of libsvgtiny for displaying SVGs - # Valid options: YES, NO - NETSURF_USE_NSSVG := YES - - # Enable NetSurf's use of pencil for Drawfile export - # 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 - - # 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 := /usr/local/share/netsurf/ - - # Where to install the netsurf binary - NETSURF_GTK_BIN := /usr/local/bin/ - - # Enable NetSurf's use of Hubbub to parse HTML, rather than libxml2 - # Valid options: YES, NO, AUTO (highly recommended) - NETSURF_USE_HUBBUB := AUTO - - # 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 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 - - # Optimisation levels - CFLAGS += -O2 -Wuninitialized - -endif - -# ---------------------------------------------------------------------------- -# BeOS-specific options -# ---------------------------------------------------------------------------- -ifeq ($(TARGET),beos) - - # 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) - - # Enable NetSurf's use of librosprite for displaying RISC OS Sprites - # Valid options: YES, NO, AUTO - NETSURF_USE_ROSPRITE := YES - - # Enable NetSurf's use of Hubbub to parse HTML rather, than libxml2 - # Valid options: YES, NO, AUTO (highly recommended) - NETSURF_USE_HUBBUB := YES - - # Enable NetSurf's use of libsvgtiny for displaying SVGs - # (NB: Requires NETSURF_AMIGA_USE_CAIRO) - # Valid options: YES, NO - NETSURF_USE_NSSVG := NO - - # 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 - NETSURF_AMIGA_USE_CAIRO := NO - - # Optimisation levels - CFLAGS += -O2 -Wuninitialized - -endif - -# ---------------------------------------------------------------------------- -# Debug-target-specific options -# ---------------------------------------------------------------------------- -ifeq ($(TARGET),debug) - - # Optimisation levels - CFLAGS += -O0 - -endif - -# ---------------------------------------------------------------------------- -# Framebuffer-target-specific options -# ---------------------------------------------------------------------------- -ifeq ($(TARGET),framebuffer) - # Optimisation levels - CFLAGS += -O2 -Wuninitialized - - # Framebuffer frontend. - # Valid values are: linux, sdl, vnc, able - NETSURF_FB_FRONTEND := linux - - # Enable NetSurf's use of Hubbub to parse HTML rather, than libxml2 - # Valid options: YES, NO, AUTO (highly recommended) - NETSURF_USE_HUBBUB := AUTO - - # Use libharu to enable PDF export and GTK printing support. - # Valid options: YES, NO - NETSURF_USE_HARU_PDF := NO - - # Library to use for font plotting - # Valid options: internal, freetype - NETSURF_FB_FONTLIB := internal - - # Framebuffer frontends may have differing root paths for resources - # As such, these specify the resource path and config path. - NETSURF_FB_RESPATH_linux := /usr/share/netsurf/ - NETSURF_FB_RESPATH_able := (tftpboot)/ - NETSURF_FB_RESPATH_dummy := ./ - NETSURF_FB_RESPATH_sdl := ./ - NETSURF_FB_RESPATH_vnc := /usr/share/netsurf/ - -endif - -# Include any local overrides --include Makefile.config.override - diff --git a/Makefile.defaults b/Makefile.defaults new file mode 100644 index 000000000..29cce88f3 --- /dev/null +++ b/Makefile.defaults @@ -0,0 +1,241 @@ +# +# NetSurf default build configuration +# +# Some of these options support an 'AUTO' option, as well as YES and NO. +# When an option is set to AUTO, the Makefile will attempt to detect if that +# feature is available, enabling it if possible. +# +# Options marked "highly recommended" have a severe impact on NetSurf's +# use as a web browser and should be set to YES unless there is a particularly +# good reason not to. +# +# This file should be treated as INVIOLATE and only altered to alter +# the defaults by a core developer. If you wish to configure the build +# of NetSurf then instead please create a file called Makefile.config +# and simply override the statements you require in that. Remember +# that Makefile.config cannot override the TARGET. That must be set on +# the commandline. i.e. 'make TARGET=framebuffer' However +# Makefile.config can use the TARGET variable to control what to set +# the configuration options to. +# + +# ---------------------------------------------------------------------------- +# Options relating to all versions of NetSurf +# ---------------------------------------------------------------------------- + +# Enable NetSurf's use of libnsbmp for displaying BMPs and ICOs +# Valid options: YES, NO +NETSURF_USE_BMP := YES + +# Enable NetSurf's use of libnsgif for displaying GIFs +# Valid options: YES, NO (highly recommended) +NETSURF_USE_GIF := YES + +# Enable NetSurf's use of libjpeg for displaying JPEGs +# Valid options: YES, NO (highly recommended) +NETSURF_USE_JPEG := YES + +# Enable NetSurf's use of libpng for displaying PNGs. If MNG and PNG +# are both enabled then NetSurf will choose libpng for PNGs, leaving +# MNGs and JNGs to libmng. +# Valid options: YES, NO (at least one of PNG/MNG highly recommended) +NETSURF_USE_PNG := NO + +# Enable NetSurf's use of libmng for displaying MNGs, JNGs and PNGs +# Valid options: YES, NO (at least one of PNG/MNG highly recommended) +NETSURF_USE_MNG := YES + +# Enable NetSurf's use of libharu for PDF export and GTK printing support. +# There is no auto-detection available for this, as it does not have a +# pkg-config file. +# Valid options: YES, NO +NETSURF_USE_HARU_PDF := YES + +# Enable stripping the NetSurf binary +# Valid options: YES, NO +NETSURF_STRIP_BINARY := NO + +# Template used for constructing the User Agent: string. The first two +# replacements are major/minor version, second two are OS and architecture. +# Please don't be tempted to mention Mozilla here! Let's let that lie die. +NETSURF_UA_FORMAT_STRING := "NetSurf/%d.%d (%s; %s)" + +# Default home page, if one is not defined by the user. Note that this +# option does not apply to the RISC OS version, as it has its own local +# home page, and it can be changed by editing the end of gui_init2() in +# riscos/gui.c +NETSURF_HOMEPAGE := "http://www.netsurf-browser.org/welcome/" + +# Force using glibc internal iconv implementation instead of external libiconv +# Valid options: YES, NO +NETSURF_USE_LIBICONV_PLUG := YES + +# Initial CFLAGS. Optimisation level etc. tend to be target specific. +CFLAGS := + +# ---------------------------------------------------------------------------- +# RISC OS-specific options +# ---------------------------------------------------------------------------- +ifeq ($(TARGET),riscos) + + # Enable NetSurf's use of Hubbub to parse HTML, rather than libxml2 + # Valid options: YES, NO (highly recommended) + NETSURF_USE_HUBBUB := YES + + # Enable NetSurf's use of libsvgtiny for displaying SVGs + # Valid options: YES, NO + NETSURF_USE_NSSVG := YES + + # Enable NetSurf's use of pencil for Drawfile export + # 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 + + # 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 := /usr/local/share/netsurf/ + + # Where to install the netsurf binary + NETSURF_GTK_BIN := /usr/local/bin/ + + # Enable NetSurf's use of Hubbub to parse HTML, rather than libxml2 + # Valid options: YES, NO, AUTO (highly recommended) + NETSURF_USE_HUBBUB := AUTO + + # 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 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 + + # Optimisation levels + CFLAGS += -O2 -Wuninitialized + +endif + +# ---------------------------------------------------------------------------- +# BeOS-specific options +# ---------------------------------------------------------------------------- +ifeq ($(TARGET),beos) + + # 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) + + # Enable NetSurf's use of librosprite for displaying RISC OS Sprites + # Valid options: YES, NO, AUTO + NETSURF_USE_ROSPRITE := YES + + # Enable NetSurf's use of Hubbub to parse HTML rather, than libxml2 + # Valid options: YES, NO, AUTO (highly recommended) + NETSURF_USE_HUBBUB := YES + + # Enable NetSurf's use of libsvgtiny for displaying SVGs + # (NB: Requires NETSURF_AMIGA_USE_CAIRO) + # Valid options: YES, NO + NETSURF_USE_NSSVG := NO + + # 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 + NETSURF_AMIGA_USE_CAIRO := NO + + # Optimisation levels + CFLAGS += -O2 -Wuninitialized + +endif + +# ---------------------------------------------------------------------------- +# Debug-target-specific options +# ---------------------------------------------------------------------------- +ifeq ($(TARGET),debug) + + # Optimisation levels + CFLAGS += -O0 + +endif + +# ---------------------------------------------------------------------------- +# Framebuffer-target-specific options +# ---------------------------------------------------------------------------- +ifeq ($(TARGET),framebuffer) + # Optimisation levels + CFLAGS += -O2 -Wuninitialized + + # Framebuffer frontend. + # Valid values are: linux, sdl, vnc, able + NETSURF_FB_FRONTEND := linux + + # Enable NetSurf's use of Hubbub to parse HTML rather, than libxml2 + # Valid options: YES, NO, AUTO (highly recommended) + NETSURF_USE_HUBBUB := AUTO + + # Use libharu to enable PDF export and GTK printing support. + # Valid options: YES, NO + NETSURF_USE_HARU_PDF := NO + + # Library to use for font plotting + # Valid options: internal, freetype + NETSURF_FB_FONTLIB := internal + + # Framebuffer frontends may have differing root paths for resources + # As such, these specify the resource path and config path. + NETSURF_FB_RESPATH_linux := /usr/share/netsurf/ + NETSURF_FB_RESPATH_able := (tftpboot)/ + NETSURF_FB_RESPATH_dummy := ./ + NETSURF_FB_RESPATH_sdl := ./ + NETSURF_FB_RESPATH_vnc := /usr/share/netsurf/ + +endif + +# Include any local configuration +-include Makefile.config + -- cgit v1.2.3