Makefile (928B)
1 CC = g++ 2 CC_FLAGS = -g -O3 -lpanel -lncurses -std=c++11 -pthread 3 EXEC = termaze 4 OBJECTS = main.o maze_gen.o pathfinding.o ui.o timer.o state.o 5 6 7 $(EXEC): $(OBJECTS) 8 $(CC) $(CC_FLAGS) $(OBJECTS) -o $(EXEC) 9 10 11 main.o: maze_gen.o pathfinding.o ui.o timer.o \ 12 state.o vec2.hpp colors.hpp main.cpp 13 $(CC) -c $(CC_FLAGS) main.cpp 14 15 ui.o: maze_gen.o pathfinding.o state.o colors.hpp ui.?pp 16 $(CC) -c $(CC_FLAGS) ui.cpp 17 18 maze_gen.o: timer.o vec2.hpp state.o colors.hpp maze_gen.?pp 19 $(CC) -c $(CC_FLAGS) maze_gen.cpp 20 21 pathfinding.o: timer.o vec2.hpp state.o colors.hpp pathfinding.?pp 22 $(CC) -c $(CC_FLAGS) pathfinding.cpp 23 24 timer.o: state.hpp timer.?pp 25 $(CC) -c $(CC_FLAGS) timer.cpp 26 27 state.o: state.?pp 28 $(CC) -c $(CC_FLAGS) state.cpp 29 30 install: $(EXEC) 31 cp -f $(EXEC) /usr/local/bin 32 chmod 755 /usr/local/bin/$(EXEC) 33 34 uninstall: 35 rm -f /usr/local/bin/$(EXEC) 36 37 clean: 38 -rm -f $(EXEC) $(OBJECTS) *.gch 39 40 .PHONY: clean install uninstall