aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2015-10-05 08:43:49 -0400
committerdrumsetmonkey <abelleisle@roadrunner.com>2015-10-05 08:43:49 -0400
commit2957819d01ed2d9d7bc71408a7431f9add8d51c5 (patch)
treec589e39133865cb3478ad823062eb2d715ab81bd /Makefile
parent88f6f81f7742f389eb3c68593b91ea639e54ab3b (diff)
parent36841bcf392f0ee7773a5e5696f14a819d6db58c (diff)
Added house texture
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 17 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 8cec40d..e571e03 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,22 @@
-FLAGS_LINUX = -lGL -lSDL2_image -lSDL2_mixer
-FLAGS_WIN32 = -lopengl32 -lmingw32 -lSDL2_Image
+LIBS_LINUX = -lGL -lSDL2_image -lSDL2_mixer
+LIBS_WIN32 = -lopengl32 -lmingw32 -lSDL2_Image
+
FLAGS = -m32 -std=c++11 -Iinclude -Iinclude/freetype2 -lSDL2main -lSDL2 -lfreetype
-all:
- @g++ src/*.cpp -o main $(FLAGS_LINUX) $(FLAGS)
+SRCS = $(wildcard src/*.cpp)
+
+OUT = $(SRCS:.cpp=.o)
+
+.cpp.o:
+ @echo " CXX " $^
+ @g++ -o $@ -c $^ $(LIBS_LINUX) $(FLAGS)
-win32:
- @g++ -L lib/ src/*.cpp -o main.exe $(FLAGS_WIN32) $(FLAGS)
+all: $(OUT)
+ @echo "Relocating object files..."
+ @mv ./src/*.o ./out
+ @echo " CXX main.cpp"
+ @g++ -o main main.cpp out/*.o $(LIBS_LINUX) $(FLAGS)
clean:
- rm main*
+ -rm main
+ -rm out/*.o