LDFLAGS = $(libpath) $(libgl_$(sys)) -lm -lgmath -lvmath -limago -lresman \
-lpthread -lassimp -ltreestore -ldrawtext -loptcfg -lgoatvr `pkg-config --libs sdl2`
-sys = $(shell uname -s)
+sys = $(shell uname -s | sed 's/MINGW.*/mingw/')
libgl_Linux = -lGL -lGLU -lGLEW
libgl_Darwin = -framework OpenGL -lGLEW
+libgl_mingw = -lopengl32 -lglu32 -lglew32
+
+ifeq ($(sys), mingw)
+ bin = demo.exe
+endif
$(bin): .clang_complete $(obj)
$(CXX) -o $@ $(obj) $(LDFLAGS)
+.PHONY: cross
+cross:
+ $(MAKE) CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++
+
+.PHONY: instalien
+instalien: demo.exe
+ cp $< /alien/demo/$<
+
.clang_complete: Makefile
rm -f $@
for i in $(CXXFLAGS); do echo $$i >>$@; done