projects
/
laserbrain_demo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bfceaad
)
makefile rules for cross-compiling with mingw-w64
author
John Tsiombikas
<nuclear@mutantstargoat.com>
Fri, 1 Sep 2017 00:07:35 +0000
(
03:07
+0300)
committer
John Tsiombikas
<nuclear@mutantstargoat.com>
Fri, 1 Sep 2017 00:07:35 +0000
(
03:07
+0300)
Makefile
patch
|
blob
|
history
diff --git
a/Makefile
b/Makefile
index
431e362
..
959c10f
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-17,13
+17,26
@@
CXXFLAGS = -std=c++11 $(warn) $(opt) $(dbg) $(incpath)
LDFLAGS = $(libpath) $(libgl_$(sys)) -lm -lgmath -lvmath -limago -lresman \
-lpthread -lassimp -ltreestore -ldrawtext -loptcfg -lgoatvr `pkg-config --libs sdl2`
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_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)
$(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
.clang_complete: Makefile
rm -f $@
for i in $(CXXFLAGS); do echo $$i >>$@; done