diff options
author | Ole Loots <ole@monochrom.net> | 2012-12-18 01:28:22 +0100 |
---|---|---|
committer | Ole Loots <ole@monochrom.net> | 2012-12-18 01:28:22 +0100 |
commit | 3019368c93600a335445c09178c9554074c7f656 (patch) | |
tree | 872c3bcbba0b74584cda24bee36ffe784806108f /gtk | |
parent | c6a5109a95c1206ccf63d99316fa12b8c43bb7cf (diff) | |
parent | 0d803b6c0d252c3a1a9fa07e37d9a0b08ce567b8 (diff) | |
download | netsurf-3019368c93600a335445c09178c9554074c7f656.tar.gz netsurf-3019368c93600a335445c09178c9554074c7f656.tar.bz2 |
Merge branch 'master' into mono/removing-windom-dependency
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/Makefile.defaults | 34 | ||||
-rw-r--r-- | gtk/Makefile.target | 41 |
2 files changed, 56 insertions, 19 deletions
diff --git a/gtk/Makefile.defaults b/gtk/Makefile.defaults new file mode 100644 index 000000000..23d4c1749 --- /dev/null +++ b/gtk/Makefile.defaults @@ -0,0 +1,34 @@ +# ---------------------------------------------------------------------------- +# GTK-specific options +# ---------------------------------------------------------------------------- + + # Where to search for NetSurf's resources after looking in ~/.netsurf and + # $NETSURFRES. It must have a trailing / + NETSURF_GTK_RESOURCES := $(PREFIX)/share/netsurf/ + + # Where to install the netsurf binary + NETSURF_GTK_BIN := $(PREFIX)/bin/ + + # Enable NetSurf's use of librsvg in conjunction with Cairo to display SVGs + # Valid options: YES, NO, AUTO + NETSURF_USE_RSVG := AUTO + + # Enable NetSurf's use of libsvgtiny for displaying SVGs + # Valid options: YES, NO, AUTO + NETSURF_USE_NSSVG := AUTO + + # Enable NetSurf's use of librosprite for displaying RISC OS Sprites + # Valid options: YES, NO, AUTO + NETSURF_USE_ROSPRITE := AUTO + + # Configuration overrides for Mac OS X + ifeq ($(HOST),macosx) + NETSURF_USE_LIBICONV_PLUG := NO + NETSURF_USE_HARU_PDF := NO + endif + + # Set default GTK version to build for (2 or 3) + NETSURF_GTK_MAJOR := 2 + + # Optimisation levels + CFLAGS += -O2 diff --git a/gtk/Makefile.target b/gtk/Makefile.target index 1b2bef526..f9b5436af 100644 --- a/gtk/Makefile.target +++ b/gtk/Makefile.target @@ -7,9 +7,6 @@ # GTK flag setup (using pkg-config) # ---------------------------------------------------------------------------- -LDFLAGS += $(shell $(PKG_CONFIG) --libs libcurl libdom libcss) -LDFLAGS += $(shell $(PKG_CONFIG) --libs openssl) - # define additional CFLAGS and LDFLAGS requirements for pkg-configed libs here NETSURF_FEATURE_RSVG_CFLAGS := -DWITH_RSVG NETSURF_FEATURE_NSSVG_CFLAGS := -DWITH_NS_SVG @@ -24,16 +21,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 \ @@ -54,16 +51,22 @@ GTKCFLAGS := -std=c99 -Dgtk -Dnsgtk \ -D_POSIX_C_SOURCE=200112L \ -D_NETBSD_SOURCE \ -DGTK_RESPATH=\"$(NETSURF_GTK_RESOURCES)\" \ - $(WARNFLAGS) -I. -g \ - $(shell $(PKG_CONFIG) --cflags gtk+-$(NETSURF_GTK_MAJOR).0) \ - $(shell $(PKG_CONFIG) --cflags libhubbub libcurl) \ - $(shell $(PKG_CONFIG) --cflags openssl) \ - $(shell xml2-config --cflags) + $(WARNFLAGS) -I. -g + +# non optional pkg-configed libs +$(eval $(call pkg_config_find_and_add,libcss,CSS)) +$(eval $(call pkg_config_find_and_add,libdom,DOM)) +$(eval $(call pkg_config_find_and_add,libhubbub,Hubbub)) +$(eval $(call pkg_config_find_and_add,openssl,OpenSSL)) +$(eval $(call pkg_config_find_and_add,libcurl,Curl )) +$(eval $(call pkg_config_find_and_add,gtk+-$(NETSURF_GTK_MAJOR).0,GTK-$(NETSURF_GTK_MAJOR))) +$(eval $(call pkg_config_find_and_add,gthread-2.0,GThread2)) +$(eval $(call pkg_config_find_and_add,gmodule-2.0,GModule2)) +$(eval $(call pkg_config_find_and_add,lcms,lcms)) -GTKLDFLAGS := $(shell $(PKG_CONFIG) --cflags --libs gtk+-$(NETSURF_GTK_MAJOR).0 gthread-2.0 gmodule-2.0 lcms) CFLAGS += $(GTKCFLAGS) -LDFLAGS += -lm $(GTKLDFLAGS) +LDFLAGS += -lm # --------------------------------------------------------------------------- # Windows flag setup |