X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=vrtris;a=blobdiff_plain;f=Makefile;h=504c89a1e7628a6cafd94fa3cd57acd6516336b8;hp=45e42141defa231f01391904731a1c0543992393;hb=96757b3e8d4c7ad71ebcae67c40c5fed14c471ce;hpb=d6638277efddf2fd47de884af174f907789b82ec diff --git a/Makefile b/Makefile index 45e4214..504c89a 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,26 @@ +# options ------------------------------------------------- +vrbuild = true +# --------------------------------------------------------- + src = $(wildcard src/*.c) obj = $(src:.c=.o) dep = $(obj:.o=.d) -bin = vrtris +ifeq ($(vrbuild), true) + bin = vrtris + vr_ldflags = -lgoatvr + vr_cflags = -DBUILD_VR +else + bin = gltris +endif warn = -pedantic -Wall -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast dbg = -g opt = -O0 -CFLAGS = $(warn) $(dbg) $(opt) `pkg-config --cflags sdl2 freetype2` +CFLAGS = $(warn) $(dbg) $(opt) `pkg-config --cflags sdl2 freetype2` $(vr_cflags) LDFLAGS = $(libsys) -ldrawtext $(libgl) `pkg-config --libs sdl2 freetype2` \ - -lgoatvr -limago -lpng -lz -ljpeg -lpthread -lm + $(vr_ldflags) -limago -lpng -lz -ljpeg -lpthread -lm sys ?= $(shell uname -s | sed 's/MINGW.*/mingw/')