Mercurial > mxe-octave
changeset 3028:d024ce7bdaf0
Update pthread for native mingw build
* src/pthreads.mk: added new build rule for native mingw
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Sat, 08 Jun 2013 18:52:03 -0400 |
parents | 316b79f1a41b |
children | 2849bea3711f |
files | src/pthreads.mk |
diffstat | 1 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/pthreads.mk Sat Jun 08 18:50:44 2013 -0400 +++ b/src/pthreads.mk Sat Jun 08 18:52:03 2013 -0400 @@ -14,6 +14,23 @@ $(SED) -n 's/^#define PTW32_VERSION \([^,]*\),\([^,]*\),\([^,]*\),.*/\1-\2-\3/p;' endef +ifeq ($(MXE_NATIVE_MINGW_BUILD),yes) +define $(PKG)_BUILD + $(MAKE) -C '$(1)' -j 1 GC-static + $(INSTALL) -d '$(HOST_LIBDIR)' + $(INSTALL) -m644 '$(1)/libpthreadGC2.a' '$(HOST_LIBDIR)/libpthread.a' + + if [ $(BUILD_SHARED) = yes ]; then \ + $(MAKE_SHARED_FROM_STATIC) --ar '$(MXE_AR)' --ld '$(MXE_CC)' '$(HOST_LIBDIR)/libpthread.a' --install '$(INSTALL)' --libdir '$(HOST_LIBDIR)' --bindir '$(HOST_BINDIR)'; \ + fi + + $(INSTALL) -d '$(HOST_INCDIR)' + $(INSTALL) -m644 '$(1)/pthread.h' '$(HOST_INCDIR)' + $(INSTALL) -m644 '$(1)/sched.h' '$(HOST_INCDIR)' + $(INSTALL) -m644 '$(1)/semaphore.h' '$(HOST_INCDIR)' +endef + +else ifeq ($(MXE_SYSTEM),mingw) define $(PKG)_BUILD $(MAKE) -C '$(1)' -j 1 GC-static CROSS='$(TARGET)-' @@ -33,3 +50,4 @@ define $(PKG)_BUILD endef endif +endif