Makefile 767 B

1234567891011121314151617181920212223242526272829303132
  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 world *.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. world: world/*.cpp world/*.h
  16. g++ $(VERSION) -c world/*.cpp $(LDFLAGS)
  17. run_server: game_server
  18. ./game_server
  19. game_server: MainServer.cpp
  20. g++ $(VERSION) -o $@ MainServer.cpp
  21. clean:
  22. rm -f game_server game_client *.o