author | Alberto Bertogli
<albertito@blitiri.com.ar> 2009-06-26 06:21:51 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2009-06-26 06:38:48 UTC |
parent | b362314efb9858e5bcad156a9bbac97f61f0e71e |
libjio/Makefile | +4 | -1 |
diff --git a/libjio/Makefile b/libjio/Makefile index fecbfda..8ce1ca1 100644 --- a/libjio/Makefile +++ b/libjio/Makefile @@ -10,7 +10,10 @@ MANDATORY_LDFLAGS := $(shell getconf LFS_LIBS 2>/dev/null) ALL_CFLAGS += $(CFLAGS) $(MANDATORY_CFLAGS) -fPIC ALL_LDFLAGS += $(LDFLAGS) $(MANDATORY_LDFLAGS) -fPIC -LIBS = -lpthread -lrt +# some platforms do not have librt, we only use it if available +NEED_LIBRT := $(shell ld -o rtcheck.so -shared -lrt 2>/dev/null && echo -lrt; \ + rm -f rtcheck.so) +LIBS = -lpthread $(NEED_LIBRT) ifdef DEBUG ALL_CFLAGS += -g