From cd554e6f1e42c440c791845a1a635415b23a19a2 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sun, 28 Aug 2011 14:29:15 +0000 Subject: make image content handlers build conditional from teh makefile svn path=/trunk/netsurf/; revision=12673 --- Makefile | 13 +++++++--- Makefile.sources | 16 +++++++++--- amiga/Makefile.target | 6 +++-- atari/Makefile.target | 6 +++-- beos/Makefile.target | 6 +++-- cocoa/Makefile.target | 9 ++++--- framebuffer/Makefile.target | 6 +++-- gtk/Makefile.target | 5 +++- image/bmp.c | 11 +++----- image/bmp.h | 12 +-------- image/gif.c | 5 ---- image/gif.h | 13 ---------- image/ico.c | 5 ---- image/ico.h | 15 ----------- image/image.c | 61 +++++++++++++++++++++++++++++++++++++++++++-- image/image.h | 1 - image/jpeg.c | 5 ---- image/jpeg.h | 14 ----------- image/mng.c | 5 ---- image/mng.h | 17 ++----------- image/nssprite.c | 5 ---- image/nssprite.h | 12 --------- image/png.c | 6 ----- image/png.h | 15 ----------- image/rsvg.c | 8 ++---- image/rsvg.h | 14 ----------- image/svg.c | 5 +--- image/svg.h | 15 ----------- image/webp.c | 4 --- image/webp.h | 14 ----------- monkey/Makefile.target | 5 +++- riscos/Makefile.target | 6 +++-- windows/Makefile.target | 3 +++ 33 files changed, 127 insertions(+), 216 deletions(-) diff --git a/Makefile b/Makefile index e1775429e..93a8a0e27 100644 --- a/Makefile +++ b/Makefile @@ -302,10 +302,12 @@ define pkg_config_find_and_add LDFLAGS += $$(shell $$(PKG_CONFIG) --libs $(2)) $$(NETSURF_FEATURE_$(1)_LDFLAGS) ifneq ($(MAKECMDGOALS),clean) $$(info M.CONFIG: $(3) ($(2)) auto-enabled (NETSURF_USE_$(1) := AUTO)) + NETSURF_USE_$(1) := YES endif else ifneq ($(MAKECMDGOALS),clean) $$(info M.CONFIG: $(3) ($(2)) auto-disabled (NETSURF_USE_$(1) := AUTO)) + NETSURF_USE_$(1) := NO endif endif else ifeq ($$(NETSURF_USE_$(1)),NO) @@ -373,21 +375,24 @@ CLEANS := clean-target clean-testament POSTEXES := # ---------------------------------------------------------------------------- -# General source file setup +# Target specific setup # ---------------------------------------------------------------------------- -include Makefile.sources +include $(TARGET)/Makefile.target # ---------------------------------------------------------------------------- -# Target specific setup +# General source file setup # ---------------------------------------------------------------------------- -include $(TARGET)/Makefile.target +include Makefile.sources # ---------------------------------------------------------------------------- # Source file setup # ---------------------------------------------------------------------------- +# Force exapnsion of source file list +SOURCES := $(SOURCES) + ifeq ($(SOURCES),) $(error Unable to build NetSurf, could not determine set of sources to build) endif diff --git a/Makefile.sources b/Makefile.sources index a7d51e5c4..78d674500 100644 --- a/Makefile.sources +++ b/Makefile.sources @@ -37,9 +37,19 @@ S_COMMON := $(addprefix content/,$(S_CONTENT)) \ $(addprefix desktop/,$(S_DESKTOP)) # S_IMAGE are sources related to image management -S_IMAGE := bmp.c gif.c ico.c image.c jpeg.c mng.c nssprite.c png.c \ - svg.c rsvg.c webp.c -S_IMAGE := $(addprefix image/,$(S_IMAGE)) +S_IMAGE_YES := image.c +S_IMAGE_NO := +S_IMAGE_$(NETSURF_USE_BMP) += bmp.c ico.c +S_IMAGE_$(NETSURF_USE_GIF) += gif.c +S_IMAGE_$(NETSURF_USE_JPEG) += jpeg.c +S_IMAGE_$(NETSURF_USE_MNG) += mng.c +S_IMAGE_$(NETSURF_USE_NSSPRITE) += nssprite.c +S_IMAGE_$(NETSURF_USE_PNG) += png.c +S_IMAGE_$(NETSURF_USE_NSSVG) += svg.c +S_IMAGE_$(NETSURF_USE_RSVG) += rsvg.c +S_IMAGE_$(NETSURF_USE_WEBP) += webp.c + +S_IMAGE := $(addprefix image/,$(S_IMAGE_YES)) # S_PDF are sources of the pdf plotter + the ones for paged-printing S_PDF := pdf_plotters.c font_haru.c diff --git a/amiga/Makefile.target b/amiga/Makefile.target index d35e5f09b..70f1c99db 100644 --- a/amiga/Makefile.target +++ b/amiga/Makefile.target @@ -77,5 +77,7 @@ S_AMIGA := gui.c tree.c history.c hotlist.c schedule.c \ stringview/stringview.c stringview/urlhistory.c S_AMIGA := $(addprefix amiga/,$(S_AMIGA)) -# complete source file list -SOURCES := $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_AMIGA) $(S_PDF) +# This is the final source build list +# Note this is deliberately *not* expanded here as common and image +# are not yet available +SOURCES = $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_AMIGA) $(S_PDF) diff --git a/atari/Makefile.target b/atari/Makefile.target index 63ccf11ff..6fc4b0ca1 100644 --- a/atari/Makefile.target +++ b/atari/Makefile.target @@ -42,8 +42,10 @@ S_ATARI := gui.c findfile.c filetype.c misc.c bitmap.c schedule.c \ global_evnt.c osspec.c dragdrop.c system_colour.c S_ATARI := $(addprefix atari/,$(S_ATARI)) - -SOURCES := $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_ATARI) +# This is the final source build list +# Note this is deliberately *not* expanded here as common and image +# are not yet available +SOURCES = $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_ATARI) EXETARGET := ns$(SUBTARGET).prg diff --git a/beos/Makefile.target b/beos/Makefile.target index dc638924a..9436e3d2c 100644 --- a/beos/Makefile.target +++ b/beos/Makefile.target @@ -106,6 +106,8 @@ RDEP_BEOS := $(addprefix beos/res/,$(RDEP_BEOS)) \ $(wildcard beos/res/throbber/throbber*.png) -# complete source file list -SOURCES := $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_BEOS) +# This is the final source build list +# Note this is deliberately *not* expanded here as common and image +# are not yet available +SOURCES = $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_BEOS) EXETARGET := NetSurf diff --git a/cocoa/Makefile.target b/cocoa/Makefile.target index fe49930c4..92e08739e 100644 --- a/cocoa/Makefile.target +++ b/cocoa/Makefile.target @@ -118,9 +118,10 @@ S_TABBAR := \ S_COCOA := $(addprefix cocoa/,$(S_COCOA)) S_TABBAR := $(addprefix cocoa/PSMTabBarControl/,$(S_TABBAR)) -# complete source file list -SOURCES := $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_COCOA) $(S_TABBAR) -SOURCES := $(addprefix $(shell pwd)/,$(SOURCES)) +# This is the final source build list +# Note this is deliberately *not* expanded here as common and image +# are not yet available +SOURCES = $(addprefix $(shell pwd)/,$(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_COCOA) $(S_TABBAR)) # Since we prefix the sources with the pwd, also create a special # prefixed rule so that the testament is run @@ -169,7 +170,7 @@ $$(OBJROOT)/$(2).lproj/$(1:.xib=.nib): cocoa/res/$(1) $$(OBJROOT)/created $(VQ)echo Compiling XIB $(1) for language $(2) $(Q)mkdir -p $$(OBJROOT)/$(2).lproj $(Q)cocoa/compile-xib.sh $(DEVELOPER_PATH) cocoa/res/$(1) $(2) $$@ - + ifeq ($(wildcard cocoa/res/$(2).lproj/$(1).strings),cocoa/res/$(2).lproj/$(1).strings) $$(OBJROOT)/$(2).lproj/$(1:.xib=.nib): cocoa/res/$(2).lproj/$(1).strings endif diff --git a/framebuffer/Makefile.target b/framebuffer/Makefile.target index a7e9a5fa4..b4191daaa 100644 --- a/framebuffer/Makefile.target +++ b/framebuffer/Makefile.target @@ -149,6 +149,8 @@ endif S_FRAMEBUFFER := $(addprefix framebuffer/,$(S_FRAMEBUFFER)) $(addprefix framebuffer/fbtk/,$(S_FRAMEBUFFER_FBTK)) -# complete source file list -SOURCES := $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_FRAMEBUFFER) $(S_IMAGES) +# This is the final source build list +# Note this is deliberately *not* expanded here as common and image +# are not yet available +SOURCES = $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_FRAMEBUFFER) $(S_IMAGES) EXETARGET := nsfb$(SUBTARGET) diff --git a/gtk/Makefile.target b/gtk/Makefile.target index d08359085..16f7da4ef 100644 --- a/gtk/Makefile.target +++ b/gtk/Makefile.target @@ -72,5 +72,8 @@ S_GTK := font_pango.c bitmap.c gui.c schedule.c thumbnail.c plotters.c \ S_GTK := $(addprefix gtk/,$(S_GTK)) $(addprefix utils/,container.c) # code in utils/container.ch is non-universal it seems -SOURCES := $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_PDF) $(S_GTK) +# This is the final source build list +# Note this is deliberately *not* expanded here as common and image +# are not yet available +SOURCES = $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_PDF) $(S_GTK) EXETARGET := nsgtk diff --git a/image/bmp.c b/image/bmp.c index fb62da89f..1a4152649 100644 --- a/image/bmp.c +++ b/image/bmp.c @@ -21,25 +21,24 @@ * Content for image/bmp (implementation) */ -#include "utils/config.h" -#ifdef WITH_BMP - #include #include #include #include #include + #include "utils/config.h" #include "content/content_protected.h" #include "content/hlcache.h" #include "desktop/plotters.h" -#include "image/bitmap.h" -#include "image/bmp.h" #include "utils/log.h" #include "utils/messages.h" #include "utils/talloc.h" #include "utils/utils.h" +#include "image/bitmap.h" +#include "image/bmp.h" + typedef struct nsbmp_content { struct content base; @@ -275,5 +274,3 @@ static const char *nsbmp_types[] = { }; CONTENT_FACTORY_REGISTER_TYPES(nsbmp, nsbmp_types, nsbmp_content_handler); - -#endif diff --git a/image/bmp.h b/image/bmp.h index 885b94344..bdd8ffa5f 100644 --- a/image/bmp.h +++ b/image/bmp.h @@ -24,11 +24,8 @@ #ifndef _NETSURF_IMAGE_BMP_H_ #define _NETSURF_IMAGE_BMP_H_ -#include "utils/config.h" -#ifdef WITH_BMP - -#include #include + #include "image/bitmap.h" extern bmp_bitmap_callback_vt bmp_bitmap_callbacks; /** Only to be used by ICO code. */ @@ -36,11 +33,4 @@ extern bmp_bitmap_callback_vt bmp_bitmap_callbacks; /** Only to be used by ICO c nserror nsbmp_init(void); void nsbmp_fini(void); -#else - -#define nsbmp_init() NSERROR_OK -#define nsbmp_fini() ((void) 0) - -#endif /* WITH_BMP */ - #endif diff --git a/image/gif.c b/image/gif.c index 214a7bcff..74d09f13d 100644 --- a/image/gif.c +++ b/image/gif.c @@ -28,9 +28,6 @@ * [rjw] - Sun 4th April 2004 */ -#include "utils/config.h" -#ifdef WITH_GIF - #include #include #include @@ -425,5 +422,3 @@ static const char *nsgif_types[] = { }; CONTENT_FACTORY_REGISTER_TYPES(nsgif, nsgif_types, nsgif_content_handler); - -#endif diff --git a/image/gif.h b/image/gif.h index 4ed06d09e..ebf821a51 100644 --- a/image/gif.h +++ b/image/gif.h @@ -24,20 +24,7 @@ #ifndef _NETSURF_IMAGE_GIF_H_ #define _NETSURF_IMAGE_GIF_H_ -#include "utils/config.h" -#ifdef WITH_GIF - -#include -#include - nserror nsgif_init(void); void nsgif_fini(void); -#else - -#define nsgif_init() NSERROR_OK -#define nsgif_fini() ((void) 0) - -#endif /* WITH_GIF */ - #endif diff --git a/image/ico.c b/image/ico.c index 9f9aeb0f1..35c59e2b4 100644 --- a/image/ico.c +++ b/image/ico.c @@ -20,9 +20,6 @@ * Content for image/ico (implementation) */ -#include "utils/config.h" -#ifdef WITH_BMP - #include #include #include @@ -237,5 +234,3 @@ static const char *nsico_types[] = { }; CONTENT_FACTORY_REGISTER_TYPES(nsico, nsico_types, nsico_content_handler); - -#endif diff --git a/image/ico.h b/image/ico.h index 5df3bca95..3b592d7b2 100644 --- a/image/ico.h +++ b/image/ico.h @@ -23,22 +23,7 @@ #ifndef _NETSURF_IMAGE_ICO_H_ #define _NETSURF_IMAGE_ICO_H_ -#include "utils/config.h" -#ifdef WITH_BMP - -#include -#include - -#include "utils/errors.h" - nserror nsico_init(void); void nsico_fini(void); -#else - -#define nsico_init() NSERROR_OK -#define nsico_fini() ((void) 0) - -#endif /* WITH_BMP */ - #endif diff --git a/image/image.c b/image/image.c index 8ef96eeba..779826a17 100644 --- a/image/image.c +++ b/image/image.c @@ -16,8 +16,13 @@ * along with this program. If not, see . */ -#include "image/image.h" +#include +#include +#include + +#include "utils/errors.h" +#include "image/image.h" #include "image/bmp.h" #include "image/gif.h" #include "image/ico.h" @@ -29,6 +34,8 @@ #include "image/svg.h" #include "image/webp.h" +#include "utils/config.h" + /** * Initialise image content handlers * @@ -38,49 +45,70 @@ nserror image_init(void) { nserror error; +#ifdef WITH_BMP error = nsbmp_init(); if (error != NSERROR_OK) return error; +#endif +#ifdef WITH_GIF error = nsgif_init(); if (error != NSERROR_OK) return error; +#endif +#ifdef WITH_BMP error = nsico_init(); if (error != NSERROR_OK) return error; +#endif +#ifdef WITH_JPEG error = nsjpeg_init(); if (error != NSERROR_OK) return error; +#endif +#ifdef WITH_MNG error = nsmng_init(); if (error != NSERROR_OK) return error; - /* Prefer libpng over libmng for pngs by registering later */ error = nsjpng_init(); if (error != NSERROR_OK) return error; +#endif + +#ifdef WITH_PNG + /* Prefer libpng over libmng for pngs by registering later */ error = nspng_init(); if (error != NSERROR_OK) return error; +#endif +#ifdef WITH_NSSPRITE error = nssprite_init(); if (error != NSERROR_OK) return error; +#endif /* Prefer rsvg over libsvgtiny for svgs */ +#ifdef WITH_NS_SVG error = svg_init(); if (error != NSERROR_OK) return error; +#endif +#ifdef WITH_RSVG error = nsrsvg_init(); if (error != NSERROR_OK) return error; +#endif +#ifdef WITH_WEBP error = webp_init(); if (error != NSERROR_OK) return error; +#endif /* WITH_WEBP */ return NSERROR_OK; } @@ -90,16 +118,45 @@ nserror image_init(void) */ void image_fini(void) { +#ifdef WITH_BMP nsbmp_fini(); +#endif + +#ifdef WITH_GIF nsgif_fini(); +#endif + +#ifdef WITH_BMP nsico_fini(); +#endif + +#ifdef WITH_JPEG nsjpeg_fini(); +#endif + +#ifdef WITH_MNG nsmng_fini(); nsjpng_fini(); +#endif + +#ifdef WITH_NSSPRITE nssprite_fini(); +#endif + +#ifdef WITH_PNG nspng_fini(); +#endif + +#ifdef WITH_RSVG nsrsvg_fini(); +#endif + +#ifdef WITH_NS_SVG svg_fini(); +#endif + +#ifdef WITH_WEBP webp_fini(); +#endif } diff --git a/image/image.h b/image/image.h index 6c2163121..44ea148a8 100644 --- a/image/image.h +++ b/image/image.h @@ -28,5 +28,4 @@ nserror image_init(void); void image_fini(void); - #endif diff --git a/image/jpeg.c b/image/jpeg.c index 622e2c5db..f2fb314af 100644 --- a/image/jpeg.c +++ b/image/jpeg.c @@ -23,9 +23,6 @@ * This implementation uses the IJG JPEG library. */ -#include "utils/config.h" -#ifdef WITH_JPEG - #include #include #include @@ -357,5 +354,3 @@ static const char *nsjpeg_types[] = { }; CONTENT_FACTORY_REGISTER_TYPES(nsjpeg, nsjpeg_types, nsjpeg_content_handler); - -#endif /* WITH_JPEG */ diff --git a/image/jpeg.h b/image/jpeg.h index 57b82bdc1..163f8f286 100644 --- a/image/jpeg.h +++ b/image/jpeg.h @@ -23,21 +23,7 @@ #ifndef _NETSURF_IMAGE_JPEG_H_ #define _NETSURF_IMAGE_JPEG_H_ -#include "utils/config.h" -#ifdef WITH_JPEG - -#include - -#include "utils/errors.h" - nserror nsjpeg_init(void); void nsjpeg_fini(void); -#else - -#define nsjpeg_init() NSERROR_OK -#define nsjpeg_fini() ((void) 0) - -#endif /* WITH_JPEG */ - #endif diff --git a/image/mng.c b/image/mng.c index 44b62f203..eb4344bf8 100644 --- a/image/mng.c +++ b/image/mng.c @@ -20,9 +20,6 @@ * Content for image/mng, image/png, and image/jng (implementation). */ -#include "utils/config.h" -#ifdef WITH_MNG - #include #include #include @@ -811,5 +808,3 @@ static const char *nsjpng_types[] = { }; CONTENT_FACTORY_REGISTER_TYPES(nsjpng, nsjpng_types, nsjpng_content_handler); - -#endif diff --git a/image/mng.h b/image/mng.h index 458150644..69c88f362 100644 --- a/image/mng.h +++ b/image/mng.h @@ -23,23 +23,10 @@ #ifndef _NETSURF_IMAGE_MNG_H_ #define _NETSURF_IMAGE_MNG_H_ -#include "utils/config.h" -#ifdef WITH_MNG - -#include - nserror nsmng_init(void); -void nsmng_fini(void); nserror nsjpng_init(void); -void nsjpng_fini(void); -#else - -#define nsmng_init() NSERROR_OK -#define nsmng_fini() ((void) 0) -#define nsjpng_init() NSERROR_OK -#define nsjpng_fini() ((void) 0) - -#endif /* WITH_MNG */ +void nsmng_fini(void); +void nsjpng_fini(void); #endif diff --git a/image/nssprite.c b/image/nssprite.c index b8dd649a6..e64ef7d39 100644 --- a/image/nssprite.c +++ b/image/nssprite.c @@ -21,9 +21,6 @@ * */ -#include "utils/config.h" -#ifdef WITH_NSSPRITE - #include #include #include @@ -240,5 +237,3 @@ static const char *nssprite_types[] = { }; CONTENT_FACTORY_REGISTER_TYPES(nssprite, nssprite_types, nssprite_content_handler); - -#endif diff --git a/image/nssprite.h b/image/nssprite.h index 1f25896b3..daa31480b 100644 --- a/image/nssprite.h +++ b/image/nssprite.h @@ -23,19 +23,7 @@ #ifndef _NETSURF_NS_SPRITE_H_ #define _NETSURF_NS_SPRITE_H_ -#include "utils/config.h" -#ifdef WITH_NSSPRITE - -#include - nserror nssprite_init(void); void nssprite_fini(void); -#else - -#define nssprite_init() NSERROR_OK -#define nssprite_fini() ((void) 0) - -#endif /* WITH_NSSPRITE */ - #endif diff --git a/image/png.c b/image/png.c index f88b8fcfc..4f1d18720 100644 --- a/image/png.c +++ b/image/png.c @@ -25,8 +25,6 @@ #include -#include "utils/config.h" - #include "desktop/plotters.h" #include "content/content_protected.h" @@ -39,8 +37,6 @@ #include "utils/talloc.h" #include "utils/utils.h" -#ifdef WITH_PNG - /* accommodate for old versions of libpng (beware security holes!) */ #ifndef png_jmpbuf @@ -438,5 +434,3 @@ static const char *nspng_types[] = { }; CONTENT_FACTORY_REGISTER_TYPES(nspng, nspng_types, nspng_content_handler); - -#endif diff --git a/image/png.h b/image/png.h index 1119b6a43..c14521ae8 100644 --- a/image/png.h +++ b/image/png.h @@ -20,22 +20,7 @@ #ifndef _NETSURF_RISCOS_PNG_H_ #define _NETSURF_RISCOS_PNG_H_ -#include "utils/config.h" - -#ifdef WITH_PNG - -#include - -#include "utils/errors.h" - nserror nspng_init(void); void nspng_fini(void); -#else - -#define nspng_init() NSERROR_OK -#define nspng_fini() ((void) 0) - -#endif - #endif diff --git a/image/rsvg.c b/image/rsvg.c index 678cd862d..c322773c8 100644 --- a/image/rsvg.c +++ b/image/rsvg.c @@ -27,9 +27,6 @@ * function to render it for redraw requests. */ -#include "utils/config.h" -#ifdef WITH_RSVG - #include #include #include @@ -38,7 +35,6 @@ #include #include -#include "image/rsvg.h" #include "content/content_protected.h" #include "desktop/plotters.h" #include "image/bitmap.h" @@ -47,6 +43,8 @@ #include "utils/messages.h" #include "utils/talloc.h" +#include "image/rsvg.h" + typedef struct rsvg_content { struct content base; @@ -315,5 +313,3 @@ static const char *rsvg_types[] = { CONTENT_FACTORY_REGISTER_TYPES(nsrsvg, rsvg_types, rsvg_content_handler); - -#endif /* WITH_RSVG */ diff --git a/image/rsvg.h b/image/rsvg.h index 4d4e65fea..21e46d1b9 100644 --- a/image/rsvg.h +++ b/image/rsvg.h @@ -23,21 +23,7 @@ #ifndef _NETSURF_IMAGE_RSVG_H_ #define _NETSURF_IMAGE_RSVG_H_ -#include "utils/config.h" -#ifdef WITH_RSVG - -#include - -#include "utils/errors.h" - nserror nsrsvg_init(void); void nsrsvg_fini(void); -#else - -#define nsrsvg_init() NSERROR_OK -#define nsrsvg_fini() ((void) 0) - -#endif /* WITH_RSVG */ - #endif diff --git a/image/svg.c b/image/svg.c index 3bcb2709a..43f456bd6 100644 --- a/image/svg.c +++ b/image/svg.c @@ -20,9 +20,6 @@ * Content for image/svg (implementation). */ -#include "utils/config.h" -#ifdef WITH_NS_SVG - #include #include @@ -346,4 +343,4 @@ static const char *svg_types[] = { CONTENT_FACTORY_REGISTER_TYPES(svg, svg_types, svg_content_handler); -#endif /* WITH_NS_SVG */ + diff --git a/image/svg.h b/image/svg.h index 0e8ad8559..149a3c85f 100644 --- a/image/svg.h +++ b/image/svg.h @@ -23,22 +23,7 @@ #ifndef _NETSURF_IMAGE_SVG_H_ #define _NETSURF_IMAGE_SVG_H_ -#include "utils/config.h" - -#ifdef WITH_NS_SVG - -#include - -#include "utils/errors.h" - nserror svg_init(void); void svg_fini(void); -#else - -#define svg_init() NSERROR_OK -#define svg_fini() ((void) 0) - -#endif - #endif diff --git a/image/webp.c b/image/webp.c index 90c7121ac..25a026271 100644 --- a/image/webp.c +++ b/image/webp.c @@ -21,9 +21,6 @@ * */ -#include "utils/config.h" -#ifdef WITH_WEBP - #include #include #include @@ -211,4 +208,3 @@ static const char *webp_types[] = { CONTENT_FACTORY_REGISTER_TYPES(webp, webp_types, webp_content_handler); -#endif diff --git a/image/webp.h b/image/webp.h index 3d976d13e..cfc869fb2 100644 --- a/image/webp.h +++ b/image/webp.h @@ -23,21 +23,7 @@ #ifndef _NETSURF_WEBP_H_ #define _NETSURF_WEBP_H_ -#include "utils/config.h" -#ifdef WITH_WEBP - -#include - -#include "utils/errors.h" - nserror webp_init(void); void webp_fini(void); -#else - -#define webp_init() NSERROR_OK -#define webp_fini() ((void) 0) - -#endif /* WITH_WEBP */ - #endif diff --git a/monkey/Makefile.target b/monkey/Makefile.target index 3a6d070b2..d92aa19a8 100644 --- a/monkey/Makefile.target +++ b/monkey/Makefile.target @@ -61,5 +61,8 @@ S_MONKEY := main.c utils.c filetype.c schedule.c system_colour.c \ S_MONKEY := $(addprefix monkey/,$(S_MONKEY)) -SOURCES := $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_PDF) $(S_MONKEY) +# This is the final source build list +# Note this is deliberately *not* expanded here as common and image +# are not yet available +SOURCES = $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_PDF) $(S_MONKEY) EXETARGET := nsmonkey diff --git a/riscos/Makefile.target b/riscos/Makefile.target index 1008321ca..432a291ab 100644 --- a/riscos/Makefile.target +++ b/riscos/Makefile.target @@ -86,8 +86,10 @@ TPL_RISCOS := de en fr nl # TODO: It'd be nice to auto-detect these TPL_RISCOS := $(addprefix riscos/templates/,$(TPL_RISCOS)) -# complete source file list -SOURCES := $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_PDF) $(S_RISCOS) +# This is the final source build list +# Note this is deliberately *not* expanded here as common and image +# are not yet available +SOURCES = $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_PDF) $(S_RISCOS) EXETARGET := !NetSurf/!RunImage$(EXEEXT) !NetSurf/!Run$(RUNEXT): riscos/scripts/Run $(EXETARGET) diff --git a/windows/Makefile.target b/windows/Makefile.target index c0a7a757e..919fc5fe7 100644 --- a/windows/Makefile.target +++ b/windows/Makefile.target @@ -65,5 +65,8 @@ S_WINDOWS := main.c window.c gui.c drawable.c misc.c plot.c findfile.c \ windbg.c system_colour.c S_WINDOWS := $(addprefix windows/,$(S_WINDOWS)) +# This is the final source build list +# Note this is deliberately *not* expanded here as common and image +# are not yet available SOURCES := $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_WINDOWS) $(S_RESOURCES) EXETARGET := NetSurf.exe -- cgit v1.2.3