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
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
2010-11-08 14:28:58 +03:00
|
|
|
ifeq ($(HOST),riscos)
|
2012-11-10 04:09:11 +04:00
|
|
|
LDFLAGS += -Xlinker -symbols=$(OBJROOT)/sym -lz -lm -lcurl -lcares
|
2012-03-25 15:36:37 +04:00
|
|
|
LDFLAGS += -lssl -lcrypto -ldom -lhubbub -lcss -lparserutils -lwapcaplet
|
2010-11-08 14:28:58 +03:00
|
|
|
else
|
2012-11-10 04:09:11 +04:00
|
|
|
LDFLAGS += $(shell $(PKG_CONFIG) --libs libcares libcurl openssl)
|
2012-03-25 11:58:30 +04:00
|
|
|
LDFLAGS += $(shell $(PKG_CONFIG) --libs libdom libcss)
|
2010-11-08 14:28:58 +03:00
|
|
|
endif
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2010-11-08 14:28:58 +03:00
|
|
|
$(eval $(call feature_enabled,NSSVG,-DWITH_NS_SVG,-lsvgtiny,SVG (libsvgtiny)))
|
|
|
|
$(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
|
2012-12-10 12:43:11 +04:00
|
|
|
NETSURF_FEATURE_JS_CFLAGS := -DWITH_JS -DJS_HAS_FILE_OBJECT=0
|
|
|
|
NETSURF_FEATURE_MOZJS_CFLAGS := -DWITH_MOZJS -DJS_HAS_FILE_OBJECT=0
|
2012-12-13 20:31:05 +04:00
|
|
|
$(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))
|
2010-11-08 14:28:58 +03:00
|
|
|
endif
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2010-11-08 14:28:58 +03:00
|
|
|
TPD_RISCOS = $(foreach TPL,$(notdir $(TPL_RISCOS)), \
|
2010-10-27 22:39:24 +04:00
|
|
|
!NetSurf/Resources/$(TPL)/Templates$(TPLEXT))
|
|
|
|
|
2012-11-03 15:47:43 +04:00
|
|
|
RESOURCES = $(TPD_RISCOS) split-messages
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2012-12-20 19:27:07 +04:00
|
|
|
CFLAGS += $(WARNFLAGS) -Driscos -std=c99 -D_BSD_SOURCE -D_POSIX_C_SOURCE \
|
|
|
|
-mpoke-function-name -fno-strict-aliasing
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2012-12-20 19:27:07 +04:00
|
|
|
CFLAGS += -I$(GCCSDK_INSTALL_ENV)/include -I$(GCCSDK_INSTALL_ENV)/include/libmng
|
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
|
2011-05-09 13:57:40 +04:00
|
|
|
S_RISCOS := 401login.c assert.c bitmap.c buffer.c cookies.c configure.c \
|
2011-10-10 16:23:53 +04:00
|
|
|
dialog.c download.c filetype.c font.c \
|
2011-05-09 13:57:40 +04:00
|
|
|
global_history.c gui.c help.c history.c hotlist.c iconbar.c \
|
2013-09-08 03:47:55 +04:00
|
|
|
image.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 \
|
2013-09-08 03:47:55 +04:00
|
|
|
search.c searchweb.c sslcert.c textarea.c \
|
2011-05-09 13:57:40 +04:00
|
|
|
textselection.c theme.c theme_install.c thumbnail.c toolbar.c \
|
|
|
|
treeview.c ucstables.c uri.c url_complete.c url_protocol.c \
|
|
|
|
url_suggest.c wimp.c wimp_event.c window.c \
|
|
|
|
$(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
|
|
|
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))
|
|
|
|
|
|
|
|
|
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
|
|
|
|
SOURCES = $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_PDF) $(S_RISCOS)
|
2010-10-29 04:54:27 +04:00
|
|
|
EXETARGET := !NetSurf/!RunImage$(EXEEXT)
|
|
|
|
|
|
|
|
!NetSurf/!Run$(RUNEXT): riscos/scripts/Run $(EXETARGET)
|
|
|
|
$(VQ)echo " MAKERUN: $@"
|
|
|
|
$(Q)$(MAKERUN) $(EXETARGET) $< $@
|
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) $@
|
|
|
|
POSTEXES += !NetSurf/!Run$(RUNEXT) $(DEPROOT)/squeeze.d
|
2010-10-29 04:54:27 +04:00
|
|
|
|
|
|
|
clean-run:
|
|
|
|
$(VQ)echo " CLEAN: !NetSurf/!Run$(RUNEXT)"
|
|
|
|
$(Q) $(RM) !NetSurf/!Run$(RUNEXT)
|
|
|
|
CLEANS += clean-run
|
2012-08-19 12:56:57 +04:00
|
|
|
|
2012-11-03 15:47:43 +04:00
|
|
|
split-messages:
|
|
|
|
$(call split_install_messages, ro, !NetSurf/Resources/)
|
|
|
|
.PHONY: split-messages
|
|
|
|
|
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) $@
|
2012-10-02 17:51:26 +04:00
|
|
|
$(Q) rsync --archive --verbose $(CURDIR)/!NetSurf $($@_TMPDIR)
|
|
|
|
$(Q) rsync --archive --verbose $(CURDIR)/riscos/distribution/!Boot $($@_TMPDIR)
|
|
|
|
$(Q) rsync --archive --verbose $(CURDIR)/riscos/distribution/!System $($@_TMPDIR)
|
|
|
|
$(Q) rsync --archive --verbose $(CURDIR)/riscos/distribution/3rdParty $($@_TMPDIR)
|
|
|
|
$(Q) cp $(CURDIR)/riscos/distribution/ReadMe $($@_TMPDIR)
|
|
|
|
$(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)
|