Makefile 684 B

1234567891011121314151617181920212223242526272829
  1. VERSION = -std=c++14
  2. CFLAGS = $(shell pkg-config --cflags glfw3)
  3. LDFLAGS = $(shell pkg-config --static --libs glfw3) -lGL -lGLEW -lpng
  4. all: game
  5. run_client: game_client
  6. vblank_mode=0 optirun ./game_client
  7. game_client: MainClient.cpp engine math client *.o
  8. g++ $(VERSION) -o $@ MainClient.cpp *.o $(LDFLAGS)
  9. engine: engine/*.cpp engine/*.h
  10. g++ $(VERSION) -c engine/*.cpp $(LDFLAGS)
  11. math: math/*.cpp math/*.h
  12. g++ $(VERSION) -c math/*.cpp $(LDFLAGS)
  13. client: client/*.cpp client/*.h
  14. g++ $(VERSION) -c client/*.cpp $(LDFLAGS)
  15. run_server: game_server
  16. ./game_server
  17. game_server: MainServer.cpp
  18. g++ $(VERSION) -o $@ MainServer.cpp
  19. clean:
  20. rm -f game_server game_client