Mercurial > mxe-octave
annotate src/pthreads.mk @ 2349:f48c5b085a38
Move $(PKG)_VERSION and $(PKG)_WEBSITE from src/*.mk into doc/index.html
author | Volker Grabsch <vog@notjusthosting.com> |
---|---|
date | Thu, 29 Mar 2012 11:07:07 +0200 |
parents | f653602a0500 |
children | 99516e73b368 |
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)_CHECKSUM := da8371cb20e8e238f96a1d0651212f154d84a9ac |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
8 $(PKG)_SUBDIR := pthreads-w32-$($(PKG)_VERSION)-release |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
9 $(PKG)_FILE := pthreads-w32-$($(PKG)_VERSION)-release.tar.gz |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
10 $(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
|
11 $(PKG)_DEPS := gcc |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
12 |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
13 define $(PKG)_UPDATE |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
14 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
|
15 $(SED) -n 's,^RELEASE \([0-9][^[:space:]]*\).*,\1,p' | \ |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
16 tr '.' '-' | \ |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
17 head -1 |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
18 endef |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
19 |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
20 define $(PKG)_BUILD |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
21 $(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
|
22 $(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
|
23 $(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
|
24 $(SED) -i 's,#include "config.h",,' '$(1)/pthread.h' |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
25 $(MAKE) -C '$(1)' -j 1 GC-static CROSS='$(TARGET)-' |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
26 $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' |
1390
7fae546007a1
fix dummy permissions (664 -> 644)
Volker Grabsch <vog@notjusthosting.com>
parents:
982
diff
changeset
|
27 $(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
|
28 $(INSTALL) -d '$(PREFIX)/$(TARGET)/include' |
1390
7fae546007a1
fix dummy permissions (664 -> 644)
Volker Grabsch <vog@notjusthosting.com>
parents:
982
diff
changeset
|
29 $(INSTALL) -m644 '$(1)/pthread.h' '$(PREFIX)/$(TARGET)/include/' |
7fae546007a1
fix dummy permissions (664 -> 644)
Volker Grabsch <vog@notjusthosting.com>
parents:
982
diff
changeset
|
30 $(INSTALL) -m644 '$(1)/sched.h' '$(PREFIX)/$(TARGET)/include/' |
7fae546007a1
fix dummy permissions (664 -> 644)
Volker Grabsch <vog@notjusthosting.com>
parents:
982
diff
changeset
|
31 $(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
|
32 |
4d2e6c7c2cc2
test program for package pthreads (by Martin Lambers)
Volker Grabsch <vog@notjusthosting.com>
parents:
938
diff
changeset
|
33 '$(TARGET)-gcc' \ |
4d2e6c7c2cc2
test program for package pthreads (by Martin Lambers)
Volker Grabsch <vog@notjusthosting.com>
parents:
938
diff
changeset
|
34 -W -Wall -Werror -ansi -pedantic \ |
4d2e6c7c2cc2
test program for package pthreads (by Martin Lambers)
Volker Grabsch <vog@notjusthosting.com>
parents:
938
diff
changeset
|
35 '$(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
|
36 -lpthread -lws2_32 |
938
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
37 endef |