Added build flags for OS X.
authorNolan Eakins <nolan@eakins.net>
Sun, 12 Aug 2012 13:35:30 +0000 (09:35 -0400)
committerNolan Eakins <nolan@eakins.net>
Sun, 12 Aug 2012 13:35:30 +0000 (09:35 -0400)
src/Makefile

index 08bfd88..246b9a1 100644 (file)
@@ -7,22 +7,30 @@ CPP=g++
 LD=g++
 
 RELEASE=1
+PROFILE=0
+MAC_OSX=0
 
 SDLCFLAGS=-I../vendor/SDL_draw-1.2.11/include $(shell sdl-config --cflags)
-SDLLIBS=-L../vendor/SDL_draw-1.2.11/src/.libs -lSDL_draw $(shell sdl-config --libs)
-#BOOSTPATH=-I/home/nolan/src/boost-1.30.2
-BOOSTPATH=
+SDLLIBS=-L../vendor/SDL_draw-1.2.11/src/.libs -lSDL_draw -lSDL_mixer $(shell sdl-config --libs)
 
-ifdef RELEASE
-CFLAGS=-O3 -Wall $(BOOSTPATH) $(SDLCFLAGS)
-LDFLAGS=$(SDLLIBS) -lSDL_mixer -lboost_system
+ifeq ($(MAC_OSX), 1)
+BOOST_CFLAGS=-I../vendor/boost_1_34_0
+BOOST_LDFLAGS=
 else
-ifdef PROFILE
-CFLAGS=-O3 -pg -Wall $(BOOSTPATH) $(SDLCFLAGS)
-LDFLAGS=$(SDLLIBS) -lSDL_mixer -pg -lboost_system
+BOOST_CFLAGS=
+BOOST_LDFLAGS=-lboost_system
+endif
+
+ifeq ($(RELEASE), 1)
+CFLAGS=-O3 -Wall $(BOOST_CFLAGS) $(SDLCFLAGS)
+LDFLAGS=$(SDLLIBS) $(BOOST_LDFLAGS)
+else
+ifeq ($(PROFILE), 1)
+CFLAGS=-O3 -pg -Wall $(BOOST_CFLAGS) $(SDLCFLAGS)
+LDFLAGS=$(SDLLIBS) -pg $(BOOST_LDFLAGS)
 else
-CFLAGS=-DDEBUG_MENU -DDEBUG -g -Wall $(BOOSTPATH) -I/usr/local/include $(SDLCFLAGS)
-LDFLAGS=$(SDLLIBS) -lSDL_mixer -lboost_system
+CFLAGS=-DDEBUG_MENU -DDEBUG -g -Wall $(BOOST_CFLAGS) -I/usr/local/include $(SDLCFLAGS)
+LDFLAGS=$(SDLLIBS) $(BOOST_LDFLAGS)
 endif
 endif