2012-08-23 14:46:31 +04:00
|
|
|
#
|
|
|
|
# Makefile for NetSurf Windows target
|
|
|
|
#
|
|
|
|
# This file is part of NetSurf
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2012-12-20 19:27:07 +04:00
|
|
|
LDFLAGS += -L${GCCSDK_INSTALL_ENV}/lib
|
|
|
|
CFLAGS += -I${GCCSDK_INSTALL_ENV}/include/
|
2011-02-04 18:44:35 +03:00
|
|
|
|
2012-12-20 19:27:07 +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
|
2010-10-27 22:39:24 +04:00
|
|
|
|
2012-12-20 19:27:07 +04:00
|
|
|
$(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)))
|
2011-01-23 03:39:53 +03:00
|
|
|
|
2012-12-20 19:27:07 +04:00
|
|
|
ifneq ($(PKG_CONFIG),)
|
|
|
|
$(eval $(call pkg_config_find_and_add,zlib,ZLib))
|
2012-12-20 21:34:17 +04:00
|
|
|
$(eval $(call pkg_config_find_and_add,libcurl,Curl))
|
2012-12-20 19:27:07 +04:00
|
|
|
$(eval $(call pkg_config_find_and_add,libcares,Cares))
|
|
|
|
else
|
2015-04-18 00:48:55 +03:00
|
|
|
LDFLAGS += -lcurl -lz
|
2012-12-20 19:27:07 +04:00
|
|
|
endif
|
|
|
|
|
2015-04-28 18:23:35 +03:00
|
|
|
LDFLAGS += -lssl -lcrypto -lgnurx -lgdi32 -lcomctl32 -lws2_32 -lmsimg32 -mwindows
|
2011-02-04 18:44:35 +03:00
|
|
|
|
2012-12-20 19:27:07 +04:00
|
|
|
CFLAGS += -U__STRICT_ANSI__ -mwin32
|
|
|
|
# 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
|
|
|
|
2012-12-20 19:27:07 +04:00
|
|
|
#installed resource path
|
|
|
|
CFLAGS += '-DNETSURF_WINDOWS_RESPATH="$(NETSURF_WINDOWS_RESPATH)"'
|
2011-03-30 00:38:40 +04:00
|
|
|
|
2014-09-05 19:01:44 +04:00
|
|
|
WSCFLAGS := -std=c99 -DCURL_STATICLIB -DCARES_STATICLIB -g
|
2011-03-30 00:38:40 +04:00
|
|
|
|
2012-12-20 19:27:07 +04:00
|
|
|
CFLAGS += $(WSCFLAGS)
|
|
|
|
LDFLAGS += $(WSCFLAGS)
|
2010-10-27 22:39:24 +04:00
|
|
|
|
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"
|
2012-07-24 00:12:19 +04:00
|
|
|
${Q}$(WINDRES) $< -O coff -o $@
|
2010-10-29 04:54:27 +04:00
|
|
|
|
|
|
|
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 \
|
2015-04-24 17:29:10 +03:00
|
|
|
localhistory.c schedule.c windbg.c pointers.c
|
2010-10-29 04:54:27 +04:00
|
|
|
S_WINDOWS := $(addprefix windows/,$(S_WINDOWS))
|
|
|
|
|
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
|
2011-09-05 14:46:53 +04:00
|
|
|
SOURCES = $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_WINDOWS) $(S_RESOURCES)
|
2010-10-29 04:54:27 +04:00
|
|
|
EXETARGET := NetSurf.exe
|
2012-08-13 00:50:36 +04:00
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Install target
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
2012-08-23 14:46:31 +04:00
|
|
|
install-windows:
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Package target
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
package-windows: netsurf-installer.exe
|
2012-08-13 00:50:36 +04:00
|
|
|
|
2012-11-03 17:40:34 +04:00
|
|
|
WIN_RES_OBJ := installer.nsi NetSurf.ico netsurf.png welcome.html default.css
|
|
|
|
WIN_RES_INS_OBJ := $(addprefix windows/res/,$(WIN_RES_OBJ)) $(OBJROOT)/messages
|
|
|
|
|
|
|
|
$(OBJROOT)/messages: resources/FatMessages
|
2013-05-02 12:24:18 +04:00
|
|
|
$(Q)$(SPLIT_MESSAGES) -l en -p win -f messages resources/FatMessages > $@
|
2012-08-13 00:50:36 +04:00
|
|
|
|
|
|
|
netsurf-installer.exe: $(EXETARGET) $(WIN_RES_INS_OBJ)
|
|
|
|
makensis -V4 -NOCD windows/res/installer.nsi
|