From: Pavel Pisa Date: Mon, 30 Sep 2013 10:02:00 +0000 (+0200) Subject: OMK build: move linker specification of pthread library to separate variable TARGET_L... X-Git-Tag: v0.3.4~32 X-Git-Url: https://rtime.felk.cvut.cz/gitweb/orte.git/commitdiff_plain/e88692b16aa8026d8c84e167621ff9af9670664a OMK build: move linker specification of pthread library to separate variable TARGET_LOADLIBES. This allows to override libraries list suitable for the Linux build by other target OS specific list of the libraries. I.e. the explicit "pthread" library specification is blocker for QNX/BlackBerry build because POSIX threads are included in stadartd library. On the other hand BSD networking "socket" library has to be specified explicitly. Another difference is missing "byteswap.h" header file (undef HAVE_BYTESWAP_H). Signed-off-by: Pavel Pisa --- diff --git a/orte/examples/hello/Makefile.omk b/orte/examples/hello/Makefile.omk index eaf9ae7..8e37c14 100644 --- a/orte/examples/hello/Makefile.omk +++ b/orte/examples/hello/Makefile.omk @@ -11,7 +11,9 @@ h_publisher_SOURCES = h_publisher.c h_subscriber_SOURCES = h_subscriber.c -lib_LOADLIBES = orte pthread +TARGET_LOADLIBES ?= pthread + +lib_LOADLIBES = orte $(TARGET_LOADLIBES) ifeq ($(TARGET_OS),win32) lib_LOADLIBES += ws2_32 endif #TARGET_OS diff --git a/orte/examples/multicast/Makefile.omk b/orte/examples/multicast/Makefile.omk index a7d19ff..06bcdc8 100644 --- a/orte/examples/multicast/Makefile.omk +++ b/orte/examples/multicast/Makefile.omk @@ -9,7 +9,9 @@ endif m_subscriber_SOURCES = m_subscriber.c -lib_LOADLIBES = orte pthread +TARGET_LOADLIBES ?= pthread + +lib_LOADLIBES = orte $(TARGET_LOADLIBES) ifeq ($(TARGET_OS),win32) lib_LOADLIBES += ws2_32 endif #TARGET_OS diff --git a/orte/examples/ping/Makefile.omk b/orte/examples/ping/Makefile.omk index 4e6e421..edd6752 100644 --- a/orte/examples/ping/Makefile.omk +++ b/orte/examples/ping/Makefile.omk @@ -9,7 +9,9 @@ endif orteping_SOURCES = orteping.c -lib_LOADLIBES = orte pthread +TARGET_LOADLIBES ?= pthread + +lib_LOADLIBES = orte $(TARGET_LOADLIBES) ifeq ($(TARGET_OS),win32) lib_LOADLIBES += ws2_32 endif #TARGET_OS diff --git a/orte/examples/reliable/Makefile.omk b/orte/examples/reliable/Makefile.omk index 97fc242..53c4733 100644 --- a/orte/examples/reliable/Makefile.omk +++ b/orte/examples/reliable/Makefile.omk @@ -13,7 +13,9 @@ r_subscriber_reliable_SOURCES = r_subscriber_reliable.c r_subscriber_besteffort_SOURCES = r_subscriber_besteffort.c -lib_LOADLIBES = orte pthread +TARGET_LOADLIBES ?= pthread + +lib_LOADLIBES = orte $(TARGET_LOADLIBES) ifeq ($(TARGET_OS),win32) lib_LOADLIBES += ws2_32 endif #TARGET_OS diff --git a/orte/examples/schneider/Makefile.omk b/orte/examples/schneider/Makefile.omk index eb0ece1..0789c86 100644 --- a/orte/examples/schneider/Makefile.omk +++ b/orte/examples/schneider/Makefile.omk @@ -9,7 +9,9 @@ endif schneider_subscriber_SOURCES = schneider_subscriber.c -lib_LOADLIBES = orte pthread +TARGET_LOADLIBES ?= pthread + +lib_LOADLIBES = orte $(TARGET_LOADLIBES) ifeq ($(TARGET_OS),win32) lib_LOADLIBES += ws2_32 endif #TARGET_OS diff --git a/orte/examples/spy/Makefile.omk b/orte/examples/spy/Makefile.omk index 2015c60..b3853f9 100644 --- a/orte/examples/spy/Makefile.omk +++ b/orte/examples/spy/Makefile.omk @@ -9,7 +9,9 @@ endif ortespy_SOURCES = ortespy.c -lib_LOADLIBES = orte pthread +TARGET_LOADLIBES ?= pthread + +lib_LOADLIBES = orte $(TARGET_LOADLIBES) ifeq ($(TARGET_OS),win32) lib_LOADLIBES += ws2_32 endif #TARGET_OS diff --git a/orte/liborte/Makefile.omk b/orte/liborte/Makefile.omk index 35f80be..af0bc23 100644 --- a/orte/liborte/Makefile.omk +++ b/orte/liborte/Makefile.omk @@ -60,7 +60,9 @@ endif #CONFIG_OC_ETH_ORTE ifeq ($(CONFIG_OC_ETH_ORTE_SOLIB),y) shared_LIBRARIES = orte -lib_LOADLIBES = pthread +TARGET_LOADLIBES ?= pthread + +lib_LOADLIBES = $(TARGET_LOADLIBES) ifeq ($(TARGET_OS),win32) lib_LOADLIBES += ws2_32 endif #TARGET_OS diff --git a/orte/manager/Makefile.omk b/orte/manager/Makefile.omk index 6b9e932..f873f58 100644 --- a/orte/manager/Makefile.omk +++ b/orte/manager/Makefile.omk @@ -12,7 +12,9 @@ else bin_PROGRAMS = ortemanager endif -lib_LOADLIBES = orte pthread +TARGET_LOADLIBES ?= pthread + +lib_LOADLIBES = orte $(TARGET_LOADLIBES) ortemanager_SOURCES = ortemanager.c ifeq ($(TARGET_OS),win32)