mxe/src/wxwidgets.mk

110 lines
3.6 KiB
Makefile
Raw Normal View History

2012-03-28 14:46:58 +01:00
# This file is part of MXE.
2012-03-29 11:14:15 +01:00
# See index.html for further information.
2009-02-27 14:26:55 +00:00
PKG := wxwidgets
$(PKG)_IGNORE :=
$(PKG)_VERSION := 3.0.2
$(PKG)_CHECKSUM := 6461eab4428c0a8b9e41781b8787510484dea800
$(PKG)_SUBDIR := wxWidgets-$($(PKG)_VERSION)
$(PKG)_FILE := wxWidgets-$($(PKG)_VERSION).tar.bz2
2010-09-09 21:25:41 +01:00
$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/wxwindows/$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_DEPS := gcc libiconv libpng jpeg tiff sdl zlib expat
2009-02-27 14:26:55 +00:00
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://sourceforge.net/projects/wxwindows/files/' | \
$(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \
head -1
2009-02-27 14:26:55 +00:00
endef
define $(PKG)_CONFIGURE_OPTS
2009-02-27 14:26:55 +00:00
--host='$(TARGET)' \
--build="`config.guess`" \
2009-02-27 14:26:55 +00:00
--disable-shared \
--prefix='$(PREFIX)/$(TARGET)' \
--enable-gui \
--disable-stl \
--enable-threads \
--disable-universal \
2009-02-27 14:26:55 +00:00
--with-themes=all \
--with-msw \
--with-opengl \
--with-libpng=sys \
2009-02-27 14:26:55 +00:00
--with-libjpeg=sys \
--with-libtiff=sys \
--with-regex=yes \
2009-02-27 14:26:55 +00:00
--with-zlib=sys \
--with-expat=sys \
--with-sdl \
--without-gtk \
--without-motif \
--without-mac \
--without-macosx-sdk \
--without-cocoa \
--without-wine \
--without-pm \
--without-microwin \
--without-libxpm \
--without-libmspack \
--without-gnomeprint \
--without-gnomevfs \
--without-hildon \
--without-dmalloc \
--without-odbc \
LIBS=" `'$(TARGET)-pkg-config' --libs-only-l libtiff-4`" \
CXXFLAGS='-std=gnu++11' \
CXXCPP='$(TARGET)-g++ -E -std=gnu++11'
endef
define $(PKG)_BUILD_UNICODE
# build the wxWidgets variant with unicode support
mkdir '$(1).unicode'
cd '$(1).unicode' && '$(1)/configure' \
$($(PKG)_CONFIGURE_OPTS) \
--enable-unicode
$(MAKE) -C '$(1).unicode' -j '$(JOBS)' \
$(MXE_DISABLE_CRUFT)
-$(MAKE) -C '$(1).unicode/locale' -j '$(JOBS)' allmo \
$(MXE_DISABLE_CRUFT)
$(MAKE) -C '$(1).unicode' -j 1 install \
$(MXE_DISABLE_CRUFT) __install_wxrc___depname=
$(INSTALL) -m755 '$(PREFIX)/$(TARGET)/bin/wx-config' \
'$(PREFIX)/bin/$(TARGET)-wx-config'
endef
2013-11-12 05:56:37 +00:00
# ansi build has been long deprecated
# so don't build it by default
define $(PKG)_BUILD_ANSI
# build the wxWidgets variant without unicode support
mkdir '$(1).ansi'
cd '$(1).ansi' && '$(1)/configure' \
$($(PKG)_CONFIGURE_OPTS) \
--disable-unicode
$(MAKE) -C '$(1).ansi' -j '$(JOBS)' $(MXE_DISABLE_CRUFT)
# backup of the unicode wx-config script
# such that "make install" won't overwrite it
mv '$(PREFIX)/$(TARGET)/bin/wx-config' '$(PREFIX)/$(TARGET)/bin/wx-config-backup'
$(MAKE) -C '$(1).ansi' -j 1 install $(MXE_DISABLE_CRUFT) __install_wxrc___depname=
mv '$(PREFIX)/$(TARGET)/bin/wx-config' '$(PREFIX)/$(TARGET)/bin/wx-config-nounicode'
$(INSTALL) -m755 '$(PREFIX)/$(TARGET)/bin/wx-config-nounicode' '$(PREFIX)/bin/$(TARGET)-wx-config-nounicode'
# restore the unicode wx-config script
mv '$(PREFIX)/$(TARGET)/bin/wx-config-backup' '$(PREFIX)/$(TARGET)/bin/wx-config'
endef
2010-12-05 17:37:02 +00:00
define $(PKG)_TEST
2010-12-05 17:37:02 +00:00
# build test program
'$(TARGET)-g++' \
-W -Wall -Werror -Wno-error=unused-local-typedefs -pedantic -std=gnu++0x \
2010-12-05 17:37:02 +00:00
'$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-wxwidgets.exe' \
`'$(TARGET)-wx-config' --cflags --libs`
2009-02-27 14:26:55 +00:00
endef
define $(PKG)_BUILD
$($(PKG)_BUILD_UNICODE)
$($(PKG)_TEST)
endef
$(PKG)_BUILD_SHARED =