From 3faaff91ac61b6a0906dd94a3f9455e31d4d6b43 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 23 Jul 2012 21:12:19 +0100 Subject: [PATCH] change to use netsurf toolchain build --- Makefile | 11 ++++++----- windows/Makefile.target | 15 ++++++++------- windows/gui.c | 4 ++-- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index d51936fbb..087fa69bb 100644 --- a/Makefile +++ b/Makefile @@ -207,12 +207,13 @@ else ifeq ($(TARGET),windows) ifneq ($(HOST),windows) # Set Mingw defaults - MINGW_PREFIX ?= i586-mingw32msvc- - MINGW_INSTALL_ENV ?= /usr/i586-mingw32msvc/ + GCCSDK_INSTALL_ENV ?= /opt/netsurf/i686-w64-mingw32/env + GCCSDK_INSTALL_CROSSBIN ?= /opt/netsurf/i686-w64-mingw32/cross/bin - # mingw cross-compile - CC := $(MINGW_PREFIX)gcc - PKG_CONFIG := $(MINGW_INSTALL_ENV)/bin/pkg-config + CC := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*gcc) + WINDRES := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*windres) + + PKG_CONFIG := PKG_CONFIG_LIBDIR="$(GCCSDK_INSTALL_ENV)/lib/pkgconfig" pkg-config else # Building on Windows CC := gcc diff --git a/windows/Makefile.target b/windows/Makefile.target index 73436679b..084726bc7 100644 --- a/windows/Makefile.target +++ b/windows/Makefile.target @@ -2,7 +2,8 @@ # Windows target setup # ---------------------------------------------------------------------------- - LDFLAGS += -L${MINGW_INSTALL_ENV}/lib + LDFLAGS += -L${GCCSDK_INSTALL_ENV}/lib + CFLAGS += -I${GCCSDK_INSTALL_ENV}/include/ NETSURF_FEATURE_NSSVG_CFLAGS := -DWITH_NS_SVG NETSURF_FEATURE_ROSPRITE_CFLAGS := -DWITH_NSSPRITE @@ -17,9 +18,9 @@ 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) + libparserutils libdom libwapcaplet libcares libxml-2.0) + LDFLAGS += $(shell $(PKG_CONFIG) --libs zlib libxml-2.0 libcares libcurl \ + libhubbub libparserutils libcss libdom libwapcaplet) else LDFLAGS += -lhubbub -lcss -lparserutils -lwapcaplet -lxml2 -lcurl -lz endif @@ -39,8 +40,8 @@ WSCFLAGS := -std=c99 \ - $(WARNFLAGS) -I. -I${MINGW_INSTALL_ENV}/include/ \ - -DCURL_STATICLIB -DLIBXML_STATIC -g + $(WARNFLAGS) -I. \ + -DCURL_STATICLIB -DLIBXML_STATIC -DCARES_STATICLIB -g CFLAGS += $(WSCFLAGS) LDFLAGS += $(WSCFLAGS) @@ -50,7 +51,7 @@ $(OBJROOT)/windows_resource.o: windows/res/resource.rc $(VQ)echo " WINDRES: compiling windows resources" - ${Q}$(MINGW_PREFIX)windres $< -O coff -o $@ + ${Q}$(WINDRES) $< -O coff -o $@ S_RESOURCES := windows_resource.o diff --git a/windows/gui.c b/windows/gui.c index b98bde469..8ad3b32a9 100644 --- a/windows/gui.c +++ b/windows/gui.c @@ -1792,7 +1792,7 @@ bool gui_commit_clipboard(void) { return false; } - +/* static bool gui_selection_traverse_handler(const char *text, size_t length, @@ -1814,7 +1814,7 @@ gui_selection_traverse_handler(const char *text, return true; } - +*/ bool gui_copy_to_clipboard(struct selection *s) { if (selection_defined(s)) {