2010-10-27 22:39:24 +04:00
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Amiga target setup
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
2012-12-20 19:27:07 +04:00
|
|
|
CFLAGS += -std=c99 -Dnsamiga
|
2011-03-10 00:52:53 +03:00
|
|
|
|
|
|
|
ifneq ($(SUBTARGET),os3)
|
2012-02-25 00:00:51 +04:00
|
|
|
CFLAGS += -U__STRICT_ANSI__ -D__USE_INLINE__ -D__USE_BASETYPE__
|
2011-03-10 00:52:53 +03:00
|
|
|
endif
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2010-10-29 04:54:27 +04:00
|
|
|
NETSURF_FEATURE_ROSPRITE_CFLAGS := -DWITH_NSSPRITE
|
|
|
|
NETSURF_FEATURE_BMP_CFLAGS := -DWITH_BMP
|
|
|
|
NETSURF_FEATURE_GIF_CFLAGS := -DWITH_GIF
|
|
|
|
NETSURF_FEATURE_PNG_CFLAGS := -DWITH_PNG
|
|
|
|
NETSURF_FEATURE_WEBP_CFLAGS := -DWITH_WEBP
|
|
|
|
NETSURF_FEATURE_NSSVG_CFLAGS := -DWITH_NS_SVG
|
2011-12-24 17:20:01 +04:00
|
|
|
NETSURF_FEATURE_VIDEO_CFLAGS := -DWITH_VIDEO
|
2012-10-13 23:45:51 +04:00
|
|
|
NETSURF_FEATURE_AMIGA_CAIRO_CFLAGS := -DNS_AMIGA_CAIRO
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2010-12-30 00:26:45 +03:00
|
|
|
ifeq ($(HOST),amiga)
|
|
|
|
$(eval $(call feature_enabled,ROSPRITE,-DWITH_NSSPRITE,-lrosprite,Sprite (librosprite)))
|
|
|
|
$(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) ))
|
|
|
|
$(eval $(call feature_enabled,NSSVG,-DWITH_NS_SVG,-lsvgtiny,SVG (libsvgtiny)))
|
|
|
|
$(eval $(call feature_enabled,MNG,,-llcms -ljpeg,PNG/JNG/MNG (libmng)))
|
2011-03-21 02:32:44 +03:00
|
|
|
$(eval $(call feature_enabled,WEBP,-DWITH_WEBP,-lwebp,WebP (libwebp)))
|
2011-12-24 17:20:01 +04:00
|
|
|
$(eval $(call feature_enabled,VIDEO,-DWITH_VIDEO -I /SDK/local/newlib/include/glib-2.0,-lgstreamer-0.10 -lglib-2.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lintl -lffi,Video (libgstreamer)))
|
2012-06-30 13:43:55 +04:00
|
|
|
$(eval $(call feature_enabled,JS,-DXP_UNIX -DWITH_JS -DJS_VERSION=185,-lstdc++ -lmozjs185,JavaScript))
|
2012-07-07 13:00:34 +04:00
|
|
|
$(eval $(call feature_enabled,MOZJS,-DXP_AMIGA -DWITH_MOZJS -DJS_VERSION=170 -DJSVERSION_LATEST=170 -DJSOPTION_JIT=0 -DJSCLASS_GLOBAL_FLAGS=0,-ljs -lfdlibm,JavaScript))
|
2012-10-15 01:59:39 +04:00
|
|
|
$(eval $(call feature_enabled,AMIGA_CAIRO,-DNS_AMIGA_CAIRO,,Cairo))
|
2011-05-07 00:40:09 +04:00
|
|
|
$(eval $(call feature_enabled,AMIGA_ICON,-DWITH_AMIGA_ICON,,Amiga icon))
|
2011-05-07 02:42:37 +04:00
|
|
|
$(eval $(call feature_enabled,AMIGA_DATATYPES,-DWITH_AMIGA_DATATYPES,,DataTypes))
|
2010-12-30 00:26:45 +03:00
|
|
|
|
2011-03-10 00:52:53 +03:00
|
|
|
CFLAGS += -I /SDK/local/common/include/libpng12
|
2012-11-10 04:09:11 +04:00
|
|
|
LDFLAGS += -lcurl -lrtmp -lpthread -ltre -lintl -lauto -lpbl
|
2012-03-27 00:25:10 +04:00
|
|
|
LDFLAGS += -lssl -lcrypto -ldom -lhubbub -lcss -lparserutils -lwapcaplet
|
2010-12-30 00:26:45 +03:00
|
|
|
|
2012-10-15 01:59:39 +04:00
|
|
|
ifeq ($(NETSURF_USE_AMIGA_CAIRO),YES)
|
|
|
|
CFLAGS += -I /SDK/local/common/include/cairo
|
|
|
|
LDFLAGS += -use-dynld -ldl -lcairo -lpixman-1 -lfreetype -lfontconfig -lpng -lexpat
|
2010-12-30 00:26:45 +03:00
|
|
|
endif
|
2010-10-31 14:14:26 +03:00
|
|
|
else
|
2012-12-13 20:31:05 +04:00
|
|
|
$(eval $(call pkg_config_find_and_add_enabled,ROSPRITE,librosprite,Sprite))
|
|
|
|
$(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,NSSVG,libsvgtiny,NSSVG))
|
|
|
|
$(eval $(call pkg_config_find_and_add_enabled,AMIGA_CAIRO,cairo,Cairo))
|
2011-05-07 00:40:09 +04:00
|
|
|
$(eval $(call feature_enabled,AMIGA_ICON,-DWITH_AMIGA_ICON,,Amiga icon))
|
2011-05-07 02:42:37 +04:00
|
|
|
$(eval $(call feature_enabled,AMIGA_DATATYPES,-DWITH_AMIGA_DATATYPES,,DataTypes))
|
2010-12-30 00:26:45 +03:00
|
|
|
|
|
|
|
CFLAGS += -I$(GCCSDK_INSTALL_ENV)/include
|
2012-11-10 04:09:11 +04:00
|
|
|
CFLAGS += $(shell $(PKG_CONFIG) --cflags libcurl openssl)
|
2012-08-05 13:16:37 +04:00
|
|
|
CFLAGS += $(shell $(PKG_CONFIG) --cflags tre libdom libcss)
|
2010-12-30 00:26:45 +03:00
|
|
|
|
2012-11-10 04:09:11 +04:00
|
|
|
LDFLAGS += $(shell $(PKG_CONFIG) --libs libcurl openssl)
|
2012-08-05 13:16:37 +04:00
|
|
|
LDFLAGS += $(shell $(PKG_CONFIG) --libs tre libdom libcss)
|
2011-03-10 00:52:53 +03:00
|
|
|
LDFLAGS += -L$(GCCSDK_INSTALL_ENV)/lib
|
|
|
|
|
|
|
|
ifeq ($(SUBTARGET),os3)
|
2013-01-17 22:50:02 +04:00
|
|
|
LDFLAGS += -lpbl -liconv
|
2011-03-10 01:39:10 +03:00
|
|
|
else
|
2012-10-21 04:58:09 +04:00
|
|
|
LDFLAGS += -lauto -lpbl -liconv
|
2011-03-10 00:52:53 +03:00
|
|
|
endif
|
2010-10-29 04:54:27 +04:00
|
|
|
endif
|
|
|
|
|
2012-10-31 23:34:33 +04:00
|
|
|
EXETARGET := NetSurf
|
|
|
|
|
2010-10-29 04:54:27 +04:00
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Source file setup
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# S_AMIGA are sources purely for the Amiga build
|
2011-10-15 18:09:35 +04:00
|
|
|
S_AMIGA := gui.c tree.c history.c hotlist.c schedule.c file.c \
|
2010-10-29 04:54:27 +04:00
|
|
|
thumbnail.c misc.c bitmap.c font.c filetype.c utf8.c login.c \
|
|
|
|
plotters.c object.c menu.c save_pdf.c arexx.c version.c \
|
2013-01-25 00:00:09 +04:00
|
|
|
cookies.c context_menu.c clipboard.c help.c font_scan.c \
|
2011-02-26 20:38:43 +03:00
|
|
|
launch.c search.c history_local.c download.c iff_dr2d.c \
|
2011-01-30 16:40:47 +03:00
|
|
|
sslcert.c gui_options.c print.c theme.c drag.c icon.c system_colour.c \
|
2011-06-06 03:07:10 +04:00
|
|
|
datatypes.c dt_picture.c dt_anim.c dt_sound.c plugin_hack.c \
|
2013-01-25 00:00:09 +04:00
|
|
|
stringview/stringview.c stringview/urlhistory.c \
|
|
|
|
agclass/amigaguide_class.c
|
2010-10-29 04:54:27 +04:00
|
|
|
S_AMIGA := $(addprefix amiga/,$(S_AMIGA))
|
|
|
|
|
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_AMIGA) $(S_PDF)
|
2012-08-15 22:58:36 +04:00
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Install target
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
2012-08-23 14:46:31 +04:00
|
|
|
install-amiga:
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Package target
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
package-amiga: netsurf.lha
|
2012-08-15 22:58:36 +04:00
|
|
|
|
2012-11-03 18:09:43 +04:00
|
|
|
AMIGA_LANGUAGES_MESSAGES := de en it
|
2012-09-09 22:46:29 +04:00
|
|
|
AMIGA_LANGUAGES := $(AMIGA_LANGUAGES_MESSAGES) ja
|
2012-08-15 22:58:36 +04:00
|
|
|
AMIGA_PLATFORM_RESOURCES := Pointers Themes default.css default.css.info favicon.png LangNames mimetypes Resource.map SearchEngines splash.png
|
|
|
|
AMIGA_GENERIC_RESOURCES := $(AMIGA_LANGUAGES) ca-bundle
|
|
|
|
AMIGA_RESOURCES := $(addprefix amiga/resources/,$(AMIGA_PLATFORM_RESOURCES)) $(addprefix \!NetSurf/Resources/,$(AMIGA_GENERIC_RESOURCES))
|
2012-08-18 19:16:10 +04:00
|
|
|
AMIGA_LIBRARIES := parserutils.library nsgif.library nsbmp.library iconv.library hubbub.library
|
|
|
|
AMIGA_LIBS := $(addprefix /Libs/,$(AMIGA_LIBRARIES))
|
2012-11-10 04:09:11 +04:00
|
|
|
AMIGA_SHARED_OBJS := libjpeg.so.12 libcurl.so.7 librtmp.so.0 libsvgtiny.so.0 \
|
2012-10-12 22:38:47 +04:00
|
|
|
libssl.so.1.0.0 libcrypto.so.1.0.0 libcss.so.0 libwapcaplet.so.0 libpng12.so \
|
|
|
|
libdom.so.0 libhubbub.so.0 libtre.so.5 libintl.so
|
2012-08-18 19:16:10 +04:00
|
|
|
AMIGA_SOBJS := $(addprefix /SObjs/,$(AMIGA_SHARED_OBJS))
|
2012-08-15 22:58:36 +04:00
|
|
|
AMIGA_DISTRIBUTION_FILES := amiga/dist/*
|
|
|
|
AMIGA_INSTALL_TARGET_DIR := NetSurf_Amiga
|
|
|
|
|
2012-08-23 14:46:31 +04:00
|
|
|
netsurf.lha: $(EXETARGET)
|
2012-08-15 22:58:36 +04:00
|
|
|
$(VQ)echo Creating netsurf.lha
|
|
|
|
$(Q)rm -rf $(AMIGA_INSTALL_TARGET_DIR)
|
|
|
|
$(Q)mkdir -p $(AMIGA_INSTALL_TARGET_DIR)/NetSurf
|
2012-10-12 00:33:49 +04:00
|
|
|
$(Q)cp -p $(EXETARGET) $(AMIGA_INSTALL_TARGET_DIR)/NetSurf
|
2012-08-15 22:58:36 +04:00
|
|
|
$(Q)mkdir $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources
|
2012-11-03 18:06:54 +04:00
|
|
|
$(call split_install_messages, ami, $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/)
|
2012-08-15 22:58:36 +04:00
|
|
|
$(Q)cp -r $(AMIGA_RESOURCES) $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources
|
|
|
|
$(Q)cp -r $(AMIGA_DISTRIBUTION_FILES) $(AMIGA_INSTALL_TARGET_DIR)/NetSurf
|
|
|
|
$(Q)cp \!NetSurf/Resources/AdBlock,f79 $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/adblock.css
|
|
|
|
$(Q)cp \!NetSurf/Resources/CSS,f79 $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/nsdefault.css
|
|
|
|
$(Q)cp \!NetSurf/Resources/internal.css,f79 $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/internal.css
|
|
|
|
$(Q)cp \!NetSurf/Resources/Quirks,f79 $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/quirks.css
|
2012-08-18 19:16:10 +04:00
|
|
|
$(Q)cp \!NetSurf/Resources/netsurf.png,b60 $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/netsurf.png
|
2012-08-15 22:58:36 +04:00
|
|
|
$(Q)cp amiga/pkg/fitr $(AMIGA_INSTALL_TARGET_DIR)/NetSurf
|
|
|
|
$(Q)cp amiga/pkg/drawer.info $(AMIGA_INSTALL_TARGET_DIR)/NetSurf.info
|
|
|
|
$(Q)cp amiga/pkg/AutoInstall $(AMIGA_INSTALL_TARGET_DIR)
|
2012-08-18 19:22:21 +04:00
|
|
|
ifeq ($(HOST),amiga)
|
2012-08-18 19:16:10 +04:00
|
|
|
$(Q)mkdir $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Libs
|
|
|
|
$(Q)cp $(AMIGA_LIBS) $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Libs
|
|
|
|
$(Q)mkdir $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/SObjs
|
|
|
|
$(Q)cp --preserve=timestamps $(AMIGA_SOBJS) $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/SObjs
|
2012-08-18 19:22:21 +04:00
|
|
|
endif
|
2012-08-15 22:58:36 +04:00
|
|
|
$(Q)cd $(AMIGA_INSTALL_TARGET_DIR); \
|
|
|
|
lha a netsurf.lha NetSurf NetSurf.info AutoInstall
|
|
|
|
|