2012-08-23 14:46:31 +04:00
|
|
|
#
|
|
|
|
# Makefile for NetSurf RISC OS target
|
|
|
|
#
|
|
|
|
# This file is part of NetSurf
|
2010-10-27 22:39:24 +04:00
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# RISC OS target setup
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
2016-05-06 00:28:51 +03:00
|
|
|
$(eval $(call pkg_config_find_and_add,libcares,Cares))
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2010-11-08 14:28:58 +03:00
|
|
|
$(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))
|
2015-04-05 16:52:45 +03:00
|
|
|
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2010-11-08 14:28:58 +03:00
|
|
|
TPD_RISCOS = $(foreach TPL,$(notdir $(TPL_RISCOS)), \
|
2018-04-22 13:15:23 +03:00
|
|
|
$(FRONTEND_SOURCE_DIR)/appdir/Resources/$(TPL)/Templates$(TPLEXT))
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2015-04-07 02:19:33 +03:00
|
|
|
RESOURCES = $(TPD_RISCOS)
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2014-09-05 19:01:44 +04:00
|
|
|
CFLAGS += -Driscos -std=c99 -D_BSD_SOURCE -D_POSIX_C_SOURCE \
|
2012-12-20 19:27:07 +04:00
|
|
|
-mpoke-function-name -fno-strict-aliasing
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2014-01-04 22:06:34 +04:00
|
|
|
CFLAGS += -I$(GCCSDK_INSTALL_ENV)/include
|
2010-11-08 14:28:58 +03:00
|
|
|
ifeq ($(HOST),riscos)
|
|
|
|
CFLAGS += -I<OSLib$$Dir> -mthrowback
|
|
|
|
endif
|
|
|
|
ASFLAGS += -xassembler-with-cpp -I. -I$(GCCSDK_INSTALL_ENV)/include
|
|
|
|
LDFLAGS += -L$(GCCSDK_INSTALL_ENV)/lib -lrufl
|
|
|
|
ifeq ($(HOST),riscos)
|
|
|
|
LDFLAGS += -LOSLib: -lOSLib32
|
|
|
|
else
|
|
|
|
LDFLAGS += -lOSLib32
|
|
|
|
ifeq ($(SUBTARGET),-elf)
|
|
|
|
# Go for static builds & AIF binary at the moment:
|
|
|
|
CFLAGS += -static
|
|
|
|
LDFLAGS += -static
|
|
|
|
EXEEXT := ,ff8
|
2010-10-27 22:39:24 +04:00
|
|
|
endif
|
2010-11-08 14:28:58 +03:00
|
|
|
endif
|
2010-10-29 04:54:27 +04:00
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Source file setup
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# S_RISCOS are sources purely for the RISC OS build
|
2019-08-14 14:18:39 +03:00
|
|
|
S_FRONTEND := assert.c bitmap.c buffer.c configure.c gui.c \
|
2017-05-29 00:07:33 +03:00
|
|
|
dialog.c download.c filetype.c font.c help.c image.c \
|
2016-12-28 19:07:04 +03:00
|
|
|
iconbar.c menus.c message.c mouse.c palettes.c plotters.c \
|
2011-05-09 13:57:40 +04:00
|
|
|
print.c query.c save.c save_draw.c save_pdf.c schedule.c \
|
2016-12-28 19:07:04 +03:00
|
|
|
search.c searchweb.c textarea.c textselection.c theme.c \
|
|
|
|
theme_install.c toolbar.c url_suggest.c wimp.c wimp_event.c \
|
|
|
|
ucstables.c uri.c url_complete.c url_protocol.c window.c \
|
2017-05-29 00:07:33 +03:00
|
|
|
corewindow.c cookies.c sslcert.c hotlist.c \
|
|
|
|
local_history.c global_history.c \
|
2011-05-09 13:57:40 +04:00
|
|
|
$(addprefix content-handlers/,artworks.c awrender.s draw.c \
|
|
|
|
sprite.c) \
|
2011-02-21 02:16:33 +03:00
|
|
|
$(addprefix gui/,button_bar.c progress_bar.c status_bar.c \
|
|
|
|
throbber.c url_bar.c) \
|
2010-10-29 04:54:27 +04:00
|
|
|
$(addprefix configure/,con_cache.c con_connect.c con_content.c \
|
|
|
|
con_fonts.c con_home.c con_image.c con_inter.c con_language.c \
|
2013-10-03 22:25:01 +04:00
|
|
|
con_secure.c con_theme.c)
|
2010-10-29 04:54:27 +04:00
|
|
|
|
2011-08-28 18:29:15 +04:00
|
|
|
# This is the final source build list
|
|
|
|
# Note this is deliberately *not* expanded here as common and image
|
|
|
|
# are not yet available
|
2016-05-06 00:28:51 +03:00
|
|
|
SOURCES = $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_FRONTEND)
|
2015-04-05 16:52:45 +03:00
|
|
|
|
2018-04-22 13:15:23 +03:00
|
|
|
EXETARGET := $(FRONTEND_SOURCE_DIR)/appdir/!RunImage$(EXEEXT)
|
2010-10-29 04:54:27 +04:00
|
|
|
|
2015-04-07 02:19:33 +03:00
|
|
|
# The filter and target for split messages
|
|
|
|
MESSAGES_FILTER=ro
|
|
|
|
|
2018-04-22 13:15:23 +03:00
|
|
|
$(FRONTEND_SOURCE_DIR)/appdir/!Run$(RUNEXT): $(FRONTEND_SOURCE_DIR)/scripts/Run $(EXETARGET)
|
2010-10-29 04:54:27 +04:00
|
|
|
$(VQ)echo " MAKERUN: $@"
|
|
|
|
$(Q)$(MAKERUN) $(EXETARGET) $< $@
|
2015-01-30 02:41:12 +03:00
|
|
|
|
2018-04-22 13:15:23 +03:00
|
|
|
$(FRONTEND_SOURCE_DIR)/appdir/!Help$(RUNEXT): $(FRONTEND_SOURCE_DIR)/scripts/Help
|
2015-01-30 02:41:12 +03:00
|
|
|
$(VQ)echo " CP: $@"
|
|
|
|
$(Q)cp $< $@
|
|
|
|
|
2012-10-08 01:17:18 +04:00
|
|
|
$(DEPROOT)/squeeze.d: $(EXETARGET)
|
|
|
|
$(VQ)echo " SQUEEZE: $<"
|
2012-10-08 12:52:17 +04:00
|
|
|
$(Q)$(SQUEEZE) -f -v $(EXETARGET)
|
2012-10-08 01:17:18 +04:00
|
|
|
$(Q)$(TOUCH) $@
|
2015-01-30 02:41:12 +03:00
|
|
|
|
2018-04-22 13:15:23 +03:00
|
|
|
POSTEXES += $(FRONTEND_SOURCE_DIR)/appdir/!Run$(RUNEXT) $(FRONTEND_SOURCE_DIR)/appdir/!Help$(RUNEXT) $(DEPROOT)/squeeze.d
|
2015-01-30 02:41:12 +03:00
|
|
|
|
2010-10-29 04:54:27 +04:00
|
|
|
|
|
|
|
clean-run:
|
2018-04-22 13:15:23 +03:00
|
|
|
$(VQ)echo " CLEAN: !Run$(RUNEXT)"
|
|
|
|
$(Q) $(RM) $(FRONTEND_SOURCE_DIR)/appdir/!Run$(RUNEXT)
|
2015-01-30 02:41:12 +03:00
|
|
|
|
|
|
|
clean-help:
|
2018-04-22 13:15:23 +03:00
|
|
|
$(VQ)echo " CLEAN: !Help$(RUNEXT)"
|
|
|
|
$(Q) $(RM) $(FRONTEND_SOURCE_DIR)/appdir/!Help$(RUNEXT)
|
2015-01-30 02:41:12 +03:00
|
|
|
|
|
|
|
CLEANS += clean-run clean-help
|
2012-08-19 12:56:57 +04:00
|
|
|
|
2015-04-05 16:52:45 +03:00
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Template targets
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# Template objects
|
|
|
|
TPL_RISCOS := de en fr nl # TODO: It'd be nice to auto-detect these
|
2016-05-06 00:28:51 +03:00
|
|
|
TPL_RISCOS := $(addprefix $(FRONTEND_SOURCE_DIR)/templates/,$(TPL_RISCOS))
|
2015-04-05 16:52:45 +03:00
|
|
|
|
2015-04-07 02:19:33 +03:00
|
|
|
# Template target creation macro
|
2015-04-05 16:52:45 +03:00
|
|
|
define compile_template
|
2018-04-22 13:15:23 +03:00
|
|
|
$(FRONTEND_SOURCE_DIR)/appdir/Resources/$(1)/Templates$$(TPLEXT): $(2)
|
2015-04-05 16:52:45 +03:00
|
|
|
$$(VQ)echo "TEMPLATE: $(2)"
|
2018-04-22 13:15:23 +03:00
|
|
|
$$(Q)$$(MKDIR) -p $(FRONTEND_SOURCE_DIR)/appdir/Resources/$(1)
|
2015-04-05 16:52:45 +03:00
|
|
|
$$(Q)$$(CC) -x c -E -P $$(CFLAGS) $(2) | $$(CCRES) - $$@
|
|
|
|
|
2018-04-22 13:15:23 +03:00
|
|
|
CLEAN_TEMPLATES += $(FRONTEND_SOURCE_DIR)/appdir/Resources/$(1)/Templates$$(TPLEXT)
|
2015-04-05 16:52:45 +03:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
2012-08-19 12:56:57 +04:00
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Install target
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
2012-08-23 14:46:31 +04:00
|
|
|
install-riscos:
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Package target
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
package-riscos: netsurf.zip
|
|
|
|
|
2012-08-19 12:56:57 +04:00
|
|
|
netsurf.zip: $(EXETARGET)
|
2012-08-19 16:05:35 +04:00
|
|
|
$(eval $@_TMPDIR := $(shell mktemp -d))
|
2012-08-19 12:56:57 +04:00
|
|
|
$(Q) $(RM) $@
|
2018-04-22 13:15:23 +03:00
|
|
|
$(Q) cp -rLvp $(FRONTEND_SOURCE_DIR)/appdir $($@_TMPDIR)/!NetSurf
|
2016-05-06 00:28:51 +03:00
|
|
|
$(Q) $(CURDIR)/utils/git-date.sh $(FRONTEND_SOURCE_DIR)/distribution
|
|
|
|
$(Q) rsync --archive --verbose $(FRONTEND_SOURCE_DIR)/distribution/!Boot $($@_TMPDIR)
|
|
|
|
$(Q) rsync --archive --verbose $(FRONTEND_SOURCE_DIR)/distribution/!System $($@_TMPDIR)
|
|
|
|
$(Q) rsync --archive --verbose $(FRONTEND_SOURCE_DIR)/distribution/3rdParty $($@_TMPDIR)
|
|
|
|
$(Q) cp $(FRONTEND_SOURCE_DIR)/distribution/ReadMe $($@_TMPDIR)
|
|
|
|
$(Q) cp $(FRONTEND_SOURCE_DIR)/distribution/LeesMij $($@_TMPDIR)
|
2012-10-02 17:51:26 +04:00
|
|
|
$(Q) cd $($@_TMPDIR) && /opt/netsurf/arm-unknown-riscos/env/bin/zip -9vr\, $(CURDIR)/$@ *
|
2012-08-19 18:04:24 +04:00
|
|
|
$(Q) $(RM) -rf $($@_TMPDIR)
|