summaryrefslogtreecommitdiffstats
path: root/src/mingw-utils.mk
diff options
context:
space:
mode:
authorVolker Grabsch <vog@notjusthosting.com>2010-11-26 18:29:47 (GMT)
committerVolker Grabsch <vog@notjusthosting.com>2010-11-26 18:29:47 (GMT)
commit31b995ecff20117ae524937dc9af51f5492d777e (patch)
treec4b3ff8a3ac40de98425f6230f3a5667a2f08176 /src/mingw-utils.mk
parentae012ab8bf50c5a5209348ec0a97fb1c6e5b95d8 (diff)
downloadmxe-31b995ecff20117ae524937dc9af51f5492d777e.zip
mxe-31b995ecff20117ae524937dc9af51f5492d777e.tar.gz
mxe-31b995ecff20117ae524937dc9af51f5492d777e.tar.bz2
new package: mingw-utils
Diffstat (limited to 'src/mingw-utils.mk')
-rw-r--r--src/mingw-utils.mk37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/mingw-utils.mk b/src/mingw-utils.mk
new file mode 100644
index 0000000..a987893
--- /dev/null
+++ b/src/mingw-utils.mk
@@ -0,0 +1,37 @@
+# This file is part of mingw-cross-env.
+# See doc/index.html for further information.
+
+# MinGW Utilities
+PKG := mingw-utils
+$(PKG)_IGNORE :=
+$(PKG)_VERSION := 0.4-1
+$(PKG)_CHECKSUM := 716f51d7622b36448fc1e92d2c69d8f41b1cc2df
+$(PKG)_SUBDIR := $(PKG)-$(word 1,$(subst -, ,$($(PKG)_VERSION)))
+$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION)-mingw32-src.tar.lzma
+$(PKG)_WEBSITE := http://mingw.sourceforge.net/
+$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/mingw/MinGW/Utilities/$(PKG)/$(PKG)-$($(PKG)_VERSION)/$($(PKG)_FILE)
+$(PKG)_DEPS := gcc
+
+define $(PKG)_UPDATE
+ $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/mingw/files/MinGW/Utilities/mingw-utils/) | \
+ $(SED) -n 's,.*mingw-utils-\([0-9][^>]*\)-mingw32-src\.tar.*,\1,p' | \
+ tail -1
+endef
+
+define $(PKG)_BUILD
+ # native build
+ cp -Rp '$(1)' '$(1).native'
+ cd '$(1).native' && ./configure \
+ --disable-shared \
+ --prefix='$(PREFIX)'
+ $(MAKE) -C '$(1).native/reimp' -j '$(JOBS)'
+ $(INSTALL) -m755 '$(1).native/reimp/reimp' '$(PREFIX)/bin/$(TARGET)-reimp'
+
+ # cross build
+ cd '$(1)' && ./configure \
+ --host='$(TARGET)' \
+ --disable-shared \
+ --prefix='$(PREFIX)/$(TARGET)'
+ $(MAKE) -C '$(1)' -j '$(JOBS)'
+ $(MAKE) -C '$(1)' -j 1 install
+endef