Cope with an absence of pkg-config when building for Windows

svn path=/trunk/netsurf/; revision=11459
This commit is contained in:
John Mark Bell 2011-01-23 00:39:53 +00:00
parent c873d789dc
commit 4976247df0
1 changed files with 10 additions and 7 deletions

View File

@ -13,18 +13,21 @@
$(eval $(call feature_enabled,NSSVG,-DWITH_NS_SVG,-lsvgtiny,SVG (libsvgtiny)))
$(eval $(call feature_enabled,MNG,,-llcms -ljpeg,PNG/JNG/MNG (libmng)))
LDFLAGS += -L${MINGW_INSTALL_ENV}/lib $(shell $(PKG_CONFIG) --libs zlib \
libxml-2.0 libcurl libhubbub libparserutils libcss libwapcaplet) \
-lparserutils -lssl -lcrypto -lregex -liconv -lcss -lwapcaplet \
-lgdi32 -lcomctl32 -lws2_32 -lmsimg32 -mwindows
ifneq ($(PKG_CONFIG),)
CFLAGS += $(shell $(PKG_CONFIG) --cflags libcurl libhubbub zlib \
libparserutils libxml-2.0)
LDFLAGS += $(shell $(PKG_CONFIG) --libs zlib libxml-2.0 libcurl \
libhubbub libparserutils libcss libwapcaplet)
endif
LDFLAGS += -L${MINGW_INSTALL_ENV}/lib -lparserutils -lssl -lcrypto -lregex \
-liconv -lcss -lwapcaplet -lgdi32 -lcomctl32 -lws2_32 -lmsimg32 -mwindows
CFLAGS += -U__STRICT_ANSI__ -mwin32
# only windows versions after 2000 are supported
CFLAGS += '-DWINVER=0x0500'
WSCFLAGS := -std=c99 \
$(WARNFLAGS) -I. -I/${MINGW_INSTALL_ENV}/include \
-DCURL_STATICLIB \
$(shell $(PKG_CONFIG) --cflags libcurl libhubbub zlib libparserutils \
libxml-2.0) -g
-DCURL_STATICLIB -g
CFLAGS += $(WSCFLAGS)
LDFLAGS += $(WSCFLAGS)