From 983959f838575b6af3e64be442a63647312fcc61 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sun, 28 Jun 2015 18:44:11 -0700 Subject: Get "portable" builds working on Linux and add a build time check for whether /proc exists --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index f1890da..ceba9d3 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,8 @@ else LIBS=sdl2 glew gl endif #Darwin -CFLAGS:=-std=gnu99 -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -Wno-unused-value -Wno-logical-op-parentheses +HAS_PROC:=$(shell if [ -d /proc ]; then echo -e -DHAS_PROC; fi) +CFLAGS:=-std=gnu99 -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -Wno-unused-value -Wno-logical-op-parentheses $(HAS_PROC) FIXUP:= ifdef PORTABLE CFLAGS+= -DGLEW_STATIC -Iglew/include @@ -32,6 +33,9 @@ ifeq ($(OS),Darwin) CFLAGS+= -IFrameworks/SDL2.framework/Headers LDFLAGS+= -FFrameworks -framework SDL2 -framework OpenGL FIXUP:=install_name_tool -change @rpath/SDL2.framework/Versions/A/SDL2 @executable_path/Frameworks/SDL2.framework/Versions/A/SDL2 ./blastem +else +CFLAGS+= -Isdl/include +LDFLAGS+= -Wl,-rpath='$$ORIGIN/lib' -Llib -lSDL2 $(shell pkg-config --libs gl) endif #Darwin else -- cgit v1.2.3