forked from mxe/mxe
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add mingw-w64 runtime (32 & 64 bit targets)
- Loading branch information
1 parent
78cd1a0
commit 82c6287
Showing
10 changed files
with
181 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# This file is part of mingw-cross-env. | ||
# See doc/index.html for further information. | ||
|
||
# Mingw-w64 | ||
PKG := mingw-w64 | ||
$(PKG)_IGNORE := | ||
$(PKG)_CHECKSUM := 55f74b8b87c9b081844a1ba46e97b1db696f6e00 | ||
$(PKG)_SUBDIR := $(PKG)-v$($(PKG)_VERSION) | ||
$(PKG)_FILE := $(PKG)-v$($(PKG)_VERSION).tar.gz | ||
$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$(PKG)-release/$($(PKG)_FILE) | ||
$(PKG)_URL_2 := http://downloads.sourceforge.net/project/$(PKG)/$(PKG)/$(PKG)-release/$($(PKG)_FILE) | ||
$(PKG)_DEPS := | ||
|
||
define $(PKG)_UPDATE | ||
wget -q -O- 'http://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/' | \ | ||
$(SED) -n 's,.*mingw-w64-v\([0-9][^>]*\)\.tar.*,\1,p' | \ | ||
grep -v [a-zA-Z] | \ | ||
sort | \ | ||
tail -1 | ||
endef | ||
|
||
define $(PKG)_BUILD_mingw-w64 | ||
mkdir '$(1).headers-build' | ||
cd '$(1).headers-build' && '$(1)/mingw-w64-headers/configure' \ | ||
--host='$(TARGET)' \ | ||
--prefix='$(PREFIX)' \ | ||
--enable-sdk=all | ||
$(MAKE) -C '$(1).headers-build' install | ||
endef | ||
|
||
$(PKG)_BUILD_x86_64-w64-mingw32 = $($(PKG)_BUILD_mingw-w64) | ||
$(PKG)_BUILD_i686-w64-mingw32 = $($(PKG)_BUILD_mingw-w64) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# This file is part of MXE. | ||
# See index.html for further information. | ||
|
||
PKG := pthreads-w32 | ||
$(PKG)_IGNORE := | ||
$(PKG)_CHECKSUM := 24d40e89c2e66a765733e8c98d6f94500343da86 | ||
$(PKG)_SUBDIR := pthreads-w32-$($(PKG)_VERSION)-release | ||
$(PKG)_FILE := pthreads-w32-$($(PKG)_VERSION)-release.tar.gz | ||
$(PKG)_URL := ftp://sourceware.org/pub/pthreads-win32/$($(PKG)_FILE) | ||
$(PKG)_DEPS := gcc | ||
|
||
define $(PKG)_UPDATE | ||
$(WGET) -q -O- 'ftp://sourceware.org/pub/pthreads-win32/dll-latest/include/pthread.h' | \ | ||
$(SED) -n 's/^#define PTW32_VERSION \([^,]*\),\([^,]*\),\([^,]*\),.*/\1-\2-\3/p;' | ||
endef | ||
|
||
define $(PKG)_BUILD_i686-pc-mingw32 | ||
$(MAKE) -C '$(1)' -j 1 GC-static CROSS='$(TARGET)-' | ||
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' | ||
$(INSTALL) -m644 '$(1)/libpthreadGC2.a' '$(PREFIX)/$(TARGET)/lib/libpthread.a' | ||
$(INSTALL) -d '$(PREFIX)/$(TARGET)/include' | ||
$(INSTALL) -m644 '$(1)/pthread.h' '$(PREFIX)/$(TARGET)/include/' | ||
$(INSTALL) -m644 '$(1)/sched.h' '$(PREFIX)/$(TARGET)/include/' | ||
$(INSTALL) -m644 '$(1)/semaphore.h' '$(PREFIX)/$(TARGET)/include/' | ||
|
||
$(PTHREADS_TEST) | ||
endef |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,17 @@ | ||
# This file is part of MXE. | ||
# See index.html for further information. | ||
|
||
# runtimes can/will have different implementations | ||
# but the pre-requisite package and test are the same | ||
PKG := pthreads | ||
$(PKG)_IGNORE := | ||
$(PKG)_CHECKSUM := 24d40e89c2e66a765733e8c98d6f94500343da86 | ||
$(PKG)_SUBDIR := pthreads-w32-$($(PKG)_VERSION)-release | ||
$(PKG)_FILE := pthreads-w32-$($(PKG)_VERSION)-release.tar.gz | ||
$(PKG)_URL := ftp://sourceware.org/pub/pthreads-win32/$($(PKG)_FILE) | ||
$(PKG)_DEPS := gcc | ||
$(PKG)_DEPS := pthreads-w32 winpthreads | ||
|
||
define $(PKG)_UPDATE | ||
$(WGET) -q -O- 'ftp://sourceware.org/pub/pthreads-win32/dll-latest/include/pthread.h' | \ | ||
$(SED) -n 's/^#define PTW32_VERSION \([^,]*\),\([^,]*\),\([^,]*\),.*/\1-\2-\3/p;' | ||
echo $(pthreads_VERSION) | ||
endef | ||
|
||
define $(PKG)_BUILD | ||
$(MAKE) -C '$(1)' -j 1 GC-static CROSS='$(TARGET)-' | ||
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' | ||
$(INSTALL) -m644 '$(1)/libpthreadGC2.a' '$(PREFIX)/$(TARGET)/lib/libpthread.a' | ||
$(INSTALL) -d '$(PREFIX)/$(TARGET)/include' | ||
$(INSTALL) -m644 '$(1)/pthread.h' '$(PREFIX)/$(TARGET)/include/' | ||
$(INSTALL) -m644 '$(1)/sched.h' '$(PREFIX)/$(TARGET)/include/' | ||
$(INSTALL) -m644 '$(1)/semaphore.h' '$(PREFIX)/$(TARGET)/include/' | ||
|
||
PTHREADS_TEST = \ | ||
'$(TARGET)-gcc' \ | ||
-W -Wall -Werror -ansi -pedantic \ | ||
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-pthreads.exe' \ | ||
'$(TOP_DIR)/src/pthreads-test.c' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ | ||
-lpthread -lws2_32 | ||
endef |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# This file is part of MXE. | ||
# See index.html for further information. | ||
|
||
PKG := winpthreads | ||
$(PKG)_IGNORE := | ||
$(PKG)_CHECKSUM := d86e21b33eea05ff2c27b428eaab679d7ab3b08e | ||
$(PKG)_SUBDIR := tonytheodore-$(PKG)-$($(PKG)_VERSION) | ||
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz | ||
$(PKG)_URL := https://github.com/tonytheodore/$(PKG)/tarball/$($(PKG)_VERSION)/$(PKG)_FILE | ||
$(PKG)_DEPS := gcc | ||
|
||
define $(PKG)_UPDATE | ||
echo 'info: sync latest winpthreads with git svn rebase; git push origin master' >&2; | ||
$(WGET) -q -O- 'https://github.com/tonytheodore/$(PKG)/commits/master' | \ | ||
$(SED) -n 's#.*<span class="sha">\([^<]\{7\}\)[^<]\{3\}<.*#\1#p' | \ | ||
head -1 | ||
endef | ||
|
||
define $(PKG)_BUILD_mingw-w64 | ||
cd '$(1)' && ./configure \ | ||
$(LINK_STYLE) \ | ||
--host='$(TARGET)' \ | ||
--prefix='$(PREFIX)/$(TARGET)' | ||
$(MAKE) -C '$(1)' -j '$(JOBS)' install | ||
|
||
$(PTHREADS_TEST) | ||
endef | ||
|
||
$(PKG)_BUILD_x86_64-w64-mingw32 = $($(PKG)_BUILD_mingw-w64) | ||
$(PKG)_BUILD_i686-w64-mingw32 = $($(PKG)_BUILD_mingw-w64) |