mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-24 04:56:50 +03:00
82 lines
2.9 KiB
Makefile
82 lines
2.9 KiB
Makefile
#
|
|
# Makefile for NetSurf monkey target
|
|
#
|
|
# This file is part of NetSurf
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# Monkey flag setup (using pkg-config)
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
|
# 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
|
|
|
|
|
|
CWARNFLAGS += -Werror
|
|
|
|
CFLAGS += -std=c99 -Dmonkey -Dnsmonkey -g \
|
|
-D_BSD_SOURCE \
|
|
-D_DEFAULT_SOURCE \
|
|
-D_XOPEN_SOURCE=700 \
|
|
-D_POSIX_C_SOURCE=200809L \
|
|
-D_NETBSD_SOURCE \
|
|
-DMONKEY_RESPATH=\"$(NETSURF_MONKEY_RESOURCES)\"
|
|
|
|
LDFLAGS += -lm
|
|
|
|
# non optional pkg-configed libs
|
|
$(eval $(call pkg_config_find_and_add,libcurl,Curl ))
|
|
$(eval $(call pkg_config_find_and_add,openssl,OpenSSL))
|
|
$(eval $(call pkg_config_find_and_add,glib-2.0,GLib2))
|
|
|
|
# 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))
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Windows flag setup
|
|
# ---------------------------------------------------------------------------
|
|
|
|
ifeq ($(HOST),Windows_NT)
|
|
CFLAGS += -U__STRICT_ANSI__
|
|
endif
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# Source file setup
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# S_MONKEY are sources purely for the MONKEY build
|
|
S_MONKEY := main.c utils.c filetype.c schedule.c bitmap.c plot.c browser.c \
|
|
download.c 401login.c cert.c font.c poll.c dispatch.c fetch.c
|
|
|
|
S_MONKEY := $(addprefix monkey/,$(S_MONKEY))
|
|
|
|
# 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)
|
|
EXETARGET := nsmonkey
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# Install target
|
|
# ----------------------------------------------------------------------------
|
|
|
|
install-monkey:
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# Package target
|
|
# ----------------------------------------------------------------------------
|
|
|
|
package-monkey:
|