summaryrefslogtreecommitdiffstats
path: root/src/pthreads-w32.mk
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2013-05-23 14:35:29 (GMT)
committerTony Theodore <tonyt@logyst.com>2013-06-01 12:28:02 (GMT)
commitb974ef08d8b4fc555259eb49c9e34ef69c411948 (patch)
tree3d87088e9b6469153e5f33e9fc035410e9d08c3b /src/pthreads-w32.mk
parent95e37fbe7e528bc61e324bde2608046db66521c3 (diff)
downloadmxe-b974ef08d8b4fc555259eb49c9e34ef69c411948.zip
mxe-b974ef08d8b4fc555259eb49c9e34ef69c411948.tar.gz
mxe-b974ef08d8b4fc555259eb49c9e34ef69c411948.tar.bz2
add mingw-w64 runtime and pthreads implementation, update related toolchain files
Diffstat (limited to 'src/pthreads-w32.mk')
-rw-r--r--src/pthreads-w32.mk27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/pthreads-w32.mk b/src/pthreads-w32.mk
new file mode 100644
index 0000000..ff86137
--- /dev/null
+++ b/src/pthreads-w32.mk
@@ -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