Mercurial > mxe-octave
annotate src/pthreads.mk @ 2333:f653602a0500
Rebrand to new project name MXE
author | Volker Grabsch <vog@notjusthosting.com> |
---|---|
date | Wed, 28 Mar 2012 15:46:58 +0200 |
parents | 7fae546007a1 |
children | f48c5b085a38 |
rev | line source |
---|---|
2333
f653602a0500
Rebrand to new project name MXE
Volker Grabsch <vog@notjusthosting.com>
parents:
1390
diff
changeset
|
1 # This file is part of MXE. |
938
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
2 # See doc/index.html for further information. |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
3 |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
4 # Pthreads-w32 |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
5 PKG := pthreads |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
6 $(PKG)_IGNORE := |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
7 $(PKG)_VERSION := 2-8-0 |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
8 $(PKG)_CHECKSUM := da8371cb20e8e238f96a1d0651212f154d84a9ac |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
9 $(PKG)_SUBDIR := pthreads-w32-$($(PKG)_VERSION)-release |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
10 $(PKG)_FILE := pthreads-w32-$($(PKG)_VERSION)-release.tar.gz |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
11 $(PKG)_WEBSITE := http://sourceware.org/pthreads-win32/ |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
12 $(PKG)_URL := ftp://sourceware.org/pub/pthreads-win32/$($(PKG)_FILE) |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
13 $(PKG)_DEPS := gcc |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
14 |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
15 define $(PKG)_UPDATE |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
16 wget -q -O- 'ftp://sourceware.org/pub/pthreads-win32/Release_notes' | \ |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
17 $(SED) -n 's,^RELEASE \([0-9][^[:space:]]*\).*,\1,p' | \ |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
18 tr '.' '-' | \ |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
19 head -1 |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
20 endef |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
21 |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
22 define $(PKG)_BUILD |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
23 $(SED) -i '35i\#define PTW32_STATIC_LIB' '$(1)/pthread.h' |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
24 $(SED) -i '41i\#define PTW32_STATIC_LIB' '$(1)/sched.h' |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
25 $(SED) -i '41i\#define PTW32_STATIC_LIB' '$(1)/semaphore.h' |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
26 $(SED) -i 's,#include "config.h",,' '$(1)/pthread.h' |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
27 $(MAKE) -C '$(1)' -j 1 GC-static CROSS='$(TARGET)-' |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
28 $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' |
1390
7fae546007a1
fix dummy permissions (664 -> 644)
Volker Grabsch <vog@notjusthosting.com>
parents:
982
diff
changeset
|
29 $(INSTALL) -m644 '$(1)/libpthreadGC2.a' '$(PREFIX)/$(TARGET)/lib/libpthread.a' |
938
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
30 $(INSTALL) -d '$(PREFIX)/$(TARGET)/include' |
1390
7fae546007a1
fix dummy permissions (664 -> 644)
Volker Grabsch <vog@notjusthosting.com>
parents:
982
diff
changeset
|
31 $(INSTALL) -m644 '$(1)/pthread.h' '$(PREFIX)/$(TARGET)/include/' |
7fae546007a1
fix dummy permissions (664 -> 644)
Volker Grabsch <vog@notjusthosting.com>
parents:
982
diff
changeset
|
32 $(INSTALL) -m644 '$(1)/sched.h' '$(PREFIX)/$(TARGET)/include/' |
7fae546007a1
fix dummy permissions (664 -> 644)
Volker Grabsch <vog@notjusthosting.com>
parents:
982
diff
changeset
|
33 $(INSTALL) -m644 '$(1)/semaphore.h' '$(PREFIX)/$(TARGET)/include/' |
982
4d2e6c7c2cc2
test program for package pthreads (by Martin Lambers)
Volker Grabsch <vog@notjusthosting.com>
parents:
938
diff
changeset
|
34 |
4d2e6c7c2cc2
test program for package pthreads (by Martin Lambers)
Volker Grabsch <vog@notjusthosting.com>
parents:
938
diff
changeset
|
35 '$(TARGET)-gcc' \ |
4d2e6c7c2cc2
test program for package pthreads (by Martin Lambers)
Volker Grabsch <vog@notjusthosting.com>
parents:
938
diff
changeset
|
36 -W -Wall -Werror -ansi -pedantic \ |
4d2e6c7c2cc2
test program for package pthreads (by Martin Lambers)
Volker Grabsch <vog@notjusthosting.com>
parents:
938
diff
changeset
|
37 '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-pthreads.exe' \ |
4d2e6c7c2cc2
test program for package pthreads (by Martin Lambers)
Volker Grabsch <vog@notjusthosting.com>
parents:
938
diff
changeset
|
38 -lpthread -lws2_32 |
938
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
39 endef |