merge
[dcpu16] / Makefile
index 0593b49d6028abf71f612d4c2cb2c388140dd3f3..1ecac46d40f73f94e96b87c3c86e1bea893befdc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,10 @@
 ifeq "$(origin CC)" "default"
 CC = clang
 endif
+ifeq ($(CC),gcc)
+CPPFLAGS += -DWANT_VARIADIC_VOIDP_CAST
+endif
+
 
 PROGRAMS = as-dcpu16 vm-dcpu16
 SOURCES = common.c dcpu16.c as-dcpu16.c vm-dcpu16.c \
@@ -24,6 +28,8 @@ ifeq ($(UNAME),Linux)
 # linux needs _GNU_SOURCE for fopencookie
 # linux needs _XOPEN_SOURCE=600 (provided by _GNU_SOURCE) for getopt and strdup
 CPPFLAGS += -DHAVE_FOPENCOOKIE -D_GNU_SOURCE
+# linux needs librt for clock_gettime
+LDFLAGS += -lrt
 endif
 
 CPPFLAGS += -DHAVE_LIBVNCSERVER -DHAVE_LIBPNG