From 264eac31b6aedaf449fbaf5868ff39ed6064137b Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Tue, 23 Jan 2018 13:24:03 +0200 Subject: [PATCH] env file for cross-compiling and accompanying makefile improvements --- Makefile | 2 +- setup_cross_env | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 setup_cross_env diff --git a/Makefile b/Makefile index b7e244b..2c38091 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ LDFLAGS = $(libpath) -ldrawtext $(libgl_$(sys)) $(libal_$(sys)) -lm -lgmath -lvm -limago -lresman -lpthread -lassimp -ltreestore -lgoatvr \ `pkg-config --libs sdl2 freetype2` -lpng -ljpeg -lz -lvorbisfile -lgomp -sys = $(shell uname -s | sed 's/MINGW.*/mingw/') +sys ?= $(shell uname -s | sed 's/MINGW.*/mingw/') libgl_Linux = -lGL -lGLU -lGLEW libgl_Darwin = -framework OpenGL -lGLEW libgl_mingw = -lopengl32 -lglu32 -lglew32 diff --git a/setup_cross_env b/setup_cross_env new file mode 100644 index 0000000..b16d810 --- /dev/null +++ b/setup_cross_env @@ -0,0 +1,4 @@ +# source this +export sys=mingw +export CC=i686-w64-mingw32-gcc +export CXX=i686-w64-mingw32-g++ -- 1.7.10.4