2011-01-06 00:02:22 +03:00
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Atari target setup
|
|
|
|
# ----------------------------------------------------------------------------
|
2011-09-19 22:38:48 +04:00
|
|
|
|
2012-10-14 02:03:59 +04:00
|
|
|
# !!!IMPORTANT!!!
|
|
|
|
# On regular m68k-atari-mint installation, these must be set
|
|
|
|
# manually via env. variables, because the m68k-atari-mint
|
|
|
|
# toolchain is located in /usr/bin and the wildcard matching
|
|
|
|
# fails then. So this wildcard matches only works for
|
2012-11-19 03:47:03 +04:00
|
|
|
# the netsurf environment!
|
2012-10-14 02:03:59 +04:00
|
|
|
STRIP := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*strip)
|
|
|
|
STACK := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*stack)
|
2014-01-20 02:51:28 +04:00
|
|
|
FT2CF := $(GCCSDK_INSTALL_ENV)/bin/freetype-config
|
2012-10-14 00:50:55 +04:00
|
|
|
|
2013-01-05 16:19:09 +04:00
|
|
|
ifeq ($(ATARIARCH),68000)
|
2012-08-23 02:06:45 +04:00
|
|
|
PRGSUFFIX := 000.app
|
2012-08-24 02:47:37 +04:00
|
|
|
PKGNAME := ns000.zip
|
2012-08-23 02:06:45 +04:00
|
|
|
endif
|
|
|
|
|
2013-01-05 16:19:09 +04:00
|
|
|
ifeq ($(ATARIARCH),68020-60)
|
2012-07-25 16:00:51 +04:00
|
|
|
CFLAGS += -m68020-60
|
|
|
|
LDFLAGS += -m68020-60
|
2012-08-23 02:06:45 +04:00
|
|
|
PRGSUFFIX := 020.app
|
2012-08-24 02:47:37 +04:00
|
|
|
PKGNAME := ns020.zip
|
2012-07-25 16:00:51 +04:00
|
|
|
endif
|
2012-07-06 00:21:45 +04:00
|
|
|
|
2013-01-05 16:19:09 +04:00
|
|
|
ifeq ($(ATARIARCH),v4e)
|
2012-07-25 16:00:51 +04:00
|
|
|
CFLAGS += -mcpu=5475
|
|
|
|
LDFLAGS += -mcpu=5475
|
2012-08-23 02:06:45 +04:00
|
|
|
PRGSUFFIX := v4e.app
|
2012-08-24 02:47:37 +04:00
|
|
|
PKGNAME := nsv4e.zip
|
2012-07-06 00:21:45 +04:00
|
|
|
endif
|
|
|
|
|
2012-07-11 01:35:24 +04:00
|
|
|
# non-pkgconfig components
|
2012-07-25 16:00:51 +04:00
|
|
|
|
2014-01-20 02:51:28 +04:00
|
|
|
FREETYPE_FONT_CFLAGS := $(shell $(FT2CF) --cflags) -DWITH_FREETYPE_FONT_DRIVER
|
2012-07-25 16:00:51 +04:00
|
|
|
SPIDERMONKEY_CFLAGS := -DWITH_MOZJS -DXP_UNIX -DJS_HAS_FILE_OBJECT=0 -DJSOPTION_JIT=0 -DPOSIX_SOURCE -D_BSD_SOURCE
|
|
|
|
|
2012-07-06 00:21:45 +04:00
|
|
|
$(eval $(call feature_enabled,PNG,-DWITH_PNG,-lpng,PNG (libpng)))
|
2012-07-25 16:00:51 +04:00
|
|
|
$(eval $(call feature_enabled,MOZJS,$(SPIDERMONKEY_CFLAGS),-ljs,JavaScript (Spidermonkey)))
|
|
|
|
$(eval $(call feature_enabled,ATARI_FREETYPE_FONT,$(FREETYPE_FONT_CFLAGS),-lfreetype,(Freetype)))
|
|
|
|
$(eval $(call feature_enabled,ATARI_NETSURF_FONT,-DWITH_INTERNAL_FONT_DRIVER,,(Internal Font)))
|
2013-09-16 04:26:43 +04:00
|
|
|
$(eval $(call feature_enabled,ATARI_VDI_FONT,-DWITH_VDI_FONT_DRIVER,,(VDI Font)))
|
2012-07-25 16:00:51 +04:00
|
|
|
$(eval $(call feature_enabled,ATARI_8BPP_SUPPORT,-DWITH_8BPP_SUPPORT,,(Indexed screen format support)))
|
2011-09-19 22:38:48 +04:00
|
|
|
|
2011-01-06 00:02:22 +03:00
|
|
|
# define additional CFLAGS and LDFLAGS requirements for pkg-configed libs here
|
|
|
|
NETSURF_FEATURE_RSVG_CFLAGS := -DWITH_RSVG
|
|
|
|
NETSURF_FEATURE_HUBBUB_CFLAGS := -DWITH_HUBBUB
|
|
|
|
NETSURF_FEATURE_BMP_CFLAGS := -DWITH_BMP
|
|
|
|
NETSURF_FEATURE_GIF_CFLAGS := -DWITH_GIF
|
2012-07-25 16:00:51 +04:00
|
|
|
NETSURF_FEATURE_JS_CFLAGS := -DWITH_JS -DJS_HAS_FILE_OBJECT=0
|
|
|
|
NETSURF_FEATURE_MOZJS_CFLAGS := -DWITH_MOZJS -DJS_HAS_FILE_OBJECT=0
|
|
|
|
|
|
|
|
ifeq ($(NETSURF_USE_MOZJS),YES)
|
|
|
|
NETSURF_USE_JS:=YES
|
|
|
|
NETSURF_USE_MOZJS:=YES
|
|
|
|
endif
|
2011-01-06 00:02:22 +03:00
|
|
|
|
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))
|
2011-09-19 22:38:48 +04:00
|
|
|
|
2014-09-05 19:01:44 +04:00
|
|
|
CFLAGS += -U__STRICT_ANSI__ -std=c99 -Dsmall -Dnsatari \
|
2011-01-06 00:02:22 +03:00
|
|
|
-D_BSD_SOURCE \
|
|
|
|
-D_XOPEN_SOURCE=600 \
|
|
|
|
-D_POSIX_C_SOURCE=200112L \
|
2015-04-18 00:48:55 +03:00
|
|
|
$(shell $(PKG_CONFIG) --cflags openssl ) \
|
2012-02-28 02:43:33 +04:00
|
|
|
$(shell $(PKG_CONFIG) --cflags libcurl )
|
2011-09-19 22:38:48 +04:00
|
|
|
|
2012-07-25 16:00:51 +04:00
|
|
|
LDFLAGS += -lcflib -lcurl
|
2011-05-25 01:44:20 +04:00
|
|
|
LDFLAGS += -lssl -lcrypto
|
2014-04-30 14:56:05 +04:00
|
|
|
LDFLAGS += -lz -lcares -lHermes -lgem -lm
|
2013-12-06 01:35:02 +04:00
|
|
|
LDFLAGS += -L$(GCCSDK_INSTALL_ENV)/lib
|
2011-01-06 00:02:22 +03:00
|
|
|
|
|
|
|
|
|
|
|
# S_ATARI are sources purely for the Atari FreeMiNT build
|
2012-12-18 04:10:20 +04:00
|
|
|
S_ATARI := \
|
2013-09-26 03:24:49 +04:00
|
|
|
about.c \
|
2012-12-18 04:10:20 +04:00
|
|
|
bitmap.c \
|
2012-12-31 06:40:43 +04:00
|
|
|
clipboard.c \
|
2013-09-16 04:26:43 +04:00
|
|
|
ctxmenu.c \
|
2013-09-21 07:29:04 +04:00
|
|
|
cookies.c \
|
2013-09-21 22:20:49 +04:00
|
|
|
certview.c \
|
2013-09-16 04:26:43 +04:00
|
|
|
deskmenu.c \
|
|
|
|
download.c \
|
|
|
|
encoding.c \
|
2014-09-13 16:15:01 +04:00
|
|
|
file.c \
|
2012-11-19 03:47:03 +04:00
|
|
|
findfile.c \
|
|
|
|
filetype.c \
|
2012-12-06 04:38:49 +04:00
|
|
|
font.c \
|
2012-12-18 04:10:20 +04:00
|
|
|
gui.c \
|
2013-09-21 07:29:04 +04:00
|
|
|
hotlist.c \
|
|
|
|
history.c \
|
2013-09-16 04:26:43 +04:00
|
|
|
login.c \
|
2012-11-19 03:47:03 +04:00
|
|
|
misc.c \
|
2013-09-16 04:26:43 +04:00
|
|
|
osspec.c \
|
2013-09-21 07:29:04 +04:00
|
|
|
redrawslots.c \
|
|
|
|
rootwin.c \
|
2012-11-19 03:47:03 +04:00
|
|
|
schedule.c \
|
2013-09-16 04:26:43 +04:00
|
|
|
search.c \
|
|
|
|
statusbar.c \
|
2013-09-21 07:29:04 +04:00
|
|
|
settings.c \
|
|
|
|
toolbar.c \
|
2012-11-19 03:47:03 +04:00
|
|
|
treeview.c \
|
|
|
|
plot/plot.c \
|
|
|
|
plot/fontplot.c \
|
|
|
|
plot/eddi.s \
|
|
|
|
plot/font_freetype.c \
|
|
|
|
plot/font_internal.c \
|
2013-01-31 22:22:35 +04:00
|
|
|
plot/font_vdi.c \
|
2012-12-21 03:56:50 +04:00
|
|
|
gemtk/aestabs.c \
|
2012-11-19 03:47:03 +04:00
|
|
|
gemtk/dragdrop.c \
|
2012-12-21 03:56:50 +04:00
|
|
|
gemtk/guiwin.c \
|
2012-11-19 03:47:03 +04:00
|
|
|
gemtk/msgbox.c \
|
2012-12-31 06:40:43 +04:00
|
|
|
gemtk/utils.c \
|
|
|
|
gemtk/objc.c
|
2012-11-19 03:47:03 +04:00
|
|
|
|
2013-09-16 04:26:43 +04:00
|
|
|
|
2011-01-06 00:02:22 +03:00
|
|
|
S_ATARI := $(addprefix atari/,$(S_ATARI))
|
|
|
|
|
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_ATARI)
|
2012-08-23 02:06:45 +04:00
|
|
|
EXETARGET := ns$(SUBTARGET)$(PRGSUFFIX)
|
2011-01-06 00:02:22 +03:00
|
|
|
|
2012-08-23 14:46:31 +04:00
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Install target
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
2012-08-25 17:09:49 +04:00
|
|
|
ATARI_TARGET_DIR := netsurf/
|
|
|
|
ATARI_RES_DIR := atari/res/
|
|
|
|
ATARI_DOC_DIR := atari/doc/
|
2012-08-26 18:45:41 +04:00
|
|
|
ATARI_FONT_NAME := ttf-bitstream-vera-1.10
|
2013-10-06 03:42:05 +04:00
|
|
|
ATARI_FONT_SOURCE_URL := http://ftp.gnome.org/pub/GNOME/sources/ttf-bitstream-vera/1.10/$(ATARI_FONT_NAME).tar.gz
|
|
|
|
#ATARI_FONT_SOURCE_URL := http://localhost/$(ATARI_FONT_NAME).tar.gz
|
2012-08-26 18:45:41 +04:00
|
|
|
ATARI_FONT_TMP_DIR := $(DEPROOT)/../
|
|
|
|
ATARI_FONT_SOURCE_DIR := $(ATARI_FONT_TMP_DIR)$(ATARI_FONT_NAME)/
|
2012-11-03 18:18:38 +04:00
|
|
|
ATARI_GENERIC_RESOURCES := de en it ja
|
2012-08-26 23:34:17 +04:00
|
|
|
ATARI_RESOURCES := $(addprefix \!NetSurf/Resources/,$(ATARI_GENERIC_RESOURCES))
|
2012-08-25 17:09:49 +04:00
|
|
|
|
2012-08-24 02:47:37 +04:00
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Install target
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
2012-08-25 17:09:49 +04:00
|
|
|
install-atari:
|
2012-08-23 14:46:31 +04:00
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Package target
|
|
|
|
# ----------------------------------------------------------------------------
|
2011-01-06 00:02:22 +03:00
|
|
|
|
2012-08-26 18:45:41 +04:00
|
|
|
$(ATARI_FONT_TMP_DIR)$(ATARI_FONT_NAME):
|
|
|
|
$(Q)wget $(ATARI_FONT_SOURCE_URL) -O $(ATARI_FONT_TMP_DIR)$(ATARI_FONT_NAME).tar.gz
|
|
|
|
tar xfz $(ATARI_FONT_TMP_DIR)/$(ATARI_FONT_NAME).tar.gz -C $(ATARI_FONT_TMP_DIR)
|
|
|
|
|
|
|
|
package-atari: $(ATARI_FONT_TMP_DIR)$(ATARI_FONT_NAME) $(PKGNAME)
|
2012-08-24 02:47:37 +04:00
|
|
|
$(VQ)echo Creating $(PKGNAME)
|
|
|
|
|
|
|
|
$(PKGNAME): $(EXETARGET)
|
2013-10-06 03:42:05 +04:00
|
|
|
ifneq ($(strip $(STRIP)),)
|
|
|
|
$(Q)echo Stripping symbols from $(EXETARGET) with $(STRIP)
|
|
|
|
$(Q)$(STRIP) $(EXETARGET)
|
|
|
|
endif
|
2012-10-14 02:03:59 +04:00
|
|
|
ifneq ($(strip $(STACK)),)
|
2012-10-14 00:50:55 +04:00
|
|
|
$(Q)$(STACK) -S 256k $(EXETARGET)
|
2012-10-14 02:03:59 +04:00
|
|
|
endif
|
2012-08-25 17:09:49 +04:00
|
|
|
$(Q)rm -rf $(ATARI_TARGET_DIR)
|
|
|
|
$(Q)rm -rf $(PKGNAME)
|
|
|
|
$(Q)mkdir $(ATARI_TARGET_DIR)
|
|
|
|
$(Q)mkdir $(ATARI_TARGET_DIR)doc
|
2014-01-02 21:08:00 +04:00
|
|
|
$(Q)mkdir $(ATARI_TARGET_DIR)downloads
|
2012-08-25 17:09:49 +04:00
|
|
|
$(Q)mkdir $(ATARI_TARGET_DIR)res
|
|
|
|
$(Q)mkdir $(ATARI_TARGET_DIR)res/fonts
|
|
|
|
$(Q)mkdir $(ATARI_TARGET_DIR)res/icons
|
2014-09-17 01:03:44 +04:00
|
|
|
$(Q)mkdir $(ATARI_TARGET_DIR)res/cache
|
2012-08-25 17:09:49 +04:00
|
|
|
$(Q)touch $(ATARI_TARGET_DIR)cookies
|
|
|
|
$(Q)touch $(ATARI_TARGET_DIR)url.db
|
|
|
|
|
|
|
|
$(Q)cp $(ATARI_DOC_DIR)bugs $(ATARI_TARGET_DIR)doc/
|
|
|
|
$(Q)cp $(ATARI_DOC_DIR)faq.txt $(ATARI_TARGET_DIR)doc/
|
|
|
|
$(Q)cp $(ATARI_DOC_DIR)readme.txt $(ATARI_TARGET_DIR)doc/
|
|
|
|
$(Q)cp $(ATARI_DOC_DIR)todo.txt $(ATARI_TARGET_DIR)doc/
|
|
|
|
|
|
|
|
# GUI resources:
|
2012-08-26 23:34:17 +04:00
|
|
|
$(Q)cp -r $(ATARI_RESOURCES) $(ATARI_TARGET_DIR)res/
|
2012-08-25 17:09:49 +04:00
|
|
|
$(Q)cp $(ATARI_RES_DIR)/netsurf.rsc $(ATARI_TARGET_DIR)res/netsurf.rsc
|
2013-11-23 20:14:03 +04:00
|
|
|
$(Q)cp $(ATARI_RES_DIR)/languages $(ATARI_TARGET_DIR)res/languages
|
2012-08-26 19:57:52 +04:00
|
|
|
$(Q)cp $(ATARI_RES_DIR)/icons/toolbar -R $(ATARI_TARGET_DIR)res/icons
|
2013-12-28 05:38:38 +04:00
|
|
|
$(Q)cp \!NetSurf/Resources/Icons/* -R $(ATARI_TARGET_DIR)res/icons/
|
2012-08-25 17:09:49 +04:00
|
|
|
|
2013-12-21 05:13:38 +04:00
|
|
|
$(Q)cp \!NetSurf/Resources/netsurf.png,b60 $(ATARI_TARGET_DIR)res/netsurf.png
|
2012-08-25 17:09:49 +04:00
|
|
|
$(Q)cp \!NetSurf/Resources/AdBlock,f79 $(ATARI_TARGET_DIR)res/adblock.css
|
|
|
|
$(Q)cp \!NetSurf/Resources/CSS,f79 $(ATARI_TARGET_DIR)res/default.css
|
|
|
|
$(Q)cp \!NetSurf/Resources/Quirks,f79 $(ATARI_TARGET_DIR)res/quirks.css
|
|
|
|
$(Q)cp \!NetSurf/Resources/internal.css,f79 $(ATARI_TARGET_DIR)res/internal.css
|
|
|
|
$(Q)cp \!NetSurf/Resources/SearchEngines $(ATARI_TARGET_DIR)res/search
|
|
|
|
$(Q)cp \!NetSurf/Resources/ca-bundle $(ATARI_TARGET_DIR)res/cabundle
|
|
|
|
$(Q)cp \!NetSurf/Resources/ca-bundle $(ATARI_TARGET_DIR)res/cabundle
|
2013-05-02 12:24:18 +04:00
|
|
|
$(Q)$(SPLIT_MESSAGES) -l en -p atari -f messages resources/FatMessages > $(ATARI_TARGET_DIR)res/messages
|
2012-08-26 23:34:17 +04:00
|
|
|
$(Q)cp \!NetSurf/Resources/en/welcome.html,faf $(ATARI_TARGET_DIR)res/welcome.html
|
2014-10-22 23:39:43 +04:00
|
|
|
$(Q)cp \!NetSurf/Resources/en/maps.html,faf $(ATARI_TARGET_DIR)res/maps.html
|
2012-08-26 23:34:17 +04:00
|
|
|
$(Q)cp \!NetSurf/Resources/en/licence.html,faf $(ATARI_TARGET_DIR)res/licence.html
|
|
|
|
$(Q)cp \!NetSurf/Resources/en/credits.html,faf $(ATARI_TARGET_DIR)res/credits.html
|
2012-08-25 17:09:49 +04:00
|
|
|
|
|
|
|
# copy "Bitstream Vera" font:
|
2012-08-26 18:45:41 +04:00
|
|
|
$(Q)cp $(ATARI_FONT_SOURCE_DIR)RELEASENOTES.TXT $(ATARI_TARGET_DIR)res/fonts/
|
|
|
|
$(Q)cp $(ATARI_FONT_SOURCE_DIR)README.TXT $(ATARI_TARGET_DIR)res/fonts/
|
|
|
|
$(Q)cp $(ATARI_FONT_SOURCE_DIR)COPYRIGHT.TXT $(ATARI_TARGET_DIR)res/fonts/
|
2012-08-25 17:09:49 +04:00
|
|
|
|
|
|
|
$(Q)cp $(ATARI_FONT_SOURCE_DIR)Vera.ttf $(ATARI_TARGET_DIR)res/fonts/ss.ttf
|
|
|
|
$(Q)cp $(ATARI_FONT_SOURCE_DIR)VeraBd.ttf $(ATARI_TARGET_DIR)res/fonts/ssb.ttf
|
|
|
|
$(Q)cp $(ATARI_FONT_SOURCE_DIR)VeraIt.ttf $(ATARI_TARGET_DIR)res/fonts/ssi.ttf
|
|
|
|
$(Q)cp $(ATARI_FONT_SOURCE_DIR)VeraBI.ttf $(ATARI_TARGET_DIR)res/fonts/ssib.ttf
|
|
|
|
$(Q)cp $(ATARI_FONT_SOURCE_DIR)VeraSe.ttf $(ATARI_TARGET_DIR)res/fonts/s.ttf
|
|
|
|
$(Q)cp $(ATARI_FONT_SOURCE_DIR)VeraSeBd.ttf $(ATARI_TARGET_DIR)res/fonts/sb.ttf
|
|
|
|
$(Q)cp $(ATARI_FONT_SOURCE_DIR)VeraMono.ttf $(ATARI_TARGET_DIR)res/fonts/mono.ttf
|
|
|
|
$(Q)cp $(ATARI_FONT_SOURCE_DIR)VeraMoBd.ttf $(ATARI_TARGET_DIR)res/fonts/monob.ttf
|
|
|
|
$(Q)cp $(ATARI_FONT_SOURCE_DIR)VeraMoIt.ttf $(ATARI_TARGET_DIR)res/fonts/cursive.ttf
|
|
|
|
$(Q)cp $(ATARI_FONT_SOURCE_DIR)VeraMoBI.ttf $(ATARI_TARGET_DIR)res/fonts/fantasy.ttf
|
|
|
|
|
|
|
|
$(Q)cp $(EXETARGET) $(ATARI_TARGET_DIR)$(EXETARGET)
|
|
|
|
|
|
|
|
# zip files
|
|
|
|
$(Q)zip $(PKGNAME) -9 -r ./$(ATARI_TARGET_DIR)
|
|
|
|
|
2012-08-26 18:45:41 +04:00
|
|
|
# delete temporary folders
|
2012-08-25 17:09:49 +04:00
|
|
|
$(Q)rm -rf $(ATARI_TARGET_DIR)
|