summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2013-11-11 13:54:33 (GMT)
committerTony Theodore <tonyt@logyst.com>2013-11-11 13:54:33 (GMT)
commit0660b6af8416e509565377fc6f16a21ccfade4c1 (patch)
tree0e04db12c4b76c9ddc748e91e68e08950a4e6067
parent0d4096147819a36414ee75c95128296479c87e4c (diff)
downloadmxe-0660b6af8416e509565377fc6f16a21ccfade4c1.zip
mxe-0660b6af8416e509565377fc6f16a21ccfade4c1.tar.gz
mxe-0660b6af8416e509565377fc6f16a21ccfade4c1.tar.bz2
package pthreads: add pkg-config file and use for test
-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`