1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- #MACROS
- CXX_FLAGS := -O3
- CXX := g++ -std=c++11
- WARNINGS := -Wall
- EDITOR := gedit
- CURSES := -lncurses
- THREADS := -pthread
- OPTIONS := $(CURSES) $(THREADS)
- .PHONY: open, opencpp, openhpp, clean, cleanall, remake
- #TARGETS
- all: invaders #bossrush
- invaders: game_object.o bullet.o enemy.o player.o functions.o pic.o body.o boss.o wall.o powerup.o rocket.o invaders.o
- $(CXX) $(CXX_FLAGS) $^ -o $@ $(OPTIONS)
- bossrush: game_object.o bullet.o enemy.o player.o functions.o pic.o body.o boss.o wall.o powerup.o rocket.o bossrush.o
- $(CXX) $(CXX_FLAGS) $^ -o $@ $(OPTIONS)
- invaders.o: invaders.cpp bullet.hpp enemy.hpp player.hpp box.hpp rocket.hpp definitions.hpp functions.hpp
- $(CXX) $(CXX_FLAGS) -c $<
-
- bossrush.o: bossrush.cpp bullet.hpp enemy.hpp player.hpp box.hpp rocket.hpp definitions.hpp functions.hpp
- $(CXX) $(CXX_FLAGS) -c $<
- #box.o: box.cpp box.hpp definitions.hpp player.hpp rocket.hpp bullet.hpp enemy.hpp boss.hpp
- # $(CXX) $(CXX_FLAGS) -c $<
- game_object.o: game_object.cpp game_object.hpp
- $(CXX) $(CXX_FLAGS) -c $<
- bullet.o: bullet.cpp bullet.hpp game_object.hpp
- $(CXX) $(CXX_FLAGS) -c $<
-
- enemy.o: enemy.cpp enemy.hpp game_object.hpp bullet.hpp definitions.hpp
- $(CXX) $(CXX_FLAGS) -c $<
-
- player.o: player.cpp player.hpp game_object.hpp bullet.hpp rocket.hpp definitions.hpp
- $(CXX) $(CXX_FLAGS) -c $<
- functions.o: functions.cpp functions.hpp definitions.hpp box.hpp player.hpp bullet.hpp enemy.hpp wall.hpp boss.hpp
- $(CXX) $(CXX_FLAGS) -c $<
- body.o: body.cpp body.hpp
- $(CXX) $(CXX_FLAGS) -c $<
-
- pic.o: pic.cpp body.hpp pic.hpp definitions.hpp
- $(CXX) $(CXX_FLAGS) -c $<
- boss.o: boss.cpp boss.hpp pic.hpp
- $(CXX) $(CXX_FLAGS) -c $<
- wall.o: wall.cpp wall.hpp game_object.hpp
- $(CXX) $(CXX_FLAGS) -c $<
-
- powerup.o: powerup.cpp powerup.hpp bullet.hpp
- $(CXX) $(CXX_FLAGS) -c $<
- rocket.o: rocket.cpp rocket.hpp bullet.hpp definitions.hpp
- $(CXX) $(CXX_FLAGS) -c $<
- #UTILITIES
- open:
- $(EDITOR) *.cpp *.hpp makefile &
- openhpp:
- $(EDITOR) *.hpp&
- opencpp:
- $(EDITOR) *.cpp&
- clean:
- rm -f *~ *.o
- cleanall: clean
- rm -f invaders
- rm -f bossrush
- remake: clean invaders bossrush
|