only add -lrt on Linux

Most other UNIX-likes (like *BSD) don't need it.
This commit is contained in:
Nikolai Lifanov 2017-05-31 13:01:53 -04:00
parent 77d2a1e5dd
commit 73ce944bb2

View file

@ -1,11 +1,11 @@
# Makefile for the open-source release of adventure 2.5 # Makefile for the open-source release of adventure 2.5
CCFLAGS=-std=c99 CCFLAGS=-std=c99
LIBS=-lrt LIBS=
UNAME_S := $(shell uname -s) UNAME_S := $(shell uname -s)
GCCVERSIONGTEQ4 := $(shell expr `gcc -dumpversion | cut -f1 -d.` \>= 4) GCCVERSIONGTEQ4 := $(shell expr `gcc -dumpversion | cut -f1 -d.` \>= 4)
ifeq ($(UNAME_S),Darwin) ifeq ($(UNAME_S),Linux)
LIBS= LIBS=-lrt
else ifeq "$(GCCVERSIONGTEQ4)" "1" else ifeq "$(GCCVERSIONGTEQ4)" "1"
CC=c99 CC=c99
endif endif