projects
/
gph-gfx
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
foo
[gph-gfx]
/
Makefile
diff --git
a/Makefile
b/Makefile
index
6060218
..
cf2a010
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-1,4
+1,4
@@
-src = $(wildcard src/*.c) test.c
+src = $(wildcard src/*.c)
obj = $(src:.c=.o)
dep = $(obj:.o=.d)
bin = test
obj = $(src:.c=.o)
dep = $(obj:.o=.d)
bin = test
@@
-6,6
+6,17
@@
bin = test
CFLAGS = -pedantic -Wall -g -MMD -Isrc
LDFLAGS = -lvulkan -lm
CFLAGS = -pedantic -Wall -g -MMD -Isrc
LDFLAGS = -lvulkan -lm
+sys ?= $(shell uname -s | sed 's/MINGW.*/mingw/')
+
+ifeq ($(sys), mingw)
+ src += test_win.c
+ CFLAGS += -DBUILD_WIN32
+else
+ src += test_x11.c
+ CFLAGS += -DBUILD_X11
+ LDFLAGS += -lX11
+endif
+
$(bin): $(obj)
$(CC) -o $@ $(obj) $(LDFLAGS)
$(bin): $(obj)
$(CC) -o $@ $(obj) $(LDFLAGS)