#MACROS CXX_FLAGS := -O3 -Wall -Wextra -Wpedantic CXX := g++ -std=c++11 CURSES := -lncurses THREADS := -pthread TINFO := -ltinfo OPTIONS := $(CURSES) $(THREADS) $(TINFO) .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 rocket.hpp definitions.hpp functions.hpp $(CXX) $(CXX_FLAGS) -c $< bossrush.o: bossrush.cpp bullet.hpp enemy.hpp player.hpp rocket.hpp definitions.hpp functions.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 powerup.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 $< clean: rm -f *~ *.o cleanall: clean rm -f invaders rm -f bossrush remake: clean invaders bossrush