Skip to content

Commit

Permalink
Linking with -lrt only for Linux builds using clock_gettime
Browse files Browse the repository at this point in the history
  • Loading branch information
karthick18 committed Jul 27, 2010
1 parent 508b232 commit 1b90dcd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Expand Up @@ -2,6 +2,7 @@
## the code buffer that morphs the thought is fixed for x86_64

CC := gcc
UNAME := $(shell uname)
ARCH := $(shell uname -m | sed -e 's,i.86,i386,')
ifeq ($(ARCH),i386)
ARCH_FLAGS := -m32
Expand All @@ -11,7 +12,10 @@ endif
CFLAGS := -g -Wall $(ARCH_FLAGS)
SRC_FILES := $(wildcard *.c)
OBJ_FILES := $(SRC_FILES:%.c=%.o)
LDLIBS := -lpthread -lrt
LDLIBS := -lpthread
ifeq ("$(UNAME)", "Linux")
LDLIBS += -lrt
endif
TARGET := inception

all: $(TARGET)
Expand Down

0 comments on commit 1b90dcd

Please sign in to comment.