summaryrefslogtreecommitdiffstats
path: root/src/pthreads.mk
diff options
context:
space:
mode:
Diffstat (limited to 'src/pthreads.mk')
-rw-r--r--src/pthreads.mk16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/pthreads.mk b/src/pthreads.mk
index a15fe15..6010904 100644
--- a/src/pthreads.mk
+++ b/src/pthreads.mk
@@ -25,17 +25,13 @@ define PTHREADS_TEST
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi -pedantic \
- '$(TOP_DIR)/src/pthreads-test.c' -o '$(PREFIX)/$(TARGET)/bin/test-pthreads.exe' \
+ '$(TOP_DIR)/src/pthreads-test.c' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \
`'$(TARGET)-pkg-config' --libs pthreads`
# test cmake
- mkdir '$(1).cmake'
- (echo 'find_package(Threads REQUIRED)'; \
- echo 'add_executable(test-pthreads-cmake $(PREFIX)/../src/pthreads-test.c)'; \
- echo 'target_link_libraries(test-pthreads-cmake $${CMAKE_THREAD_LIBS_INIT})'; \
- echo 'install(TARGETS test-pthreads-cmake DESTINATION bin)'; \
- ) > '$(1).cmake/CMakeLists.txt'
-
- cd '$(1).cmake' && '$(TARGET)-cmake' .
- $(MAKE) -C '$(1).cmake' -j 1 install
+ mkdir '$(1).test-cmake'
+ cd '$(1).test-cmake' && '$(TARGET)-cmake' \
+ -DPKG=$(PKG) \
+ '$(PWD)/src/cmake/test'
+ $(MAKE) -C '$(1).test-cmake' -j 1 install
endef