123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- VERSION = -std=c++14
- CFLAGS = $(shell pkg-config --cflags glfw3)
- LDFLAGS = $(shell pkg-config --static --libs glfw3) -lGL -lGLEW -lpng
- all: game
- run_client: game_client
- vblank_mode=0 optirun ./game_client
-
- game_client: MainClient.cpp\
- Clock.o DirectRenderer.o KeyManager.o Mesh.o MouseManager.o Shader.o Texture.o Utils.o Wrapper.o\
- Matrix3D.o Matrix3DStack.o StackOverflow.o StackUnderflow.o Vector3D.o Plane3D.o\
- Client.o\
- Chunk.o World.o ChunkRenderer.o ClientChunkProvider.o
- g++ $(VERSION) -o $@ MainClient.cpp *.o $(LDFLAGS)
- # ------------------------------------------------------------------------------
- # Engine
- # ------------------------------------------------------------------------------
-
- Clock.o: engine/Clock.cpp engine/Clock.h
- g++ $(VERSION) -c engine/Clock.cpp -o $@
- DirectRenderer.o: engine/DirectRenderer.cpp engine/DirectRenderer.h
- g++ $(VERSION) -c engine/DirectRenderer.cpp -o $@
-
- KeyManager.o: engine/KeyManager.cpp engine/KeyManager.h
- g++ $(VERSION) -c engine/KeyManager.cpp -o $@
- Mesh.o: engine/Mesh.cpp engine/Mesh.h
- g++ $(VERSION) -c engine/Mesh.cpp -o $@
- MouseManager.o: engine/MouseManager.cpp engine/MouseManager.h
- g++ $(VERSION) -c engine/MouseManager.cpp -o $@
-
- Shader.o: engine/Shader.cpp engine/Shader.h
- g++ $(VERSION) -c engine/Shader.cpp -o $@
-
- Texture.o: engine/Texture.cpp engine/Texture.h
- g++ $(VERSION) -c engine/Texture.cpp -o $@
- Utils.o: engine/Utils.cpp engine/Utils.h
- g++ $(VERSION) -c engine/Utils.cpp -o $@
-
- Wrapper.o: engine/Wrapper.cpp engine/Wrapper.h
- g++ $(VERSION) -c engine/Wrapper.cpp -o $@
-
- # ------------------------------------------------------------------------------
- # Client
- # ------------------------------------------------------------------------------
-
- Client.o: client/Client.h client/Client.cpp
- g++ $(VERSION) -c client/Client.cpp -o $@
-
- ChunkRenderer.o: client/rendering/ChunkRenderer.h client/rendering/ChunkRenderer.cpp world/IChunkListener.h
- g++ $(VERSION) -c client/rendering/ChunkRenderer.cpp -o $@
-
- ClientChunkProvider.o: client/rendering/ClientChunkProvider.h client/rendering/ClientChunkProvider.cpp world/IChunkProvider.h
- g++ $(VERSION) -c client/rendering/ClientChunkProvider.cpp -o $@
-
- # ------------------------------------------------------------------------------
- # World
- # ------------------------------------------------------------------------------
-
- Chunk.o: world/Chunk.h world/Chunk.cpp
- g++ $(VERSION) -c world/Chunk.cpp -o $@
-
- World.o: world/World.h world/World.cpp data/UnsortedArrayList.h
- g++ $(VERSION) -c world/World.cpp -o $@
- # ------------------------------------------------------------------------------
- # Math
- # ------------------------------------------------------------------------------
- Matrix3D.o: math/Matrix3D.h math/Matrix3D.cpp
- g++ $(VERSION) -c math/Matrix3D.cpp -o $@
-
- Matrix3DStack.o: math/Matrix3DStack.h math/Matrix3DStack.cpp
- g++ $(VERSION) -c math/Matrix3DStack.cpp -o $@
-
- StackOverflow.o: math/StackOverflow.h math/StackOverflow.cpp
- g++ $(VERSION) -c math/StackOverflow.cpp -o $@
-
- StackUnderflow.o: math/StackUnderflow.h math/StackUnderflow.cpp
- g++ $(VERSION) -c math/StackUnderflow.cpp -o $@
-
- Vector3D.o: math/Vector3D.h math/Vector3D.cpp
- g++ $(VERSION) -c math/Vector3D.cpp -o $@
-
- Plane3D.o: math/Plane3D.h math/Plane3D.cpp
- g++ $(VERSION) -c math/Plane3D.cpp -o $@
-
- # ------------------------------------------------------------------------------
- # server
- # ------------------------------------------------------------------------------
-
- run_server: game_server
- ./game_server
-
- game_server: MainServer.cpp
- g++ $(VERSION) -o $@ MainServer.cpp
-
- # ------------------------------------------------------------------------------
- # tests
- # ------------------------------------------------------------------------------
-
- run_tests: test
- ./test
-
- test: MainTest.cpp data/UnsortedArrayList.h data/HashMap.h
- g++ $(VERSION) -o $@ MainTest.cpp
-
- # ------------------------------------------------------------------------------
- # clean
- # ------------------------------------------------------------------------------
-
- clean:
- rm -f game_server game_client *.o test
|