view src/pthreads.mk @ 265:5bf9071e67b6

put all package's project websites into Make variables $($(PKG)_WEBSITE)
author Volker Grabsch <vog@notjusthosting.com>
date Sun, 01 Mar 2009 16:35:21 +0100
parents d1678aced603
children 08a32251156c
line wrap: on
line source

# pthreads-w32

PKG            := pthreads
$(PKG)_VERSION := 2-8-0
$(PKG)_SUBDIR  := pthreads-w32-$($(PKG)_VERSION)-release
$(PKG)_FILE    := pthreads-w32-$($(PKG)_VERSION)-release.tar.gz
$(PKG)_WEBSITE := http://sourceware.org/pthreads-win32/
$(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/Release_notes' | \
    $(SED) -n 's,^RELEASE \([0-9][^[:space:]]*\).*,\1,p' | \
        tr '.' '-' | \
    head -1
endef

define $(PKG)_BUILD
    $(SED) '35i\#define PTW32_STATIC_LIB' -i '$(1)/pthread.h'
    $(MAKE) -C '$(1)' -j 1 GC-static CROSS='$(TARGET)-'
    install -d '$(PREFIX)/$(TARGET)/lib'
    install -m664 '$(1)/libpthreadGC2.a' '$(PREFIX)/$(TARGET)/lib/libpthread.a'
    install -d '$(PREFIX)/$(TARGET)/include'
    install -m664 '$(1)/pthread.h' '$(1)/sched.h' '$(1)/semaphore.h' '$(PREFIX)/$(TARGET)/include/'
endef