Committing Everything!
This commit is contained in:
32
makefile
Normal file
32
makefile
Normal file
@@ -0,0 +1,32 @@
|
||||
SOURCES=$(wildcard src/*.cpp)
|
||||
OBJS=$(SOURCES:.cpp=.o)
|
||||
|
||||
# compiler options : add debug information in debug mode
|
||||
# optimize speed and size in release mode
|
||||
ifneq (,$(findstring debug,$(MAKECMDGOALS)))
|
||||
CFLAGS=-g
|
||||
else
|
||||
CFLAGS=-02 -s
|
||||
endif
|
||||
|
||||
# linker options : OS dependant
|
||||
ifeq ($(shell sh -c 'uname -s'),Linux)
|
||||
LIBFLAGS=-L. -ltcod_debug -ltcodxx_debug -Wl,-rpath=.
|
||||
else
|
||||
LIBFLAGS=-Llib -ltcod-mingw-debug -static-libgcc -static-libstdc++
|
||||
endif
|
||||
|
||||
debug : tuto
|
||||
release : tuto
|
||||
|
||||
tuto : $(OBJS)
|
||||
g++ $(OBJS) -o tuto -Wall $(LIBFLAGS) -g -w
|
||||
|
||||
src/main.hpp.gch : src/*.hpp
|
||||
g++ src/main.hpp -Iinclude -Wall
|
||||
|
||||
src/%.o : src/%.cpp src/main.hpp.gch
|
||||
g++ $< -c -o $@ -Iinclude -Wall -g
|
||||
|
||||
clean :
|
||||
rm -f src/main.hpp.gch $(OBJS)
|
Reference in New Issue
Block a user