projects
/
dcpu16
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
support png output, buffered file writing
[dcpu16]
/
Makefile
diff --git
a/Makefile
b/Makefile
index 0da0a0e2778f7a2c0a9ff465c33154836bbabc02..70445ff8f27955f86faadebf6200ff1805748700 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-8,9
+8,18
@@
endif
PROGRAMS = as-dcpu16 vm-dcpu16
SOURCES = common.c dcpu16.c as-dcpu16.c vm-dcpu16.c display.c
PROGRAMS = as-dcpu16 vm-dcpu16
SOURCES = common.c dcpu16.c as-dcpu16.c vm-dcpu16.c display.c
-CPPFLAGS
= -D_XOPEN_SOURCE=600
+CPPFLAGS
+= -DHAVE_LIBPNG -I/usr/X11/include/
CFLAGS = -g -Wall -Wextra -pedantic -std=c99
CFLAGS = -g -Wall -Wextra -pedantic -std=c99
-LDFLAGS = -lreadline
+LDFLAGS += -lreadline
+LDFLAGS += -L/usr/X11/lib -lpng
+
+UNAME := $(shell uname)
+ifeq ($(UNAME),Darwin)
+CPPFLAGS += -DHAVE_FUNOPEN
+endif
+ifeq ($(UNAME),Linux)
+CPPFLAGS += -DHAVE_FOPENCOOKIE -D_XOPEN_SOURCE=600
+endif
all: $(PROGRAMS)
all: $(PROGRAMS)