mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 12:36:51 +03:00
make macro name more correct
This commit is contained in:
parent
17e20537d4
commit
45906b9dc2
4
Makefile
4
Makefile
@ -316,10 +316,12 @@ define feature_enabled
|
||||
endif
|
||||
endef
|
||||
|
||||
# Extend flags with appropriate values from pkg-config for enabled features
|
||||
#
|
||||
# 1: Feature name (ie, NETSURF_USE_RSVG -> RSVG)
|
||||
# 2: pkg-config required modules for feature
|
||||
# 3: Human-readable name for the feature
|
||||
define pkg_config_find_and_add
|
||||
define pkg_config_find_and_add_enabled
|
||||
ifeq ($$(PKG_CONFIG),)
|
||||
$$(error pkg-config is required to auto-detect feature availability)
|
||||
endif
|
||||
|
@ -41,12 +41,12 @@ ifeq ($(HOST),amiga)
|
||||
LDFLAGS += -use-dynld -ldl -lcairo -lpixman-1 -lfreetype -lfontconfig -lpng -lexpat
|
||||
endif
|
||||
else
|
||||
$(eval $(call pkg_config_find_and_add,ROSPRITE,librosprite,Sprite))
|
||||
$(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
|
||||
$(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
|
||||
$(eval $(call pkg_config_find_and_add,PNG,libpng,PNG))
|
||||
$(eval $(call pkg_config_find_and_add,NSSVG,libsvgtiny,NSSVG))
|
||||
$(eval $(call pkg_config_find_and_add,AMIGA_CAIRO,cairo,Cairo))
|
||||
$(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))
|
||||
$(eval $(call feature_enabled,AMIGA_ICON,-DWITH_AMIGA_ICON,,Amiga icon))
|
||||
$(eval $(call feature_enabled,AMIGA_DATATYPES,-DWITH_AMIGA_DATATYPES,,DataTypes))
|
||||
|
||||
|
@ -55,8 +55,8 @@ NETSURF_USE_JS:=YES
|
||||
NETSURF_USE_MOZJS:=YES
|
||||
endif
|
||||
|
||||
$(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
|
||||
$(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
|
||||
$(eval $(call pkg_config_find_and_add_enabled,BMP,libnsbmp,BMP))
|
||||
$(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF))
|
||||
|
||||
CFLAGS += -U__STRICT_ANSI__ -std=c99 -I. -Dsmall $(WARNFLAGS) -Dnsatari \
|
||||
-D_BSD_SOURCE \
|
||||
|
@ -78,9 +78,9 @@
|
||||
NETSURF_FEATURE_BMP_CFLAGS := -DWITH_BMP
|
||||
NETSURF_FEATURE_GIF_CFLAGS := -DWITH_GIF
|
||||
NETSURF_FEATURE_PNG_CFLAGS := -DWITH_PNG
|
||||
$(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
|
||||
$(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
|
||||
$(eval $(call pkg_config_find_and_add,PNG,libpng,PNG ))
|
||||
$(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 ))
|
||||
endif
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
|
@ -53,10 +53,10 @@ endif
|
||||
NETSURF_FEATURE_PNG_CFLAGS := -DWITH_PNG
|
||||
NETSURF_FEATURE_NSSVG_CFLAGS := -DWITH_NS_SVG
|
||||
|
||||
$(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
|
||||
$(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
|
||||
$(eval $(call pkg_config_find_and_add,PNG,libpng,PNG))
|
||||
$(eval $(call pkg_config_find_and_add,NSSVG,libsvgtiny,SVG))
|
||||
$(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,SVG))
|
||||
$(eval $(call feature_enabled,IMAGEIO,-DWITH_APPLE_IMAGE,,Apple ImageIO ))
|
||||
|
||||
ifneq ($(UNIVERSAL),)
|
||||
|
@ -38,11 +38,11 @@ CFLAGS += '-DNETSURF_FB_FONT_MONOSPACE_BOLD="$(NETSURF_FB_FONT_MONOSPACE_BOLD)"'
|
||||
CFLAGS += '-DNETSURF_FB_FONT_CURSIVE="$(NETSURF_FB_FONT_CURSIVE)"'
|
||||
CFLAGS += '-DNETSURF_FB_FONT_FANTASY="$(NETSURF_FB_FONT_FANTASY)"'
|
||||
|
||||
$(eval $(call pkg_config_find_and_add,ROSPRITE,librosprite,Sprite))
|
||||
$(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
|
||||
$(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
|
||||
$(eval $(call pkg_config_find_and_add,MOZJS,mozjs185,JavaScript))
|
||||
$(eval $(call pkg_config_find_and_add,JS,mozilla-js,JavaScript))
|
||||
$(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,MOZJS,mozjs185,JavaScript))
|
||||
$(eval $(call pkg_config_find_and_add_enabled,JS,mozilla-js,JavaScript))
|
||||
|
||||
CFLAGS += -std=c99 -g -I. -Dsmall $(WARNFLAGS) \
|
||||
-D_BSD_SOURCE \
|
||||
|
@ -24,16 +24,16 @@ NETSURF_FEATURE_VIDEO_CFLAGS := -DWITH_VIDEO
|
||||
|
||||
# add a line similar to below for each optional lib here
|
||||
# note: webp lacks pkg-config file
|
||||
$(eval $(call pkg_config_find_and_add,PNG,libpng,PNG ))
|
||||
$(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
|
||||
$(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
|
||||
$(eval $(call pkg_config_find_and_add,RSVG,librsvg-2.0,SVG))
|
||||
$(eval $(call pkg_config_find_and_add,NSSVG,libsvgtiny,SVG))
|
||||
$(eval $(call pkg_config_find_and_add,ROSPRITE,librosprite,Sprite))
|
||||
$(eval $(call pkg_config_find_and_add_enabled,PNG,libpng,PNG ))
|
||||
$(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,RSVG,librsvg-2.0,SVG))
|
||||
$(eval $(call pkg_config_find_and_add_enabled,NSSVG,libsvgtiny,SVG))
|
||||
$(eval $(call pkg_config_find_and_add_enabled,ROSPRITE,librosprite,Sprite))
|
||||
$(eval $(call feature_enabled,WEBP,-DWITH_WEBP,-lwebp,WebP (libwebp)))
|
||||
$(eval $(call pkg_config_find_and_add,MOZJS,mozjs185,JavaScript))
|
||||
$(eval $(call pkg_config_find_and_add,JS,mozilla-js,JavaScript))
|
||||
$(eval $(call pkg_config_find_and_add,VIDEO,gstreamer-0.10,Video))
|
||||
$(eval $(call pkg_config_find_and_add_enabled,MOZJS,mozjs185,JavaScript))
|
||||
$(eval $(call pkg_config_find_and_add_enabled,JS,mozilla-js,JavaScript))
|
||||
$(eval $(call pkg_config_find_and_add_enabled,VIDEO,gstreamer-0.10,Video))
|
||||
|
||||
# GTK and GLIB flags to disable depricated usage
|
||||
GTKDEPFLAGS := -DG_DISABLE_SINGLE_INCLUDES \
|
||||
|
@ -22,17 +22,20 @@ NETSURF_FEATURE_JS_CFLAGS := -DWITH_JS -DJS_HAS_FILE_OBJECT=0
|
||||
NETSURF_FEATURE_MOZJS_CFLAGS := -DWITH_MOZJS -DJS_HAS_FILE_OBJECT=0
|
||||
|
||||
# add a line similar to below for each optional pkg-configed lib here
|
||||
$(eval $(call pkg_config_find_and_add,NSSVG,libsvgtiny,SVG))
|
||||
$(eval $(call pkg_config_find_and_add,ROSPRITE,librosprite,Sprite))
|
||||
$(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
|
||||
$(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
|
||||
$(eval $(call pkg_config_find_and_add,PNG,libpng,PNG ))
|
||||
$(eval $(call pkg_config_find_and_add,MOZJS,mozjs185,JavaScript))
|
||||
$(eval $(call pkg_config_find_and_add,JS,mozilla-js,JavaScript))
|
||||
$(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))
|
||||
|
||||
# no pkg-config for this library
|
||||
$(eval $(call feature_enabled,WEBP,-DWITH_WEBP,-lwebp -lvpx,WebP (libwebp)))
|
||||
|
||||
#-Wno-unused-but-set-variable
|
||||
WARNFLAGS += -Werror
|
||||
|
||||
MONKEYCFLAGS := -std=c99 -Dmonkey -Dnsmonkey \
|
||||
-D_BSD_SOURCE \
|
||||
-D_XOPEN_SOURCE=600 \
|
||||
@ -47,19 +50,17 @@ MONKEYCFLAGS := -std=c99 -Dmonkey -Dnsmonkey \
|
||||
|
||||
MONKEYLDFLAGS := -lm $(shell $(PKG_CONFIG) --cflags --libs glib-2.0 lcms)
|
||||
|
||||
MONKEYWARNFLAGS := -Werror
|
||||
#-Wno-unused-but-set-variable
|
||||
|
||||
CFLAGS += $(MONKEYCFLAGS) $(MONKEYWARNFLAGS)
|
||||
CFLAGS += $(MONKEYCFLAGS)
|
||||
LDFLAGS += $(MONKEYLDFLAGS)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Windows flag setup
|
||||
# ---------------------------------------------------------------------------
|
||||
# ---------------------------------------------------------------------------
|
||||
# Windows flag setup
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
ifeq ($(HOST),Windows_NT)
|
||||
CFLAGS += -U__STRICT_ANSI__
|
||||
endif
|
||||
ifeq ($(HOST),Windows_NT)
|
||||
CFLAGS += -U__STRICT_ANSI__
|
||||
endif
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Source file setup
|
||||
|
@ -30,11 +30,11 @@ else
|
||||
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
|
||||
$(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
|
||||
$(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
|
||||
$(eval $(call pkg_config_find_and_add,PNG,libpng,PNG ))
|
||||
$(eval $(call pkg_config_find_and_add,MOZJS,mozjs185,JavaScript))
|
||||
$(eval $(call pkg_config_find_and_add,JS,mozilla-js,JavaScript))
|
||||
$(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))
|
||||
endif
|
||||
|
||||
TPD_RISCOS = $(foreach TPL,$(notdir $(TPL_RISCOS)), \
|
||||
|
Loading…
Reference in New Issue
Block a user