X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=gph-gfx;a=blobdiff_plain;f=Makefile;h=91bf8b6c7c69a1d923ebc5a1726f1c79fcf37881;hp=60602183bc7238f47455014fdc83cc55a74793c2;hb=HEAD;hpb=066a1766c12fd42bf2191842f1857c2a320942dd diff --git a/Makefile b/Makefile index 6060218..91bf8b6 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,18 @@ 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 + LDFLAGS += -lgdi32 +else + src += test_x11.c + CFLAGS += -DBUILD_X11 + LDFLAGS += -lX11 +endif + $(bin): $(obj) $(CC) -o $@ $(obj) $(LDFLAGS)