summaryrefslogtreecommitdiffstats
path: root/src/pthreads.mk
blob: 60d070be298e19dd9ad6fc0abd792d447c633c19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# This file is part of MXE.
# See index.html for further information.

# Runtimes can/will have different implementations,
# but the pre-requisite package and test are the same.

PKG             := pthreads
$(PKG)_VERSION  := POSIX 1003.1-2001
$(PKG)_CHECKSUM  = $(winpthreads_CHECKSUM)
$(PKG)_FILE      = $(winpthreads_FILE)
$(PKG)_DEPS     := winpthreads

define $(PKG)_UPDATE
    echo $(pthreads_VERSION)
endef

PTHREADS_TEST = \
    $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig' && \
    (echo 'Name: pthreads'; \
     echo 'Version: $($(PKG)_VERSION)'; \
     echo 'Description: Posix Threads ($(PKG))'; \
     echo 'Libs: -lpthread -lws2_32';) \
     > '$(PREFIX)/$(TARGET)/lib/pkgconfig/pthreads.pc' && \
    '$(TARGET)-gcc' \
        -W -Wall -Werror -ansi -pedantic \
        '$(TOP_DIR)/src/pthreads-test.c' -o '$(PREFIX)/$(TARGET)/bin/test-pthreads.exe' \
        `'$(TARGET)-pkg-config' --libs pthreads`