netsurf/atari/Makefile.target

66 lines
2.4 KiB
Makefile

# ----------------------------------------------------------------------------
# Atari target setup
# ----------------------------------------------------------------------------
# define additional CFLAGS and LDFLAGS requirements for pkg-configed libs here
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
# non-pkgconfig components
$(eval $(call feature_enabled,MNG,-DWITH_MNG,-lmng,PNG/MNG/JNG (libmng)))
$(eval $(call feature_enabled,GD_PLOTTER,-DWITH_GD_PLOTTER,-lgd,GD Plotter (libgd)))
$(eval $(call feature_enabled,PNG,-DWITH_PNG,-lpng,PNG (libpng)))
$(eval $(call feature_enabled,MOZJS,-DWITH_MOZJS,-ljs,JavaScript (Spidermonkey)))
CFLAGS += -DATARI_USE_FREETYPE $(shell freetype-config --cflags)
LDFLAGS += -lcflib -lfreetype
# 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
#LDFLAGS += -lnsbmp -lnsgif
$(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
$(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
CFLAGS += -U__STRICT_ANSI__ -std=c99 -I. -Dsmall $(WARNFLAGS) -Dnsatari \
-D_BSD_SOURCE \
-D_XOPEN_SOURCE=600 \
-D_POSIX_C_SOURCE=200112L \
$(shell $(PKG_CONFIG) --cflags libhubbub libcss openssl ) \
$(shell $(PKG_CONFIG) --cflags libxml-2.0 ) \
$(shell $(PKG_CONFIG) --cflags libcurl )
LDFLAGS += -lcurl
LDFLAGS += -lcss -lparserutils -ldom -lwapcaplet -lhubbub
LDFLAGS += -lssl -lcrypto
LDFLAGS += -lxml2 -lz -liconv -lcares -lHermes -lwindom -lgem -lm
# 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\
search.c font.c \
plot/plot.c plot/fontplot.c plot/eddi.s \
plot/font_freetype.c plot/font_internal.c \
redrawslots.c encoding.c \
browser_win.c toolbar.c statusbar.c browser.c \
global_evnt.c osspec.c dragdrop.c system_colour.c \
ctxmenu.c save.c settings.c
S_ATARI := $(addprefix atari/,$(S_ATARI))
# 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)
EXETARGET := ns$(SUBTARGET).prg