2012-08-23 14:46:31 +04:00
|
|
|
#
|
|
|
|
# Makefile for NetSurf monkey target
|
|
|
|
#
|
|
|
|
# This file is part of NetSurf
|
|
|
|
|
2011-03-12 18:08:07 +03:00
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Monkey flag setup (using pkg-config)
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
2012-10-22 19:37:31 +04:00
|
|
|
# define additional CFLAGS and LDFLAGS requirements for pkg-configed libs here
|
|
|
|
NETSURF_FEATURE_NSSVG_CFLAGS := -DWITH_NS_SVG
|
|
|
|
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_JS_CFLAGS := -DWITH_JS -DJS_HAS_FILE_OBJECT=0
|
|
|
|
NETSURF_FEATURE_MOZJS_CFLAGS := -DWITH_MOZJS -DJS_HAS_FILE_OBJECT=0
|
|
|
|
|
|
|
|
|
2014-09-05 19:01:44 +04:00
|
|
|
CWARNFLAGS += -Werror
|
|
|
|
|
|
|
|
CFLAGS += -std=c99 -Dmonkey -Dnsmonkey -g \
|
|
|
|
-D_BSD_SOURCE \
|
2015-03-28 21:15:27 +03:00
|
|
|
-D_DEFAULT_SOURCE \
|
2015-05-03 16:56:42 +03:00
|
|
|
-D_XOPEN_SOURCE=700 \
|
2015-05-03 16:46:29 +03:00
|
|
|
-D_POSIX_C_SOURCE=200809L \
|
2014-09-05 19:01:44 +04:00
|
|
|
-D_NETBSD_SOURCE \
|
2015-05-03 16:56:42 +03:00
|
|
|
-DMONKEY_RESPATH=\"$(NETSURF_MONKEY_RESOURCES)\"
|
|
|
|
|
|
|
|
LDFLAGS += -lm
|
2014-09-05 19:01:44 +04:00
|
|
|
|
2015-05-03 16:56:42 +03:00
|
|
|
# non optional pkg-configed libs
|
|
|
|
$(eval $(call pkg_config_find_and_add,libcurl,Curl ))
|
|
|
|
$(eval $(call pkg_config_find_and_add,openssl,OpenSSL))
|
|
|
|
|
|
|
|
# optional pkg-config configured libraries
|
|
|
|
$(eval $(call pkg_config_find_and_add_enabled,NSSVG,libsvgtiny,SVG))
|
|
|
|
$(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,MOZJS,mozjs185,JavaScript))
|
|
|
|
$(eval $(call pkg_config_find_and_add_enabled,JS,mozilla-js,JavaScript))
|
2011-03-12 18:08:07 +03:00
|
|
|
|
2012-12-13 20:31:05 +04:00
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# Windows flag setup
|
|
|
|
# ---------------------------------------------------------------------------
|
2011-03-12 18:08:07 +03:00
|
|
|
|
2012-12-13 20:31:05 +04:00
|
|
|
ifeq ($(HOST),Windows_NT)
|
|
|
|
CFLAGS += -U__STRICT_ANSI__
|
|
|
|
endif
|
2011-03-12 18:08:07 +03:00
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Source file setup
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# S_MONKEY are sources purely for the MONKEY build
|
2015-04-24 12:54:32 +03:00
|
|
|
S_MONKEY := main.c utils.c filetype.c schedule.c bitmap.c plot.c browser.c \
|
2016-02-12 16:36:12 +03:00
|
|
|
download.c 401login.c cert.c font.c dispatch.c fetch.c
|
2011-03-12 18:08:07 +03:00
|
|
|
|
|
|
|
S_MONKEY := $(addprefix monkey/,$(S_MONKEY))
|
|
|
|
|
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_MONKEY)
|
2011-03-12 18:08:07 +03:00
|
|
|
EXETARGET := nsmonkey
|
2012-08-23 14:46:31 +04:00
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Install target
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
install-monkey:
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Package target
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
package-monkey:
|