mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-26 22:09:43 +03:00
802f58f10d
Use target makefiles to set build sources svn path=/trunk/netsurf/; revision=10916
53 lines
2.3 KiB
Makefile
53 lines
2.3 KiB
Makefile
# ----------------------------------------------------------------------------
|
|
# Windows target setup
|
|
# ----------------------------------------------------------------------------
|
|
|
|
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)))
|
|
|
|
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
|
|
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
|
|
CFLAGS += $(WSCFLAGS)
|
|
LDFLAGS += $(WSCFLAGS)
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# 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
|
|
S_WINDOWS := about.c bitmap.c download.c filetype.c findfile.c font.c \
|
|
gui.c localhistory.c login.c misc.c plot.c prefs.c schedule.c \
|
|
thumbnail.c tree.c windbg.c
|
|
S_WINDOWS := $(addprefix windows/,$(S_WINDOWS))
|
|
|
|
SOURCES := $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_WINDOWS) $(S_RESOURCES)
|
|
EXETARGET := NetSurf.exe
|