use default number of elements when pushing attributes if the nelem
[vrtris] / Makefile
index a773a6e..94ecd85 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,8 +4,13 @@ dep = $(obj:.o=.d)
 bin = vrtris
 
 
-CFLAGS = -pedantic -Wall -g `pkg-config --cflags sdl2`
-LDFLAGS = $(libsys) $(libgl) `pkg-config --libs sdl2` -ldrawtext
+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`
+LDFLAGS = $(libsys) $(libgl) `pkg-config --libs sdl2` -ldrawtext -lgoatvr \
+                 -limago -lm
 
 sys ?= $(shell uname -s | sed 's/MINGW.*/mingw/')
 
@@ -28,6 +33,10 @@ $(bin): $(obj)
 
 -include $(dep)
 
+%.d: %.c
+       @echo depfile $@
+       @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
+
 .PHONY: cross
 cross:
        $(MAKE) CC=i686-w64-mingw32-gcc sys=mingw