2011-01-06 00:02:22 +03:00
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Atari target setup
|
|
|
|
# ----------------------------------------------------------------------------
|
2011-09-19 22:38:48 +04:00
|
|
|
|
2012-08-24 02:47:37 +04:00
|
|
|
ifeq ($(ATARI_ARCH),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
|
|
|
|
|
2012-07-25 16:00:51 +04:00
|
|
|
ifeq ($(ATARI_ARCH),68020-60)
|
|
|
|
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
|
|
|
|
2012-07-25 16:00:51 +04:00
|
|
|
ifeq ($(ATARI_ARCH),5475)
|
|
|
|
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
|
|
|
|
|
|
|
FREETYPE_FONT_CFLAGS := $(shell freetype-config --cflags) -DWITH_FREETYPE_FONT_DRIVER
|
|
|
|
SPIDERMONKEY_CFLAGS := -DWITH_MOZJS -DXP_UNIX -DJS_HAS_FILE_OBJECT=0 -DJSOPTION_JIT=0 -DPOSIX_SOURCE -D_BSD_SOURCE
|
|
|
|
|
2011-01-06 00:02:22 +03:00
|
|
|
$(eval $(call feature_enabled,MNG,-DWITH_MNG,-lmng,PNG/MNG/JNG (libmng)))
|
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)))
|
|
|
|
$(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
|
|
|
|
|
|
|
$(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
|
|
|
|
$(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
|
2011-09-19 22:38:48 +04:00
|
|
|
|
2011-05-25 01:44:20 +04:00
|
|
|
CFLAGS += -U__STRICT_ANSI__ -std=c99 -I. -Dsmall $(WARNFLAGS) -Dnsatari \
|
2011-01-06 00:02:22 +03:00
|
|
|
-D_BSD_SOURCE \
|
|
|
|
-D_XOPEN_SOURCE=600 \
|
|
|
|
-D_POSIX_C_SOURCE=200112L \
|
2012-02-28 02:43:33 +04:00
|
|
|
$(shell $(PKG_CONFIG) --cflags libhubbub libcss openssl ) \
|
|
|
|
$(shell $(PKG_CONFIG) --cflags libxml-2.0 ) \
|
|
|
|
$(shell $(PKG_CONFIG) --cflags libcurl )
|
2011-09-19 22:38:48 +04:00
|
|
|
|
2012-07-25 16:00:51 +04:00
|
|
|
LDFLAGS += -lcflib -lcurl
|
2012-04-08 01:21:45 +04:00
|
|
|
LDFLAGS += -lcss -lparserutils -ldom -lwapcaplet -lhubbub
|
2011-05-25 01:44:20 +04:00
|
|
|
LDFLAGS += -lssl -lcrypto
|
2012-04-08 01:21:45 +04:00
|
|
|
LDFLAGS += -lxml2 -lz -liconv -lcares -lHermes -lwindom -lgem -lm
|
2012-08-21 19:51:43 +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
|
|
|
|
S_ATARI := gui.c findfile.c filetype.c misc.c bitmap.c schedule.c \
|
|
|
|
download.c thumbnail.c login.c verify_ssl.c treeview.c hotlist.c history.c\
|
2011-01-31 01:09:54 +03:00
|
|
|
search.c font.c \
|
2012-07-14 00:19:04 +04:00
|
|
|
plot/plot.c plot/fontplot.c plot/eddi.s \
|
|
|
|
plot/font_freetype.c plot/font_internal.c \
|
2011-11-29 03:23:28 +04:00
|
|
|
redrawslots.c encoding.c \
|
2011-01-06 00:02:22 +03:00
|
|
|
browser_win.c toolbar.c statusbar.c browser.c \
|
2011-09-19 22:38:48 +04:00
|
|
|
global_evnt.c osspec.c dragdrop.c system_colour.c \
|
2011-12-14 02:17:50 +04:00
|
|
|
ctxmenu.c save.c settings.c
|
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-24 02:47:37 +04:00
|
|
|
ATARI_INSTALL_TARGET_DIR := nsatari.package
|
|
|
|
ATARI_RES_DIR := atari/res
|
|
|
|
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Install target
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
install-atari:
|
2012-08-23 14:46:31 +04:00
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Package target
|
|
|
|
# ----------------------------------------------------------------------------
|
2011-01-06 00:02:22 +03:00
|
|
|
|
2012-08-24 02:47:37 +04:00
|
|
|
package-atari: $(PKGNAME)
|
|
|
|
$(VQ)echo Creating $(PKGNAME)
|
|
|
|
|
|
|
|
$(PKGNAME): $(EXETARGET)
|
|
|
|
$(Q)rm -rf $(ATARI_INSTALL_TARGET_DIR)
|
|
|
|
$(Q)mkdir $(ATARI_INSTALL_TARGET_DIR)/
|
|
|
|
$(Q)mkdir $(ATARI_INSTALL_TARGET_DIR)/netsurf
|
|
|
|
$(Q)mkdir $(ATARI_INSTALL_TARGET_DIR)/netsurf/doc
|
|
|
|
$(Q)mkdir $(ATARI_INSTALL_TARGET_DIR)/netsurf/download
|
|
|
|
$(Q)mkdir $(ATARI_INSTALL_TARGET_DIR)/netsurf/res
|
|
|
|
$(Q)mkdir $(ATARI_INSTALL_TARGET_DIR)/netsurf/res/fonts
|
|
|
|
#$(Q)mkdir $(ATARI_INSTALL_TARGET_DIR)/netsurf/res/icons
|
|
|
|
$(Q)touch $(ATARI_INSTALL_TARGET_DIR)/netsurf/res/cookies
|
|
|
|
$(Q)cp $(ATARI_RES_DIR)/netsurf.rsc $(ATARI_INSTALL_TARGET_DIR)/netsurf/res/netsurf.rsc
|
|
|
|
$(Q)cp $(ATARI_RES_DIR)/icons/ $(ATARI_INSTALL_TARGET_DIR)/netsurf/res/icons/ -R
|
|
|
|
|
|
|
|
|
|
|
|
$(Q)cp $(EXETARGET) $(ATARI_INSTALL_TARGET_DIR)/netsurf
|