summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2015-04-05 14:52:45 +0100
committerVincent Sanders <vince@kyllikki.org>2015-04-05 14:52:45 +0100
commit2f2a73beea5e9e66505ba2adba98be83452fc93b (patch)
treefb4d3ce845cba143fb8efa6cef0754729405cafa /riscos
parentea9a2ff01d4ca599215a3bd943f7c5fd55d12f63 (diff)
downloadnetsurf-2f2a73beea5e9e66505ba2adba98be83452fc93b.tar.gz
netsurf-2f2a73beea5e9e66505ba2adba98be83452fc93b.tar.bz2
Move some RISc OS specific Makefile rules into its Makefile.target
Diffstat (limited to 'riscos')
-rw-r--r--riscos/Makefile.target59
1 files changed, 40 insertions, 19 deletions
diff --git a/riscos/Makefile.target b/riscos/Makefile.target
index dd1c34cd2..e40795c81 100644
--- a/riscos/Makefile.target
+++ b/riscos/Makefile.target
@@ -20,22 +20,18 @@ $(eval $(call feature_enabled,DRAW,-DWITH_DRAW,,Drawfile rendering))
$(eval $(call feature_enabled,SPRITE,-DWITH_SPRITE,,Sprite rendering))
$(eval $(call feature_enabled,ARTWORKS,-DWITH_ARTWORKS,,ArtWorks rendering))
$(eval $(call feature_enabled,DRAW_EXPORT,-DWITH_DRAW_EXPORT,-lpencil,Drawfile export))
-ifeq ($(HOST),riscos)
- $(eval $(call feature_enabled,BMP,-DWITH_BMP,-lnsbmp,BMP (libnsbmp)))
- $(eval $(call feature_enabled,GIF,-DWITH_GIF,-lnsgif,GIF (libnsgif)))
- $(eval $(call feature_enabled,PNG,-DWITH_PNG,-lpng,PNG (libpng) ))
-else
- NETSURF_FEATURE_BMP_CFLAGS := -DWITH_BMP
- NETSURF_FEATURE_GIF_CFLAGS := -DWITH_GIF
- 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_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
+
+NETSURF_FEATURE_BMP_CFLAGS := -DWITH_BMP
+NETSURF_FEATURE_GIF_CFLAGS := -DWITH_GIF
+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_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))
+
TPD_RISCOS = $(foreach TPL,$(notdir $(TPL_RISCOS)), \
!NetSurf/Resources/$(TPL)/Templates$(TPLEXT))
@@ -85,14 +81,12 @@ S_RISCOS := 401login.c assert.c bitmap.c buffer.c cookies.c configure.c \
con_fonts.c con_home.c con_image.c con_inter.c con_language.c \
con_secure.c con_theme.c)
S_RISCOS := $(addprefix riscos/,$(S_RISCOS))
-TPL_RISCOS := de en fr nl # TODO: It'd be nice to auto-detect these
-TPL_RISCOS := $(addprefix riscos/templates/,$(TPL_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_RISCOS)
+
EXETARGET := !NetSurf/!RunImage$(EXEEXT)
!NetSurf/!Run$(RUNEXT): riscos/scripts/Run $(EXETARGET)
@@ -126,6 +120,33 @@ split-messages:
.PHONY: split-messages
# ----------------------------------------------------------------------------
+# Template targets
+# ----------------------------------------------------------------------------
+
+# Template objects
+TPL_RISCOS := de en fr nl # TODO: It'd be nice to auto-detect these
+TPL_RISCOS := $(addprefix riscos/templates/,$(TPL_RISCOS))
+
+define compile_template
+!NetSurf/Resources/$(1)/Templates$$(TPLEXT): $(2)
+ $$(VQ)echo "TEMPLATE: $(2)"
+ $$(Q)mkdir -p !NetSurf/Resources/$(1)
+ $$(Q)$$(CC) -x c -E -P $$(CFLAGS) $(2) | $$(CCRES) - $$@
+
+CLEAN_TEMPLATES += !NetSurf/Resources/$(1)/Templates$$(TPLEXT)
+
+endef
+
+$(eval $(foreach TPL,$(TPL_RISCOS), \
+ $(call compile_template,$(notdir $(TPL)),$(TPL))))
+
+clean-templates:
+ $(VQ)echo " CLEAN: $(CLEAN_TEMPLATES)"
+ $(Q)$(RM) $(CLEAN_TEMPLATES)
+CLEANS += clean-templates
+
+
+# ----------------------------------------------------------------------------
# Install target
# ----------------------------------------------------------------------------