summaryrefslogtreecommitdiffstats
path: root/src/pthreads.mk
diff options
context:
space:
mode:
Diffstat (limited to 'src/pthreads.mk')
-rw-r--r--src/pthreads.mk10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/pthreads.mk b/src/pthreads.mk
index ea28232..d1c2757 100644
--- a/src/pthreads.mk
+++ b/src/pthreads.mk
@@ -15,7 +15,13 @@ define $(PKG)_UPDATE
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-$(PKG).exe' \
- -lpthread -lws2_32
+ '$(TOP_DIR)/src/pthreads-test.c' -o '$(PREFIX)/$(TARGET)/bin/test-pthreads.exe' \
+ `'$(TARGET)-pkg-config' --libs pthreads`