Browse Source

Merge branch 'werror' of lcmstaff/invaders into master

blue 4 years ago
parent
commit
8e74397997
1 changed files with 5 additions and 11 deletions
  1. 5 11
      makefile

+ 5 - 11
makefile

@@ -1,16 +1,10 @@
 #MACROS
 
-CXX_FLAGS := -O3 -Wall -Wextra -Wpedantic
+CXX_FLAGS := -O3 -Wall -Wextra -Wpedantic -Werror
 
-CXX := g++ -std=c++11
-
-CURSES := -lncurses
-
-THREADS := -pthread
+LIBS := -lncurses -pthread -ltinfo
 
-TINFO := -ltinfo
-
-OPTIONS := $(CURSES) $(THREADS) $(TINFO)
+CXX := g++ -std=c++11
 
 
 .PHONY: open, opencpp, openhpp, clean, cleanall, remake
@@ -20,10 +14,10 @@ OPTIONS := $(CURSES) $(THREADS) $(TINFO)
 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)
+	$(CXX) $(CXX_FLAGS) $^ -o $@ $(LIBS)
 
 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) 
+	$(CXX) $(CXX_FLAGS) $^ -o $@ $(LIBS)
 
 invaders.o: invaders.cpp bullet.hpp enemy.hpp player.hpp rocket.hpp definitions.hpp functions.hpp
 	$(CXX) $(CXX_FLAGS) -c $<