From 07d140f0f170f182e9434b6b559b77793ae7120c Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 26 Sep 2011 10:04:29 +0000 Subject: [PATCH] make cocoa build use pkg-config properly and build release tarballs (primarily jmb I just made it link) svn path=/trunk/netsurf/; revision=12879 --- Makefile.defaults | 2 +- cocoa/Makefile.target | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Makefile.defaults b/Makefile.defaults index e052d8820..dd235d82a 100644 --- a/Makefile.defaults +++ b/Makefile.defaults @@ -393,7 +393,7 @@ ifeq ($(TARGET),cocoa) # Enable NetSurf's use of libsvgtiny for displaying SVGs # Valid options: YES, NO, AUTO - NETSURF_USE_NSSVG := YES + NETSURF_USE_NSSVG := AUTO NETSURF_USE_MNG := NO NETSURF_USE_BMP := NO diff --git a/cocoa/Makefile.target b/cocoa/Makefile.target index 6f3d9e2b9..0fea50151 100644 --- a/cocoa/Makefile.target +++ b/cocoa/Makefile.target @@ -4,9 +4,11 @@ POSTEXES += NetSurf.app + LDFLAGS += -L/usr/lib + LDFLAGS += $(shell $(PKG_CONFIG) --libs libxml-2.0 libhubbub libcss) LDFLAGS += -L/usr/X11/lib LDFLAGS += -lm -lxml2 -lcurl -liconv - LDFLAGS += -lssl -lcrypto -lhubbub -lcss -lparserutils -lwapcaplet + LDFLAGS += -lssl -lcrypto CFLAGS += -I. -O $(WARNFLAGS) -Dnscocoa \ -D_BSD_SOURCE -D_POSIX_C_SOURCE \ @@ -14,6 +16,8 @@ CFLAGS += -g -Os -Wno-uninitialized + CFLAGS += $(shell $(PKG_CONFIG) --cflags libxml-2.0 libhubbub libcss) + # shut up zconf.h and zlib.h #CFLAGS += -D_LARGEFILE64_SOURCE=1 @@ -43,12 +47,15 @@ endif LDFLAGS += -Wl,-framework,Cocoa -Wl,-framework,Carbon $(NETLDFLAGS) - CFLAGS += -I$(PREFIX)/include - LDFLAGS += -L$(PREFIX)/lib - $(eval $(call feature_enabled,BMP,-DWITH_BMP,-lnsbmp,BMP (libnsbmp))) - $(eval $(call feature_enabled,GIF,-DWITH_GIF,-lnsgif,GIF (libnsgif))) - $(eval $(call feature_enabled,PNG,-DWITH_PNG,-lpng,PNG (libpng) )) - $(eval $(call feature_enabled,NSSVG,-DWITH_NS_SVG,-lsvgtiny,SVG (libsvgtiny))) + NETSURF_FEATURE_BMP_CFLAGS := -DWITH_BMP + NETSURF_FEATURE_GIF_CFLAGS := -DWITH_GIF + 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 feature_enabled,IMAGEIO,-DWITH_APPLE_IMAGE,,Apple ImageIO )) ifneq ($(UNIVERSAL),)