2010-10-27 22:39:24 +04:00
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# GTK flag setup (using pkg-config)
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
2011-09-16 15:09:58 +04:00
|
|
|
LDFLAGS += $(shell $(PKG_CONFIG) --libs libxml-2.0 libcurl libhubbub libcss)
|
|
|
|
LDFLAGS += $(shell $(PKG_CONFIG) --libs openssl)
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2011-09-16 15:09:58 +04:00
|
|
|
# define additional CFLAGS and LDFLAGS requirements for pkg-configed libs here
|
|
|
|
NETSURF_FEATURE_RSVG_CFLAGS := -DWITH_RSVG
|
|
|
|
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_WEBP_CFLAGS := -DWITH_WEBP
|
2011-12-06 02:33:02 +04:00
|
|
|
NETSURF_FEATURE_VIDEO_CFLAGS := -DWITH_VIDEO
|
2012-01-02 01:42:38 +04:00
|
|
|
NETSURF_FEATURE_JS_CFLAGS := -DWITH_JS -DJS_HAS_FILE_OBJECT=0
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2011-09-16 15:09:58 +04:00
|
|
|
# add a line similar to below for each optional pkg-configed lib here
|
|
|
|
$(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,BMP,libnsbmp,BMP))
|
|
|
|
$(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
|
|
|
|
$(eval $(call pkg_config_find_and_add,PNG,libpng,PNG ))
|
2011-12-06 02:33:02 +04:00
|
|
|
$(eval $(call pkg_config_find_and_add,VIDEO,gstreamer-0.10,Video))
|
2012-01-02 17:42:51 +04:00
|
|
|
$(eval $(call pkg_config_find_and_add,JS,mozilla-js,JavaScript))
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2011-09-16 15:09:58 +04:00
|
|
|
# no pkg-config for this library
|
|
|
|
$(eval $(call feature_enabled,WEBP,-DWITH_WEBP,-lwebp,WebP (libwebp)))
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2011-09-16 15:09:58 +04:00
|
|
|
# GTK and GLIB flags to disable depricated usage
|
|
|
|
GTKDEPFLAGS := -DG_DISABLE_SINGLE_INCLUDES \
|
|
|
|
-DG_DISABLE_DEPRECATED \
|
|
|
|
-DGTK_DISABLE_SINGLE_INCLUDES \
|
|
|
|
-DGTK_DISABLE_DEPRECATED \
|
2011-09-17 18:58:42 +04:00
|
|
|
-DGTK_MULTIHEAD_SAFE \
|
|
|
|
-DPANGO_DISABLE_DEPRECATED \
|
|
|
|
-DGDK_PIXBUF_DISABLE_DEPRECATED
|
|
|
|
|
|
|
|
# libsexy currently means we cannot enable this
|
|
|
|
# -DGDK_DISABLE_DEPRECATED
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2011-09-16 15:09:58 +04:00
|
|
|
GTKCFLAGS := -std=c99 -Dgtk -Dnsgtk \
|
|
|
|
$(GTKDEPFLAGS) \
|
2010-10-27 22:39:24 +04:00
|
|
|
-D_BSD_SOURCE \
|
|
|
|
-D_XOPEN_SOURCE=600 \
|
|
|
|
-D_POSIX_C_SOURCE=200112L \
|
|
|
|
-D_NETBSD_SOURCE \
|
|
|
|
-DGTK_RESPATH=\"$(NETSURF_GTK_RESOURCES)\" \
|
|
|
|
$(WARNFLAGS) -I. -g \
|
|
|
|
$(shell $(PKG_CONFIG) --cflags libglade-2.0 gtk+-2.0) \
|
|
|
|
$(shell $(PKG_CONFIG) --cflags libhubbub libcurl) \
|
|
|
|
$(shell $(PKG_CONFIG) --cflags openssl) \
|
|
|
|
$(shell xml2-config --cflags)
|
|
|
|
|
2011-09-16 15:09:58 +04:00
|
|
|
GTKLDFLAGS := $(shell $(PKG_CONFIG) --cflags --libs libglade-2.0 gtk+-2.0 gthread-2.0 gmodule-2.0 lcms)
|
2011-05-08 23:54:35 +04:00
|
|
|
|
2011-09-16 15:09:58 +04:00
|
|
|
CFLAGS += $(GTKCFLAGS)
|
|
|
|
LDFLAGS += $(GTKLDFLAGS)
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2011-09-16 15:09:58 +04:00
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# Windows flag setup
|
|
|
|
# ---------------------------------------------------------------------------
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2011-09-16 15:09:58 +04:00
|
|
|
ifeq ($(HOST),Windows_NT)
|
2010-10-27 22:39:24 +04:00
|
|
|
CFLAGS += -U__STRICT_ANSI__
|
2011-09-16 15:09:58 +04:00
|
|
|
endif
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2010-10-29 04:54:27 +04:00
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Source file setup
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# S_GTK are sources purely for the GTK build
|
2011-01-30 02:40:22 +03:00
|
|
|
S_GTK := font_pango.c bitmap.c gui.c schedule.c thumbnail.c plotters.c \
|
2011-12-30 04:58:35 +04:00
|
|
|
treeview.c scaffolding.c gdk.c completion.c login.c throbber.c \
|
2011-01-30 02:40:22 +03:00
|
|
|
selection.c history.c window.c filetype.c download.c menu.c \
|
|
|
|
print.c save.c search.c tabs.c theme.c toolbar.c \
|
2011-01-30 16:40:47 +03:00
|
|
|
sexy_icon_entry.c compat.c cookies.c hotlist.c system_colour.c \
|
2011-01-30 02:40:22 +03:00
|
|
|
$(addprefix dialogs/,options.c about.c source.c)
|
2010-10-29 04:54:27 +04:00
|
|
|
S_GTK := $(addprefix gtk/,$(S_GTK)) $(addprefix utils/,container.c)
|
|
|
|
# code in utils/container.ch is non-universal it seems
|
|
|
|
|
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_GTK)
|
2010-10-29 04:54:27 +04:00
|
|
|
EXETARGET := nsgtk
|