summaryrefslogtreecommitdiff
path: root/makefiles
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2012-07-23 00:01:10 +0100
committerVincent Sanders <vince@kyllikki.org>2012-07-23 00:01:10 +0100
commit37c5c61657cd9b625bc43e6427f07968d974fd93 (patch)
tree2b13bb37ff2f4a8e17b983cbcbf188fb515102d7 /makefiles
parent1bf565c3dc56265e1278e24d8ad7427867c026b5 (diff)
downloadbuildsystem-37c5c61657cd9b625bc43e6427f07968d974fd93.tar.gz
buildsystem-37c5c61657cd9b625bc43e6427f07968d974fd93.tar.bz2
update windows buildtools to use our mingw toolchain build
Diffstat (limited to 'makefiles')
-rw-r--r--makefiles/Makefile.tools38
1 files changed, 29 insertions, 9 deletions
diff --git a/makefiles/Makefile.tools b/makefiles/Makefile.tools
index c501cf8..5e7a5f7 100644
--- a/makefiles/Makefile.tools
+++ b/makefiles/Makefile.tools
@@ -237,22 +237,42 @@ ifeq ($(TARGET),windows)
PKGCONFIG ?=
else
# Cross compiling for Windows -- assumes mingw toolchain
- MINGW_INSTALL_ENV ?= /usr/local/mingw
- CC__ := i586-mingw32msvc-gcc
- CXX__ := i586-mingw32msvc-g++
- AR__ := i586-mingw32msvc-ar
+ ifeq ($(origin GCCSDK_INSTALL_ENV),undefined)
+ ifneq ($(realpath /opt/netsurf/i686-w64-mingw32/env),)
+ GCCSDK_INSTALL_ENV := /opt/netsurf/i686-w64-mingw32/env
+ else
+ GCCSDK_INSTALL_ENV := /usr/local/mingw
+ endif
+ endif
+
+ ifeq ($(origin GCCSDK_INSTALL_CROSSBIN),undefined)
+ ifneq ($(realpath /opt/netsurf/i686-w64-mingw32/cross/bin),)
+ GCCSDK_INSTALL_CROSSBIN := /opt/netsurf/i686-w64-mingw32/cross/bin
+ AR__ := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*ar)
+ CC__ := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*gcc)
+ CXX__ := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*g++)
+ else
+ GCCSDK_INSTALL_CROSSBIN := /usr/local/mingw/bin
+ CC__ := i586-mingw32msvc-gcc
+ CXX__ := i586-mingw32msvc-g++
+ AR__ := i586-mingw32msvc-ar
+ endif
+ endif
+
+ GENHTML ?= echo
+ LCOV ?= echo
+ PKGCONFIG ?= PKG_CONFIG_LIBDIR="$(PREFIX)/lib/pkgconfig:$(GCCSDK_INSTALL_ENV)/lib/pkgconfig:$(GCCSDK_INSTALL_ENV)/share/pkgconfig" pkg-config
- PKGCONFIG ?= PKG_CONFIG_LIBDIR="$(PREFIX)/lib/pkgconfig:$(MINGW_INSTALL_ENV)/lib/pkgconfig:$(MINGW_INSTALL_ENV)/share/pkgconfig" pkg-config
endif
# TODO: this assumes GCC
- CFLAGS := $(CFLAGS) -U__STRICT_ANSI__ -I$(MINGW_INSTALL_ENV)/include
- CXXFLAGS := $(CXXFLAGS) -U__STRICT_ANSI__ -I$(MINGW_INSTALL_ENV)/include
- LDFLAGS := $(LDFLAGS) -L$(MINGW_INSTALL_ENV)/lib
+ CFLAGS := $(CFLAGS) -U__STRICT_ANSI__ -I$(GCCSDK_INSTALL_ENV)/include
+ CXXFLAGS := $(CXXFLAGS) -U__STRICT_ANSI__ -I$(GCCSDK_INSTALL_ENV)/include
+ LDFLAGS := $(LDFLAGS) -L$(GCCSDK_INSTALL_ENV)/lib
# Default prefix
- PREFIX ?= $(MINGW_INSTALL_ENV)
+ PREFIX ?= $(GCCSDK_INSTALL_ENV)
endif
# AmigaOS (3/4; m68k/ppc: we can treat them identically)