make cocoa build use pkg-config properly and build release tarballs (primarily jmb I just made it link)

svn path=/trunk/netsurf/; revision=12879
This commit is contained in:
Vincent Sanders 2011-09-26 10:04:29 +00:00
parent e7dffc15b1
commit 07d140f0f1
2 changed files with 15 additions and 8 deletions

View File

@ -393,7 +393,7 @@ ifeq ($(TARGET),cocoa)
# Enable NetSurf's use of libsvgtiny for displaying SVGs # Enable NetSurf's use of libsvgtiny for displaying SVGs
# Valid options: YES, NO, AUTO # Valid options: YES, NO, AUTO
NETSURF_USE_NSSVG := YES NETSURF_USE_NSSVG := AUTO
NETSURF_USE_MNG := NO NETSURF_USE_MNG := NO
NETSURF_USE_BMP := NO NETSURF_USE_BMP := NO

View File

@ -4,9 +4,11 @@
POSTEXES += NetSurf.app POSTEXES += NetSurf.app
LDFLAGS += -L/usr/lib
LDFLAGS += $(shell $(PKG_CONFIG) --libs libxml-2.0 libhubbub libcss)
LDFLAGS += -L/usr/X11/lib LDFLAGS += -L/usr/X11/lib
LDFLAGS += -lm -lxml2 -lcurl -liconv LDFLAGS += -lm -lxml2 -lcurl -liconv
LDFLAGS += -lssl -lcrypto -lhubbub -lcss -lparserutils -lwapcaplet LDFLAGS += -lssl -lcrypto
CFLAGS += -I. -O $(WARNFLAGS) -Dnscocoa \ CFLAGS += -I. -O $(WARNFLAGS) -Dnscocoa \
-D_BSD_SOURCE -D_POSIX_C_SOURCE \ -D_BSD_SOURCE -D_POSIX_C_SOURCE \
@ -14,6 +16,8 @@
CFLAGS += -g -Os -Wno-uninitialized CFLAGS += -g -Os -Wno-uninitialized
CFLAGS += $(shell $(PKG_CONFIG) --cflags libxml-2.0 libhubbub libcss)
# shut up zconf.h and zlib.h # shut up zconf.h and zlib.h
#CFLAGS += -D_LARGEFILE64_SOURCE=1 #CFLAGS += -D_LARGEFILE64_SOURCE=1
@ -43,12 +47,15 @@ endif
LDFLAGS += -Wl,-framework,Cocoa -Wl,-framework,Carbon $(NETLDFLAGS) LDFLAGS += -Wl,-framework,Cocoa -Wl,-framework,Carbon $(NETLDFLAGS)
CFLAGS += -I$(PREFIX)/include NETSURF_FEATURE_BMP_CFLAGS := -DWITH_BMP
LDFLAGS += -L$(PREFIX)/lib NETSURF_FEATURE_GIF_CFLAGS := -DWITH_GIF
$(eval $(call feature_enabled,BMP,-DWITH_BMP,-lnsbmp,BMP (libnsbmp))) NETSURF_FEATURE_PNG_CFLAGS := -DWITH_PNG
$(eval $(call feature_enabled,GIF,-DWITH_GIF,-lnsgif,GIF (libnsgif))) NETSURF_FEATURE_NSSVG_CFLAGS := -DWITH_NS_SVG
$(eval $(call feature_enabled,PNG,-DWITH_PNG,-lpng,PNG (libpng) ))
$(eval $(call feature_enabled,NSSVG,-DWITH_NS_SVG,-lsvgtiny,SVG (libsvgtiny))) $(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 )) $(eval $(call feature_enabled,IMAGEIO,-DWITH_APPLE_IMAGE,,Apple ImageIO ))
ifneq ($(UNIVERSAL),) ifneq ($(UNIVERSAL),)