-OBJS=main.o init.o actions1.o actions2.o score.o misc.o datime.o
-SOURCES=$(OBJS:.o=.c) COPYING NEWS README advent.text control
+LIBS=-lrt
+UNAME_S := $(shell uname -s)
+ifeq ($(UNAME_S),Darwin)
+ LIBS=
+endif
+
+OBJS=main.o init.o actions1.o actions2.o score.o misc.o database.o
+SOURCES=$(OBJS:.o=.c) COPYING NEWS README TODO advent.text control