2010-10-27 22:39:24 +04:00
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Windows target setup
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
2011-02-04 18:54:48 +03:00
|
|
|
LDFLAGS += -L${MINGW_INSTALL_ENV}/lib
|
2011-02-04 18:44:35 +03:00
|
|
|
|
2010-10-27 22:39:24 +04:00
|
|
|
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
|
|
|
|
$(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)))
|
|
|
|
$(eval $(call feature_enabled,MNG,,-llcms -ljpeg,PNG/JNG/MNG (libmng)))
|
|
|
|
|
2011-01-23 03:39:53 +03:00
|
|
|
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)
|
2011-02-04 18:44:35 +03:00
|
|
|
else
|
|
|
|
LDFLAGS += -lhubbub -lcss -lparserutils -lwapcaplet -lxml2 -lcurl -lz
|
2011-01-23 03:39:53 +03:00
|
|
|
endif
|
|
|
|
|
2011-02-04 18:44:35 +03:00
|
|
|
LDFLAGS += -lssl -lcrypto -lregex -liconv \
|
|
|
|
-lgdi32 -lcomctl32 -lws2_32 -lmsimg32 -mwindows
|
|
|
|
|
2010-10-27 22:39:24 +04:00
|
|
|
CFLAGS += -U__STRICT_ANSI__ -mwin32
|
2011-03-17 01:19:44 +03:00
|
|
|
# only windows versions after XP are supported
|
|
|
|
CFLAGS += '-DWINVER=0x0501'
|
|
|
|
CFLAGS += '-D_WIN32_WINNT=0x0501'
|
|
|
|
CFLAGS += '-D_WIN32_WINDOWS=0x0501'
|
|
|
|
CFLAGS += '-D_WIN32_IE=0x0501'
|
2011-03-30 00:38:40 +04:00
|
|
|
|
|
|
|
#installed resource path
|
|
|
|
CFLAGS += '-DNETSURF_WINDOWS_RESPATH="$(NETSURF_WINDOWS_RESPATH)"'
|
|
|
|
|
|
|
|
|
2010-10-27 22:39:24 +04:00
|
|
|
WSCFLAGS := -std=c99 \
|
2011-01-23 16:46:30 +03:00
|
|
|
$(WARNFLAGS) -I. -I${MINGW_INSTALL_ENV}/include/ \
|
2011-02-06 18:39:46 +03:00
|
|
|
-DCURL_STATICLIB -DLIBXML_STATIC -g
|
2010-10-27 22:39:24 +04:00
|
|
|
CFLAGS += $(WSCFLAGS)
|
|
|
|
LDFLAGS += $(WSCFLAGS)
|
|
|
|
|
2010-10-29 04:54:27 +04:00
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# built-in resource setup
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
$(OBJROOT)/windows_resource.o: windows/res/resource.rc
|
|
|
|
$(VQ)echo " WINDRES: compiling windows resources"
|
|
|
|
${Q}$(MINGW_PREFIX)windres $< -O coff -o $@
|
|
|
|
|
|
|
|
S_RESOURCES := windows_resource.o
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Source file setup
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# S_WINDOWS are sources purely for the windows build
|
2011-04-04 02:01:37 +04:00
|
|
|
S_WINDOWS := main.c window.c gui.c drawable.c misc.c plot.c findfile.c \
|
|
|
|
font.c bitmap.c about.c prefs.c download.c filetype.c \
|
|
|
|
localhistory.c login.c schedule.c thumbnail.c tree.c \
|
|
|
|
windbg.c system_colour.c
|
2010-10-29 04:54:27 +04:00
|
|
|
S_WINDOWS := $(addprefix windows/,$(S_WINDOWS))
|
|
|
|
|
|
|
|
SOURCES := $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_WINDOWS) $(S_RESOURCES)
|
|
|
|
EXETARGET := NetSurf.exe
|