123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- VERSION = -std=c++14
- CFLAGS = $(shell pkg-config --cflags glfw3)
- LDFLAGS = $(shell pkg-config --static --libs glfw3) -lGL -lGLEW -lpng
- all: run_client
- run_client: game_client
- #vblank_mode=0 optirun ./game_client
- 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 ShaderProgram.o WorldShader.o FramebufferRectangle.o\
- SSAOShader.o SSAOBlurShader.o WorldPostShader.o OverlayShader.o\
- Matrix3D.o Matrix3DStack.o StackOverflow.o StackUnderflow.o Vector3D.o Plane3D.o Camera3D.o\
- Client.o\
- Block.o Blocks.o BlockAir.o\
- Face.o\
- Chunk.o World.o ChunkRenderer.o ClientChunkProvider.o BlockRenderer.o BlockRenderers.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 $@
-
- ShaderProgram.o: engine/shader/ShaderProgram.cpp engine/shader/ShaderProgram.h
- g++ $(VERSION) -c engine/shader/ShaderProgram.cpp -o $@
-
- WorldShader.o: engine/shader/WorldShader.cpp engine/shader/WorldShader.h
- g++ $(VERSION) -c engine/shader/WorldShader.cpp -o $@
-
- FramebufferRectangle.o: engine/shader/FramebufferRectangle.cpp engine/shader/FramebufferRectangle.h
- g++ $(VERSION) -c engine/shader/FramebufferRectangle.cpp -o $@
-
- SSAOShader.o: engine/shader/SSAOShader.cpp engine/shader/SSAOShader.h
- g++ $(VERSION) -c engine/shader/SSAOShader.cpp -o $@
-
- SSAOBlurShader.o: engine/shader/SSAOBlurShader.cpp engine/shader/SSAOBlurShader.h
- g++ $(VERSION) -c engine/shader/SSAOBlurShader.cpp -o $@
-
- WorldPostShader.o: engine/shader/WorldPostShader.cpp engine/shader/WorldPostShader.h
- g++ $(VERSION) -c engine/shader/WorldPostShader.cpp -o $@
-
- OverlayShader.o: engine/shader/OverlayShader.cpp engine/shader/OverlayShader.h
- g++ $(VERSION) -c engine/shader/OverlayShader.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 $@
-
- BlockRenderer.o: client/rendering/block/BlockRenderer.h client/rendering/block/BlockRenderer.cpp
- g++ $(VERSION) -c client/rendering/block/BlockRenderer.cpp -o $@
-
- BlockRenderers.o: client/rendering/block/BlockRenderers.h client/rendering/block/BlockRenderers.cpp
- g++ $(VERSION) -c client/rendering/block/BlockRenderers.cpp -o $@
- # ------------------------------------------------------------------------------
- # Utils
- # ------------------------------------------------------------------------------
-
- Face.o: utils/Face.h utils/Face.cpp
- g++ $(VERSION) -c utils/Face.cpp -o $@
-
- # ------------------------------------------------------------------------------
- # Block
- # ------------------------------------------------------------------------------
-
- Block.o: block/Block.h block/Block.cpp
- g++ $(VERSION) -c block/Block.cpp -o $@
-
- Blocks.o: block/Blocks.h block/Blocks.cpp
- g++ $(VERSION) -c block/Blocks.cpp -o $@
-
- BlockAir.o: block/BlockAir.h block/BlockAir.cpp
- g++ $(VERSION) -c block/BlockAir.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 $@
-
- Camera3D.o: math/Camera3D.h math/Camera3D.cpp
- g++ $(VERSION) -c math/Camera3D.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
- clean_o:
- rm -f *.o
|