From 580788097d88f310d6c25017e5fab6171bca4573 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Sat, 17 Oct 2009 21:25:54 +0000 Subject: [PATCH] added TOPLEVEL to recursively find includes relative to the top level directory git-svn-id: svn://anubis/anaglym/trunk@92 99a6e188-d820-4881-8870-2d33a10e2619 --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 142feab..f9bdba2 100644 --- a/Makefile +++ b/Makefile @@ -33,11 +33,14 @@ ifeq ($(WINDOWS),1) GLLIBS := -lopengl32 -lglu32 WINDOWSLIBS := -lmingw32 TARGET := $(TARGET).exe +TOPLEVEL := $(shell cd) else -GLLIBS := -lGL -lGLU +GLLIBS := -lGL -lGLU +TOPLEVEL := $(shell pwd) endif -export CFLAGS := $(LUAINCLUDE) $(SDLINCLUDE) $(ODEINCLUDE) -O2 -Wall +export CPPFLAGS := $(LUAINCLUDE) $(SDLINCLUDE) $(ODEINCLUDE) -I$(TOPLEVEL) +export CFLAGS := $(CPPFLAGS) -O2 -Wall export CXXFLAGS := $(CFLAGS) export LDFLAGS := $(LUALIBS) $(ODELIBS) $(GLLIBS) $(WINDOWSLIBS) $(SDLLIBS)