Makefile 603 B

12345678910111213141516171819202122232425
  1. VPATH=src
  2. CXXFLAGS=-Iinclude
  3. LIBS=-lsfml-graphics -lsfml-window -lsfml-system -lsfml-network \
  4. -l Box2D
  5. OBJ=car.o field.o ball.o wheel.o carExhaust.o carAI.o aiManager.o
  6. SERVER_OBJ=server.o
  7. SERVER_EXEC=server
  8. GAME_OBJ=game.o boostCounter.o camera.o
  9. GAME_EXEC=carsoccer
  10. all : server game
  11. %.o : %.cpp
  12. $(CXX) -c $< -o $@ $(CXXFLAGS)
  13. server : $(SERVER_OBJ) $(OBJ)
  14. $(CXX) -o $(SERVER_EXEC) $(SERVER_OBJ) $(OBJ) $(LIBS)
  15. game : $(GAME_OBJ) $(OBJ)
  16. $(CXX) -o $(GAME_EXEC) $(GAME_OBJ) $(OBJ) $(LIBS)
  17. .PHONY : clean
  18. clean :
  19. rm $(SERVER_OBJ) $(GAME_OBJ) $(OBJ) \
  20. $(SERVER_EXEC) $(GAME_EXEC)