X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=gph-gfx;a=blobdiff_plain;f=Makefile;fp=Makefile;h=cf2a010f3990821ca37a26bd252050d6b86064db;hp=60602183bc7238f47455014fdc83cc55a74793c2;hb=5ea3ab5302b95500424d61eab0dda97e98cc53d8;hpb=066a1766c12fd42bf2191842f1857c2a320942dd diff --git a/Makefile b/Makefile index 6060218..cf2a010 100644 --- 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 @@ -6,6 +6,17 @@ bin = test 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)