Compare commits

...

2 Commits

Author SHA1 Message Date
Martin Slachta 2e95c941ba #2 - Docker building for older glibc 2026-08-05 10:00:31 +02:00
Martin Slachta 2f0662e2bb #2 - Static linking & dependency reduction 2026-08-05 09:59:25 +02:00
32 changed files with 366 additions and 908 deletions
+1 -4
View File
@@ -12,8 +12,5 @@ cmake-build-debug/
compile_commands.json
*.md
# cloned by FetchContent at configure time
external/glm/
external/entt/
external/jolt/
# cloned by FetchContent into the build tree at configure time
external/tracy/
+1
View File
@@ -2,6 +2,7 @@ build/
Debug/
Release/
Testing/
dist/
.cache
imgui.ini
+2 -2
View File
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.26)
project(towards)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(cmake/CompilerOptions.cmake)
include(cmake/Dependencies.cmake)
@@ -50,8 +52,6 @@ target_link_libraries(${PROJECT_NAME}
Jolt
tl::expected
Tracy::TracyClient
pqxx
pq
)
include(cmake/Modules.cmake)
+14
View File
@@ -41,3 +41,17 @@ Server is at `build/modules/client/mmo_server`
Client is at `build/modules/client/mmo_client`
First run the server, so that client can connect. The server will try to use port 8080, but if it is already occupied, it will try use the next free higher one.
## Docker build
It also possible to build the project using Docker. Advantage is that you do not have to set up the environment. The current Dockerfile also uses older linux distribution to be backwards compatible with older systems. To build everything, build the Dockerfile at `docker/Dockerfile` with until target `builder`:
```
$ docker build -f docker/Dockerfile --target builder -t tw_builder:jammy .
```
To easily export the built executables, run the target `export` of the same Dockerfile.
```
$ docker build -f docker/Dockerfile --target export --output type=local,dest=dist .
```
+3 -2
View File
@@ -4,8 +4,9 @@ set(LFT_ENABLE_EXAMPLES OFF CACHE BOOL "Disable loft examples" FORCE)
set(FASTNOISE2_NOISETOOL OFF CACHE BOOL "Disable FastNoise2 graph tool" FORCE)
find_package(Vulkan REQUIRED)
find_package(SDL2 REQUIRED)
find_package(Protobuf CONFIG REQUIRED)
find_package(SDL3 CONFIG REQUIRED)
find_library(LIBDECOR_LIB decor-0)
find_package(Protobuf CONFIG REQUIRED VERSION 3.75)
include(FetchContent)
set(CMAKE_CONFIGURATION_TYPES "Debug;Release;Distribution")
+29 -5
View File
@@ -24,13 +24,37 @@ services:
depends_on:
- timescaledb
zone-server:
build: .
# The zone server is not containerised yet: it needs libpqxx >= 7.7 for
# pqxx::params and jammy carries 6.4.
# ── e2e harness ────────────────────────────────────────────────────────────
# Opt in with `--profile e2e`, so a plain `docker compose up` still brings up
# the database and dashboards on their own.
#
# docker compose --profile e2e up --build \
# --abort-on-container-exit --exit-code-from chat-mock-client
chat-server:
profiles: [e2e]
build:
context: .
dockerfile: docker/Dockerfile
target: chat-server
ports:
- "8101:8101/udp"
- "8102:8102/udp"
- "8099:8099/udp"
chat-mock-client:
profiles: [e2e]
build:
context: .
dockerfile: docker/Dockerfile
target: chat-mock-client
# Address.hpp parses peers with inet_addr, which takes literal IPv4 only and
# never consults DNS, so a service name is not addressable. Sharing the
# server's network namespace makes its default 127.0.0.1 land on the server.
network_mode: "service:chat-server"
depends_on:
- timescaledb
- chat-server
command: ["--channel", "1"]
volumes:
timescaledb_data:
+17 -3
View File
@@ -1,14 +1,28 @@
[requires]
protobuf/7.35.0
sdl/2.32.10
sdl/3.4.8
[tool_requires]
protobuf/7.35.0
[options]
sdl/*:pulse=False
libffi/*:shared=True
protobuf/*:shared=False
sdl/*:shared=False
sdl/*:camera=False
sdl/*:dialog=False
sdl/*:tray=False
sdl/*:sensor=False
sdl/*:alsa=True
sdl/*:pulseaudio=False
sdl/*:sndio=False
sdl/*:opengl=False
sdl/*:opengles=False
sdl/*:vulkan=True
sdl/*:joystick=False
sdl/*:haptic=False
sdl/*:hidapi=False
[generators]
CMakeDeps
CMakeToolchain
+147
View File
@@ -0,0 +1,147 @@
# syntax=docker/dockerfile:1.7
#
# Builds against Ubuntu 22.04 (glibc 2.35) so the binaries also run on
# distributions older than the developer machine. Two things make that work:
#
# * GCC 14 from the toolchain PPA — jammy's own gcc-11 has no <print>, which
# eight translation units use.
# * -static-libstdc++ -static-libgcc — the target then needs nothing newer
# than the glibc of this base image.
#
# docker build -f docker/Dockerfile --target mock-client -t tw_mock_client .
# docker build -f docker/Dockerfile --target test .
# docker build -f docker/Dockerfile --target export --output type=local,dest=dist .
ARG UBUNTU_VERSION=22.04
# ── toolchain stage ──────────────────────────────────────────────────────────
FROM ubuntu:${UBUNTU_VERSION} AS toolchain
ENV DEBIAN_FRONTEND=noninteractive
# jammy's Vulkan headers are 1.3.204, which predates the VkBufferUsageFlags2
# constants the renderer uses, and its glslang predates the -gVS the shader
# target passes. LunarG publishes current headers, loader and glslang for jammy,
# and outranks the distro packages on version.
ARG VULKAN_SDK_VERSION=1.4.313
# The apt lists are kept: conan installs the xorg and egl system packages itself
# while resolving SDL.
RUN apt-get update && apt-get install -y --no-install-recommends \
software-properties-common ca-certificates gnupg wget \
&& add-apt-repository -y ppa:ubuntu-toolchain-r/test \
&& wget -qO /etc/apt/trusted.gpg.d/lunarg.asc \
https://packages.lunarg.com/lunarg-signing-key-pub.asc \
&& wget -qO /etc/apt/sources.list.d/lunarg-vulkan.list \
"https://packages.lunarg.com/vulkan/${VULKAN_SDK_VERSION}/lunarg-vulkan-${VULKAN_SDK_VERSION}-jammy.list" \
&& apt-get update && apt-get install -y --no-install-recommends \
gcc-14 g++-14 \
git make ninja-build ccache pkg-config \
python3-pip \
vulkan-headers libvulkan-dev glslang-tools \
libdecor-0-dev
# cmake comes from pip because jammy ships 3.22 and the project asks for 3.26.
ARG CMAKE_VERSION=4.4.0
ARG CONAN_VERSION=2.31.1
RUN pip3 install --no-cache-dir "cmake==${CMAKE_VERSION}" "conan==${CONAN_VERSION}"
# Some autotools dependencies (flex, by way of SDL) run sub-configures that look
# for an unsuffixed gcc/cc and ignore $CC, so 14 has to answer to the plain names.
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100 \
--slave /usr/bin/g++ g++ /usr/bin/g++-14 \
--slave /usr/bin/gcov gcov /usr/bin/gcov-14 \
&& update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-14 100 \
&& update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-14 100
ENV CC=gcc
ENV CXX=g++
COPY docker/conan/jammy /etc/conan/jammy
# ── dependency stage ─────────────────────────────────────────────────────────
# Kept apart from the build so that editing sources does not rebuild SDL and
# protobuf. The conan cache lives in the image layer rather than a cache mount,
# so the generators in /deps can never outlive the packages they point at.
FROM toolchain AS deps
COPY conanfile.txt /src/conanfile.txt
RUN conan install /src/conanfile.txt \
--profile:all=/etc/conan/jammy \
--build=missing \
--output-folder=/deps
# ── build stage ──────────────────────────────────────────────────────────────
# The build tree is a cache mount, so an edit rebuilds only what it touched.
# That is also why glm, entt and Jolt have to travel in the build context: their
# FetchContent SOURCE_DIRs point into external/, while the stamps that record
# them as populated live in the cached build tree. Dropping them from the
# context would leave the stamps pointing at empty directories.
FROM deps AS builder
WORKDIR /src
COPY . .
# tw_server is absent on purpose: it needs libpqxx >= 7.7 for pqxx::params and
# jammy carries 6.4.
RUN --mount=type=cache,target=/build \
--mount=type=cache,target=/root/.ccache \
cmake -S /src -B /build -G Ninja \
-DCMAKE_TOOLCHAIN_FILE=/deps/conan_toolchain.cmake \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_MOLD_LINKER=OFF \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_EXE_LINKER_FLAGS="-static-libstdc++ -static-libgcc" \
&& cmake --build /build --target \
tw_client \
tw_mock_client \
tw_chat_server_exe \
tw_chat_mock_client \
tw_message_protocol_tests \
tw_metrics_tests \
tw_network_tests \
tw_peer_to_peer_tests \
&& mkdir -p /out/bin /out/shaders \
&& cp /build/modules/client/tw_client \
/build/modules/mock_client/tw_mock_client \
/build/modules/chat_service/chat_server_exe/tw_chat_server_exe \
/build/modules/chat_service/chat_service/tests/chat_mock_client/tw_chat_mock_client \
/out/bin/ \
&& cp /build/modules/client/shaders/*.spirv /out/shaders/
# ── unit test stage ──────────────────────────────────────────────────────────
# Catch2 suites only. The process harnesses below need peers and a network, so
# they run as compose services instead.
FROM builder AS test
RUN --mount=type=cache,target=/build \
ctest --test-dir /build --output-on-failure
# ── client export stage ──────────────────────────────────────────────────────
# Not runnable as a container; the client needs a GPU and a display. Extract it:
# docker build -f docker/Dockerfile --target export --output type=local,dest=dist .
FROM scratch AS export
COPY --from=builder /out/bin/tw_client /tw_client
COPY --from=builder /out/shaders/ /shaders/
# ── runtime stages ───────────────────────────────────────────────────────────
FROM gcr.io/distroless/base-debian12:nonroot AS mock-client
COPY --from=builder /out/bin/tw_mock_client /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/tw_mock_client"]
FROM gcr.io/distroless/base-debian12:nonroot AS chat-server
COPY --from=builder /out/bin/tw_chat_server_exe /usr/local/bin/
EXPOSE 8101/udp
ENTRYPOINT ["/usr/local/bin/tw_chat_server_exe"]
FROM gcr.io/distroless/base-debian12:nonroot AS chat-mock-client
COPY --from=builder /out/bin/tw_chat_mock_client /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/tw_chat_mock_client"]
+14
View File
@@ -0,0 +1,14 @@
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.version=14
compiler.cppstd=gnu23
compiler.libcxx=libstdc++11
os=Linux
[conf]
# xorg/system and egl/system resolve to apt packages; the build runs as root so
# no sudo is available or needed.
tools.system.package_manager:mode=install
tools.system.package_manager:sudo=False
+2 -4
View File
@@ -3,10 +3,9 @@ project(imgui)
file(GLOB FILES
./*.cpp
./backends/imgui_impl_vulkan.cpp
./backends/imgui_impl_sdl2.cpp
./backends/imgui_impl_sdl3.cpp
)
find_package(SDL2 QUIET)
find_package(Vulkan REQUIRED)
add_library(${PROJECT_NAME} OBJECT ${FILES})
@@ -21,11 +20,10 @@ target_include_directories(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME}
PUBLIC
volk::volk
${SDL2_LIBRARIES}
sdl::sdl
)
target_include_directories(${PROJECT_NAME}
PRIVATE
${volk_INCLUDE_DIRS}
${SDL2_INCLUDE_DIRS}
)
+1 -1
View File
@@ -25,7 +25,7 @@ target_include_directories(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME}
PUBLIC
volk::volk
${SDL2_LIBRARIES}
sdl::sdl
imgui::imgui
)
#
+2 -3
View File
@@ -5,13 +5,13 @@ option(LFT_ENABLE_EXAMPLES "Enable building examples" ON)
if (WIN32)
set(VOLK_STATIC_DEFINES VK_USE_PLATFORM_WIN32_KHR)
elseif(UNIX)
set(VOLK_STATIC_DEFINES VK_USE_PLATFORM_XCB_KHR)
set(VOLK_STATIC_DEFINES VK_USE_PLATFORM_XCB_KHR VK_USE_PLATFORM_WAYLAND_KHR)
endif()
# Please set default paths for vulkan and SDL2
set(VULKAN_PATH "$ENV{VULKAN_SDK}" CACHE STRING "Path to vulkan directory")
set(SDL2_PATH "$ENV{VULKAN_SDK}/cmake" CACHE STRING "Path to SDL2 directory")
# set(SDL2_PATH "$ENV{VULKAN_SDK}/cmake" CACHE STRING "Path to SDL2 directory")
list(APPEND CMAKE_PREFIX_PATH "$ENV{VULKAN_SDK}/cmake")
@@ -51,7 +51,6 @@ add_definitions(
)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
-140
View File
@@ -1,140 +0,0 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.30
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
.NOTPARALLEL:
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Disable VCS-based implicit rules.
% : %,v
# Disable VCS-based implicit rules.
% : RCS/%
# Disable VCS-based implicit rules.
% : RCS/%,v
# Disable VCS-based implicit rules.
% : SCCS/s.%
# Disable VCS-based implicit rules.
% : s.%
.SUFFIXES: .hpux_make_needs_suffix_list
# Command-line flag to silence nested $(MAKE).
$(VERBOSE)MAKESILENT = -s
#Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E rm -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/martin/projects/mmo
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/martin/projects/mmo
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake cache editor..."
/usr/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : edit_cache
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..."
/usr/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# The main all target
all: cmake_check_build_system
cd /home/martin/projects/mmo && $(CMAKE_COMMAND) -E cmake_progress_start /home/martin/projects/mmo/CMakeFiles /home/martin/projects/mmo/external/loft//CMakeFiles/progress.marks
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 external/loft/all
$(CMAKE_COMMAND) -E cmake_progress_start /home/martin/projects/mmo/CMakeFiles 0
.PHONY : all
# The main clean target
clean:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 external/loft/clean
.PHONY : clean
# The main clean target
clean/fast: clean
.PHONY : clean/fast
# Prepare targets for installation.
preinstall: all
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 external/loft/preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 external/loft/preinstall
.PHONY : preinstall/fast
# clear depends
depend:
cd /home/martin/projects/mmo && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend
# Help Target
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... edit_cache"
@echo "... rebuild_cache"
.PHONY : help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
cd /home/martin/projects/mmo && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system
+1 -1
View File
@@ -111,7 +111,7 @@ target_link_libraries(
target_link_libraries(
${PROJECT_NAME} PRIVATE
${SDL2_LIBRARIES}
sdl::sdl
)
get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
@@ -17,7 +17,8 @@ target_include_directories(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME}
PUBLIC
volk::volk
${SDL2_LIBRARIES})
sdl::sdl
)
target_include_directories(${PROJECT_NAME}
PUBLIC
-560
View File
@@ -1,560 +0,0 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.30
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
.NOTPARALLEL:
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Disable VCS-based implicit rules.
% : %,v
# Disable VCS-based implicit rules.
% : RCS/%
# Disable VCS-based implicit rules.
% : RCS/%,v
# Disable VCS-based implicit rules.
% : SCCS/s.%
# Disable VCS-based implicit rules.
% : s.%
.SUFFIXES: .hpux_make_needs_suffix_list
# Command-line flag to silence nested $(MAKE).
$(VERBOSE)MAKESILENT = -s
#Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E rm -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/martin/projects/mmo
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/martin/projects/mmo
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake cache editor..."
/usr/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : edit_cache
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..."
/usr/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# The main all target
all: cmake_check_build_system
cd /home/martin/projects/mmo && $(CMAKE_COMMAND) -E cmake_progress_start /home/martin/projects/mmo/CMakeFiles /home/martin/projects/mmo/external/loft/modules/base//CMakeFiles/progress.marks
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 external/loft/modules/base/all
$(CMAKE_COMMAND) -E cmake_progress_start /home/martin/projects/mmo/CMakeFiles 0
.PHONY : all
# The main clean target
clean:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 external/loft/modules/base/clean
.PHONY : clean
# The main clean target
clean/fast: clean
.PHONY : clean/fast
# Prepare targets for installation.
preinstall: all
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 external/loft/modules/base/preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 external/loft/modules/base/preinstall
.PHONY : preinstall/fast
# clear depends
depend:
cd /home/martin/projects/mmo && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend
# Convenience name for target.
external/loft/modules/base/CMakeFiles/loft_base.dir/rule:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 external/loft/modules/base/CMakeFiles/loft_base.dir/rule
.PHONY : external/loft/modules/base/CMakeFiles/loft_base.dir/rule
# Convenience name for target.
loft_base: external/loft/modules/base/CMakeFiles/loft_base.dir/rule
.PHONY : loft_base
# fast build rule for target.
loft_base/fast:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/build
.PHONY : loft_base/fast
src/FramebufferBuilder.o: src/FramebufferBuilder.cpp.o
.PHONY : src/FramebufferBuilder.o
# target to build an object file
src/FramebufferBuilder.cpp.o:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/FramebufferBuilder.cpp.o
.PHONY : src/FramebufferBuilder.cpp.o
src/FramebufferBuilder.i: src/FramebufferBuilder.cpp.i
.PHONY : src/FramebufferBuilder.i
# target to preprocess a source file
src/FramebufferBuilder.cpp.i:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/FramebufferBuilder.cpp.i
.PHONY : src/FramebufferBuilder.cpp.i
src/FramebufferBuilder.s: src/FramebufferBuilder.cpp.s
.PHONY : src/FramebufferBuilder.s
# target to generate assembly for a file
src/FramebufferBuilder.cpp.s:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/FramebufferBuilder.cpp.s
.PHONY : src/FramebufferBuilder.cpp.s
src/Gpu.o: src/Gpu.cpp.o
.PHONY : src/Gpu.o
# target to build an object file
src/Gpu.cpp.o:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/Gpu.cpp.o
.PHONY : src/Gpu.cpp.o
src/Gpu.i: src/Gpu.cpp.i
.PHONY : src/Gpu.i
# target to preprocess a source file
src/Gpu.cpp.i:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/Gpu.cpp.i
.PHONY : src/Gpu.cpp.i
src/Gpu.s: src/Gpu.cpp.s
.PHONY : src/Gpu.s
# target to generate assembly for a file
src/Gpu.cpp.s:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/Gpu.cpp.s
.PHONY : src/Gpu.cpp.s
src/Instance.o: src/Instance.cpp.o
.PHONY : src/Instance.o
# target to build an object file
src/Instance.cpp.o:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/Instance.cpp.o
.PHONY : src/Instance.cpp.o
src/Instance.i: src/Instance.cpp.i
.PHONY : src/Instance.i
# target to preprocess a source file
src/Instance.cpp.i:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/Instance.cpp.i
.PHONY : src/Instance.cpp.i
src/Instance.s: src/Instance.cpp.s
.PHONY : src/Instance.s
# target to generate assembly for a file
src/Instance.cpp.s:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/Instance.cpp.s
.PHONY : src/Instance.cpp.s
src/io/file.o: src/io/file.cpp.o
.PHONY : src/io/file.o
# target to build an object file
src/io/file.cpp.o:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/io/file.cpp.o
.PHONY : src/io/file.cpp.o
src/io/file.i: src/io/file.cpp.i
.PHONY : src/io/file.i
# target to preprocess a source file
src/io/file.cpp.i:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/io/file.cpp.i
.PHONY : src/io/file.cpp.i
src/io/file.s: src/io/file.cpp.s
.PHONY : src/io/file.s
# target to generate assembly for a file
src/io/file.cpp.s:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/io/file.cpp.s
.PHONY : src/io/file.cpp.s
src/resources/Buffer.o: src/resources/Buffer.cpp.o
.PHONY : src/resources/Buffer.o
# target to build an object file
src/resources/Buffer.cpp.o:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/Buffer.cpp.o
.PHONY : src/resources/Buffer.cpp.o
src/resources/Buffer.i: src/resources/Buffer.cpp.i
.PHONY : src/resources/Buffer.i
# target to preprocess a source file
src/resources/Buffer.cpp.i:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/Buffer.cpp.i
.PHONY : src/resources/Buffer.cpp.i
src/resources/Buffer.s: src/resources/Buffer.cpp.s
.PHONY : src/resources/Buffer.s
# target to generate assembly for a file
src/resources/Buffer.cpp.s:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/Buffer.cpp.s
.PHONY : src/resources/Buffer.cpp.s
src/resources/BufferBusWriter.o: src/resources/BufferBusWriter.cpp.o
.PHONY : src/resources/BufferBusWriter.o
# target to build an object file
src/resources/BufferBusWriter.cpp.o:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/BufferBusWriter.cpp.o
.PHONY : src/resources/BufferBusWriter.cpp.o
src/resources/BufferBusWriter.i: src/resources/BufferBusWriter.cpp.i
.PHONY : src/resources/BufferBusWriter.i
# target to preprocess a source file
src/resources/BufferBusWriter.cpp.i:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/BufferBusWriter.cpp.i
.PHONY : src/resources/BufferBusWriter.cpp.i
src/resources/BufferBusWriter.s: src/resources/BufferBusWriter.cpp.s
.PHONY : src/resources/BufferBusWriter.s
# target to generate assembly for a file
src/resources/BufferBusWriter.cpp.s:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/BufferBusWriter.cpp.s
.PHONY : src/resources/BufferBusWriter.cpp.s
src/resources/DefaultAllocator.o: src/resources/DefaultAllocator.cpp.o
.PHONY : src/resources/DefaultAllocator.o
# target to build an object file
src/resources/DefaultAllocator.cpp.o:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/DefaultAllocator.cpp.o
.PHONY : src/resources/DefaultAllocator.cpp.o
src/resources/DefaultAllocator.i: src/resources/DefaultAllocator.cpp.i
.PHONY : src/resources/DefaultAllocator.i
# target to preprocess a source file
src/resources/DefaultAllocator.cpp.i:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/DefaultAllocator.cpp.i
.PHONY : src/resources/DefaultAllocator.cpp.i
src/resources/DefaultAllocator.s: src/resources/DefaultAllocator.cpp.s
.PHONY : src/resources/DefaultAllocator.s
# target to generate assembly for a file
src/resources/DefaultAllocator.cpp.s:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/DefaultAllocator.cpp.s
.PHONY : src/resources/DefaultAllocator.cpp.s
src/resources/Image.o: src/resources/Image.cpp.o
.PHONY : src/resources/Image.o
# target to build an object file
src/resources/Image.cpp.o:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/Image.cpp.o
.PHONY : src/resources/Image.cpp.o
src/resources/Image.i: src/resources/Image.cpp.i
.PHONY : src/resources/Image.i
# target to preprocess a source file
src/resources/Image.cpp.i:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/Image.cpp.i
.PHONY : src/resources/Image.cpp.i
src/resources/Image.s: src/resources/Image.cpp.s
.PHONY : src/resources/Image.s
# target to generate assembly for a file
src/resources/Image.cpp.s:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/Image.cpp.s
.PHONY : src/resources/Image.cpp.s
src/resources/ImageBusWriter.o: src/resources/ImageBusWriter.cpp.o
.PHONY : src/resources/ImageBusWriter.o
# target to build an object file
src/resources/ImageBusWriter.cpp.o:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/ImageBusWriter.cpp.o
.PHONY : src/resources/ImageBusWriter.cpp.o
src/resources/ImageBusWriter.i: src/resources/ImageBusWriter.cpp.i
.PHONY : src/resources/ImageBusWriter.i
# target to preprocess a source file
src/resources/ImageBusWriter.cpp.i:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/ImageBusWriter.cpp.i
.PHONY : src/resources/ImageBusWriter.cpp.i
src/resources/ImageBusWriter.s: src/resources/ImageBusWriter.cpp.s
.PHONY : src/resources/ImageBusWriter.s
# target to generate assembly for a file
src/resources/ImageBusWriter.cpp.s:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/ImageBusWriter.cpp.s
.PHONY : src/resources/ImageBusWriter.cpp.s
src/resources/ImageView.o: src/resources/ImageView.cpp.o
.PHONY : src/resources/ImageView.o
# target to build an object file
src/resources/ImageView.cpp.o:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/ImageView.cpp.o
.PHONY : src/resources/ImageView.cpp.o
src/resources/ImageView.i: src/resources/ImageView.cpp.i
.PHONY : src/resources/ImageView.i
# target to preprocess a source file
src/resources/ImageView.cpp.i:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/ImageView.cpp.i
.PHONY : src/resources/ImageView.cpp.i
src/resources/ImageView.s: src/resources/ImageView.cpp.s
.PHONY : src/resources/ImageView.s
# target to generate assembly for a file
src/resources/ImageView.cpp.s:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/ImageView.cpp.s
.PHONY : src/resources/ImageView.cpp.s
src/resources/MipmapGenerator.o: src/resources/MipmapGenerator.cpp.o
.PHONY : src/resources/MipmapGenerator.o
# target to build an object file
src/resources/MipmapGenerator.cpp.o:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/MipmapGenerator.cpp.o
.PHONY : src/resources/MipmapGenerator.cpp.o
src/resources/MipmapGenerator.i: src/resources/MipmapGenerator.cpp.i
.PHONY : src/resources/MipmapGenerator.i
# target to preprocess a source file
src/resources/MipmapGenerator.cpp.i:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/MipmapGenerator.cpp.i
.PHONY : src/resources/MipmapGenerator.cpp.i
src/resources/MipmapGenerator.s: src/resources/MipmapGenerator.cpp.s
.PHONY : src/resources/MipmapGenerator.s
# target to generate assembly for a file
src/resources/MipmapGenerator.cpp.s:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/MipmapGenerator.cpp.s
.PHONY : src/resources/MipmapGenerator.cpp.s
src/shaders/GlslShaderBuilder.o: src/shaders/GlslShaderBuilder.cpp.o
.PHONY : src/shaders/GlslShaderBuilder.o
# target to build an object file
src/shaders/GlslShaderBuilder.cpp.o:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/shaders/GlslShaderBuilder.cpp.o
.PHONY : src/shaders/GlslShaderBuilder.cpp.o
src/shaders/GlslShaderBuilder.i: src/shaders/GlslShaderBuilder.cpp.i
.PHONY : src/shaders/GlslShaderBuilder.i
# target to preprocess a source file
src/shaders/GlslShaderBuilder.cpp.i:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/shaders/GlslShaderBuilder.cpp.i
.PHONY : src/shaders/GlslShaderBuilder.cpp.i
src/shaders/GlslShaderBuilder.s: src/shaders/GlslShaderBuilder.cpp.s
.PHONY : src/shaders/GlslShaderBuilder.s
# target to generate assembly for a file
src/shaders/GlslShaderBuilder.cpp.s:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/shaders/GlslShaderBuilder.cpp.s
.PHONY : src/shaders/GlslShaderBuilder.cpp.s
src/shaders/Pipeline.o: src/shaders/Pipeline.cpp.o
.PHONY : src/shaders/Pipeline.o
# target to build an object file
src/shaders/Pipeline.cpp.o:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/shaders/Pipeline.cpp.o
.PHONY : src/shaders/Pipeline.cpp.o
src/shaders/Pipeline.i: src/shaders/Pipeline.cpp.i
.PHONY : src/shaders/Pipeline.i
# target to preprocess a source file
src/shaders/Pipeline.cpp.i:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/shaders/Pipeline.cpp.i
.PHONY : src/shaders/Pipeline.cpp.i
src/shaders/Pipeline.s: src/shaders/Pipeline.cpp.s
.PHONY : src/shaders/Pipeline.s
# target to generate assembly for a file
src/shaders/Pipeline.cpp.s:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/shaders/Pipeline.cpp.s
.PHONY : src/shaders/Pipeline.cpp.s
src/shaders/PipelineBuilder.o: src/shaders/PipelineBuilder.cpp.o
.PHONY : src/shaders/PipelineBuilder.o
# target to build an object file
src/shaders/PipelineBuilder.cpp.o:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/shaders/PipelineBuilder.cpp.o
.PHONY : src/shaders/PipelineBuilder.cpp.o
src/shaders/PipelineBuilder.i: src/shaders/PipelineBuilder.cpp.i
.PHONY : src/shaders/PipelineBuilder.i
# target to preprocess a source file
src/shaders/PipelineBuilder.cpp.i:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/shaders/PipelineBuilder.cpp.i
.PHONY : src/shaders/PipelineBuilder.cpp.i
src/shaders/PipelineBuilder.s: src/shaders/PipelineBuilder.cpp.s
.PHONY : src/shaders/PipelineBuilder.s
# target to generate assembly for a file
src/shaders/PipelineBuilder.cpp.s:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/shaders/PipelineBuilder.cpp.s
.PHONY : src/shaders/PipelineBuilder.cpp.s
src/shaders/SpirvShaderBuilder.o: src/shaders/SpirvShaderBuilder.cpp.o
.PHONY : src/shaders/SpirvShaderBuilder.o
# target to build an object file
src/shaders/SpirvShaderBuilder.cpp.o:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/shaders/SpirvShaderBuilder.cpp.o
.PHONY : src/shaders/SpirvShaderBuilder.cpp.o
src/shaders/SpirvShaderBuilder.i: src/shaders/SpirvShaderBuilder.cpp.i
.PHONY : src/shaders/SpirvShaderBuilder.i
# target to preprocess a source file
src/shaders/SpirvShaderBuilder.cpp.i:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/shaders/SpirvShaderBuilder.cpp.i
.PHONY : src/shaders/SpirvShaderBuilder.cpp.i
src/shaders/SpirvShaderBuilder.s: src/shaders/SpirvShaderBuilder.cpp.s
.PHONY : src/shaders/SpirvShaderBuilder.s
# target to generate assembly for a file
src/shaders/SpirvShaderBuilder.cpp.s:
cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/shaders/SpirvShaderBuilder.cpp.s
.PHONY : src/shaders/SpirvShaderBuilder.cpp.s
# Help Target
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... edit_cache"
@echo "... rebuild_cache"
@echo "... loft_base"
@echo "... src/FramebufferBuilder.o"
@echo "... src/FramebufferBuilder.i"
@echo "... src/FramebufferBuilder.s"
@echo "... src/Gpu.o"
@echo "... src/Gpu.i"
@echo "... src/Gpu.s"
@echo "... src/Instance.o"
@echo "... src/Instance.i"
@echo "... src/Instance.s"
@echo "... src/io/file.o"
@echo "... src/io/file.i"
@echo "... src/io/file.s"
@echo "... src/resources/Buffer.o"
@echo "... src/resources/Buffer.i"
@echo "... src/resources/Buffer.s"
@echo "... src/resources/BufferBusWriter.o"
@echo "... src/resources/BufferBusWriter.i"
@echo "... src/resources/BufferBusWriter.s"
@echo "... src/resources/DefaultAllocator.o"
@echo "... src/resources/DefaultAllocator.i"
@echo "... src/resources/DefaultAllocator.s"
@echo "... src/resources/Image.o"
@echo "... src/resources/Image.i"
@echo "... src/resources/Image.s"
@echo "... src/resources/ImageBusWriter.o"
@echo "... src/resources/ImageBusWriter.i"
@echo "... src/resources/ImageBusWriter.s"
@echo "... src/resources/ImageView.o"
@echo "... src/resources/ImageView.i"
@echo "... src/resources/ImageView.s"
@echo "... src/resources/MipmapGenerator.o"
@echo "... src/resources/MipmapGenerator.i"
@echo "... src/resources/MipmapGenerator.s"
@echo "... src/shaders/GlslShaderBuilder.o"
@echo "... src/shaders/GlslShaderBuilder.i"
@echo "... src/shaders/GlslShaderBuilder.s"
@echo "... src/shaders/Pipeline.o"
@echo "... src/shaders/Pipeline.i"
@echo "... src/shaders/Pipeline.s"
@echo "... src/shaders/PipelineBuilder.o"
@echo "... src/shaders/PipelineBuilder.i"
@echo "... src/shaders/PipelineBuilder.s"
@echo "... src/shaders/SpirvShaderBuilder.o"
@echo "... src/shaders/SpirvShaderBuilder.i"
@echo "... src/shaders/SpirvShaderBuilder.s"
.PHONY : help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
cd /home/martin/projects/mmo && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system
@@ -9,7 +9,6 @@ set(LIBS
loft_base
loft_common
loft_window
${SDL2_LIBRARIES}
volk)
set(FILES
+3 -2
View File
@@ -4,7 +4,7 @@ file(GLOB FILES src/*.c src/*.cpp)
add_library(${PROJECT_NAME} ${FILES})
find_package(SDL2 REQUIRED)
find_package(SDL3 REQUIRED)
set_target_properties(${PROJECT_NAME} PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${PROJECT_SOURCE_DIR}/include/"
@@ -13,7 +13,8 @@ set_target_properties(${PROJECT_NAME} PROPERTIES
target_link_libraries(${PROJECT_NAME}
PUBLIC
loft_base
${SDL2_LIBRARIES}
sdl::sdl
${LIBDECOR_LIB}
)
target_include_directories(${PROJECT_NAME}
+1 -1
View File
@@ -6,7 +6,7 @@
#define LOFT_SDLWINDOW_H
#include "Window.hpp"
#include <SDL2/SDL.h>
#include <SDL3/SDL.h>
#include <utility>
#include <volk.h>
#include <string>
+1 -1
View File
@@ -1,7 +1,7 @@
#pragma once
#include <volk.h>
#include <SDL2/SDL_events.h>
#include <SDL3/SDL_events.h>
#include <vector>
#include <string>
+23 -19
View File
@@ -1,10 +1,12 @@
#include <SDL2/SDL_error.h>
#include <SDL_video.h>
#include "SDLWindow.h"
#include <SDL3/SDL_error.h>
#include <SDL3/SDL_video.h>
#include <volk.h>
#include <stdexcept>
#include "SDLWindow.h"
#include "LoftException.hpp"
#include <SDL2/SDL_vulkan.h>
#include <SDL3/SDL_vulkan.h>
#include <vector>
#include <vulkan/vulkan_core.h>
@@ -27,16 +29,16 @@ VkExtent2D SDLWindow::get_size() const {
SDLWindow::SDLWindow(std::string name, VkRect2D rect) :
m_extent{rect.extent}
{
if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVERYTHING) < 0) {
if(!SDL_Init(SDL_INIT_VIDEO)) {
throw std::runtime_error("Failed to initialize sdl");
}
m_pWindow = SDL_CreateWindow(name.c_str(),
SDL_WINDOWPOS_CENTERED,
SDL_WINDOWPOS_CENTERED,
// SDL_WINDOWPOS_CENTERED,
// SDL_WINDOWPOS_CENTERED,
rect.extent.width,
rect.extent.height,
SDL_WINDOW_VULKAN | SDL_WINDOW_ALLOW_HIGHDPI |
SDL_WINDOW_VULKAN | SDL_WINDOW_HIGH_PIXEL_DENSITY |
SDL_WINDOW_RESIZABLE);
if(m_pWindow == nullptr) {
@@ -46,7 +48,7 @@ m_extent{rect.extent}
Surface SDLWindow::create_surface(const Instance* instance) const {
VkSurfaceKHR surface = VK_NULL_HANDLE;
SDL_Vulkan_CreateSurface(m_pWindow, instance->instance(), &surface);
SDL_Vulkan_CreateSurface(m_pWindow, instance->instance(), NULL, &surface);
return Surface(instance, surface);
}
@@ -60,19 +62,21 @@ int32_t SDLWindow::poll_event(SDL_Event *pOutEvent) const {
std::vector<std::string> SDLWindow::get_required_extensions() const {
uint32_t count = 0;
SDL_Vulkan_GetInstanceExtensions(m_pWindow, &count, nullptr);
const char* const *instance_extensions = SDL_Vulkan_GetInstanceExtensions(&count);
std::vector<const char*> extensions(count);
SDL_Vulkan_GetInstanceExtensions(m_pWindow, &count, extensions.data());
std::vector<std::string> extensions(count);
for(int i = 0; i < count; i++) {
extensions[i] = std::string(instance_extensions[i]);
}
std::vector<std::string> extension_strings(count);
std::transform(extensions.begin(), extensions.end(),
extension_strings.begin(),
[](const char* str) {
return std::string(str);
});
// std::vector<std::string> extension_strings(count);
// std::transform(extensions.begin(), extensions.end(),
// extension_strings.begin(),
// [](const char* str) {
// return std::string(str);
// });
return extension_strings;
return extensions;
}
}
@@ -53,7 +53,7 @@ int main(int argc, char* argv[]) {
}
if (!channel_set) {
std::println(stderr, "Usage: {} [--host <ip>] [--port <port>] --channel <id>", argv[0]);
// std::println(stderr, "Usage: {} [--host <ip>] [--port <port>] --channel <id>", argv[0]);
return 1;
}
@@ -87,7 +87,7 @@ int main(int argc, char* argv[]) {
messages.set_handler<mmo::chat::ChatMessageBroadcastRequest>(
[](tw::msg::PeerId, const mmo::chat::ChatMessageBroadcastRequest& bcast) {
std::println("[ch:{}] <{}> {}", bcast.channel_id(), bcast.sender_id(), bcast.message());
// std::println("[ch:{}] <{}> {}", bcast.channel_id(), bcast.sender_id(), bcast.message());
});
mmo::chat::JoinChannelRequest join;
@@ -98,10 +98,10 @@ int main(int argc, char* argv[]) {
[channel_id](std::span<const std::byte> data) {
mmo::chat::JoinChannelResponse resp;
resp.ParseFromArray(data.data(), static_cast<int>(data.size()));
std::println("Joined channel {} successfully.", channel_id);
// std::println("Joined channel {} successfully.", channel_id);
});
std::println("Joined channel {}. Type a message and press Enter. Ctrl+C to quit.", channel_id);
// std::println("Joined channel {}. Type a message and press Enter. Ctrl+C to quit.", channel_id);
while (!g_quit.load()) {
fd_set fds;
@@ -121,7 +121,7 @@ int main(int argc, char* argv[]) {
[channel_id](std::span<const std::byte> data) {
mmo::chat::SendChatMessageResponse resp;
resp.ParseFromArray(data.data(), static_cast<int>(data.size()));
std::println("Message sent to channel {}.", channel_id);
// std::println("Message sent to channel {}.", channel_id);
});
}
}
+1
View File
@@ -27,6 +27,7 @@ target_link_libraries(${PROJECT_NAME}
tw::quicr
loft::common
loft::base
${LIBDECOR_LIB}
loft_window
loft::render_graph
tw::protocol
@@ -49,7 +49,9 @@ Instance create_instance(const std::string& name, const lft::win::Window* window
// required_extensions.push_back(VK_EXT_ROBUSTNESS_2_EXTENSION_NAME);
std::vector<std::string> required_layers = {
#if DEBUG
"VK_LAYER_KHRONOS_validation"
#endif
};
/**
@@ -1,8 +1,8 @@
#pragma once
#include <SDL_keycode.h>
#include <SDL_mouse.h>
#include <imgui_impl_sdl2.h>
#include <SDL3/SDL_events.h>
#include <SDL3/SDL_keycode.h>
#include <imgui_impl_sdl3.h>
#include <Window.hpp>
@@ -69,30 +69,30 @@ public:
m_motion_y = 0.0f;
while(m_window->poll_event(&event)) {
ImGui_ImplSDL2_ProcessEvent(&event);
ImGui_ImplSDL3_ProcessEvent(&event);
switch(event.type) {
case SDL_QUIT:
case SDL_EVENT_QUIT:
m_is_quit = true;
break;
case SDL_KEYDOWN:
case SDL_KEYUP: {
switch(event.key.keysym.sym) {
case SDLK_w:
m_is_pressed[0] = event.key.state;
case SDL_EVENT_KEY_DOWN:
case SDL_EVENT_KEY_UP: {
switch(event.key.key) {
case SDLK_W:
m_is_pressed[0] = event.key.down;
break;
case SDLK_s:
m_is_pressed[1] = event.key.state;
case SDLK_S:
m_is_pressed[1] = event.key.down;
break;
case SDLK_a:
m_is_pressed[2] = event.key.state;
case SDLK_A:
m_is_pressed[2] = event.key.down;
break;
case SDLK_d:
m_is_pressed[3] = event.key.state;
case SDLK_D:
m_is_pressed[3] = event.key.down;
break;
}
} break;
case SDL_MOUSEMOTION:
case SDL_EVENT_MOUSE_MOTION:
m_motion_x = event.motion.xrel;
m_motion_y = event.motion.yrel;
break;
+2 -3
View File
@@ -10,7 +10,7 @@
#include "imgui.h"
#include "imgui_impl_vulkan.h"
#include "imgui_impl_sdl2.h"
#include "imgui_impl_sdl3.h"
#include "implot.h"
#include "implot_internal.h"
@@ -18,7 +18,6 @@
#include "spdlog/spdlog.h"
#include <SDL_events.h>
#include <glm/glm.hpp>
#include <tracy/Tracy.hpp>
#include <memory>
@@ -105,7 +104,7 @@ void Runtime::run() {
}
ImGui_ImplVulkan_NewFrame();
ImGui_ImplSDL2_NewFrame();
ImGui_ImplSDL3_NewFrame();
ImGui::NewFrame();
m_input_manager.update();
+2 -2
View File
@@ -6,7 +6,7 @@
#include "imgui.h"
#include "backends/imgui_impl_vulkan.h"
#include "backends/imgui_impl_sdl2.h"
#include "backends/imgui_impl_sdl3.h"
namespace tw::drw::gui {
@@ -73,7 +73,7 @@ lft::rg::RenderTaskBuilder ImGuiRenderPass::create_render_task() {
const std::string font_path = "/home/martin/projects/mmo/external/imgui/misc/fonts/ProggyClean.ttf";
io.Fonts->AddFontFromFileTTF(font_path.c_str(), 13.0f);
auto init_info = create_imgui_init_info(info.gpu(), info.renderpass());
ImGui_ImplSDL2_InitForVulkan(context->m_window->get_handle());
ImGui_ImplSDL3_InitForVulkan(context->m_window->get_handle());
ImGui_ImplVulkan_Init(&init_info);
context->is_initialized = true;
+1 -1
View File
@@ -2,7 +2,7 @@
#include <cstring>
#include <functional>
#include <fmt/format.h>
#include <spdlog/fmt/fmt.h>
namespace tw::net {
+71 -71
View File
@@ -1,71 +1,71 @@
#include <barrier>
#include <catch2/catch_test_macros.hpp>
#include <span>
#include <iostream>
#include "UdpStream.hpp"
#include "Address.hpp"
#include "quicr/QuicrConnection.hpp"
#include "quicr/QuicrConnectionListener.hpp"
#include "quicr/QuicrEndpoint.hpp"
TEST_CASE("Start two sockets and send message", "[udp]") {
std::barrier create_sync_point(2);
std::barrier send_sync_point(2);
const std::string message = "Hello, server!";
std::thread server_thread([&]() {
auto r = tw::net::UdpStream::bind(tw::net::Address {"127.0.0.1", 6969});
if(!r.has_value()) {
std::cout << ("Failed to bind UDP stream: {}") << r.error().message() << std::endl;
}
auto flag_result = r->set_non_blocking();
auto server = std::move(r.value());
create_sync_point.arrive_and_wait();
send_sync_point.arrive_and_wait();
std::this_thread::sleep_for(std::chrono::milliseconds(100));
std::vector<std::byte> buffer(1024);
tw::net::Address from {{}, 0};
auto read_result = server.read_into(std::span{buffer.data(), buffer.size()}, &from);
if(!read_result.has_value()) {
spdlog::error("Failed to read from UDP stream: {}", read_result.error().message());
}
// convert the buffer to a string
std::string mesg(buffer.data(), buffer.data() + read_result.value());
REQUIRE(mesg == message);
});
std::thread client_thread([&]() {
create_sync_point.arrive_and_wait();
auto connect_result = tw::net::UdpStream::to(tw::net::Address{"127.0.0.1", 6969});
if(!connect_result.has_value()) {
spdlog::error("Failed to bind UDP stream: {}", connect_result.error().mesg());
}
auto client = std::move(connect_result.value());
std::string mesg = message;
auto write_result = client.write(std::as_writable_bytes(std::span(mesg.begin(), mesg.end())));
if(!write_result.has_value() && write_result.value() == mesg.length()) {
spdlog::error("Failed to write to UDP stream: {}", write_result.error().message());
}
send_sync_point.arrive_and_wait();
});
server_thread.join();
client_thread.join();
}
using namespace tw::net;
using namespace tw::net::quicr;
// #include <barrier>
// #include <catch2/catch_test_macros.hpp>
// #include <span>
// #include <iostream>
//
// #include "UdpStream.hpp"
// #include "Address.hpp"
// #include "quicr/QuicrConnection.hpp"
// #include "quicr/QuicrConnectionListener.hpp"
// #include "quicr/QuicrEndpoint.hpp"
//
// TEST_CASE("Start two sockets and send message", "[udp]") {
// std::barrier create_sync_point(2);
// std::barrier send_sync_point(2);
//
// const std::string message = "Hello, server!";
//
// std::thread server_thread([&]() {
// auto r = tw::net::UdpStream::bind(tw::net::Address {"127.0.0.1", 6969});
// if(!r.has_value()) {
// std::cout << ("Failed to bind UDP stream: {}") << r.error().message() << std::endl;
// }
//
// auto flag_result = r->set_non_blocking();
//
// auto server = std::move(r.value());
//
// create_sync_point.arrive_and_wait();
// send_sync_point.arrive_and_wait();
//
// std::this_thread::sleep_for(std::chrono::milliseconds(100));
//
// std::vector<std::byte> buffer(1024);
// tw::net::Address from {{}, 0};
// auto read_result = server.read_into(std::span{buffer.data(), buffer.size()}, &from);
//
// if(!read_result.has_value()) {
// spdlog::error("Failed to read from UDP stream: {}", read_result.error().message());
// }
//
// // convert the buffer to a string
// std::string mesg(buffer.data(), buffer.data() + read_result.value());
// REQUIRE(mesg == message);
// });
//
// std::thread client_thread([&]() {
// create_sync_point.arrive_and_wait();
//
// auto connect_result = tw::net::UdpStream::to(tw::net::Address{"127.0.0.1", 6969});
// if(!connect_result.has_value()) {
// spdlog::error("Failed to bind UDP stream: {}", connect_result.error().mesg());
// }
//
// auto client = std::move(connect_result.value());
//
// std::string mesg = message;
// auto write_result = client.write(std::as_writable_bytes(std::span(mesg.begin(), mesg.end())));
//
// if(!write_result.has_value() && write_result.value() == mesg.length()) {
// spdlog::error("Failed to write to UDP stream: {}", write_result.error().message());
// }
//
// send_sync_point.arrive_and_wait();
// });
//
// server_thread.join();
// client_thread.join();
// }
//
// using namespace tw::net;
// using namespace tw::net::quicr;
@@ -1,6 +1,5 @@
#pragma once
#include <nlohmann/json.hpp>
#include "Serialization.hpp"
#include "Serializers.hpp"
+1
View File
@@ -35,6 +35,7 @@ target_link_libraries(tw_server_lib
Jolt
protobuf::libprotobuf
${Boost_LIBRARIES}
${LIBDECOR_LIB}
Tracy::TracyClient
pqxx
pq
-58
View File
@@ -1,58 +0,0 @@
# Build the toolchain stage on its own and pass it back in to skip the apt step:
# docker build -f modules/server/Dockerfile --target toolchain -t tw_toolchain .
# docker build -f modules/server/Dockerfile --build-arg TOOLCHAIN_IMAGE=tw_toolchain .
ARG TOOLCHAIN_IMAGE=toolchain
# ── toolchain stage ──────────────────────────────────────────────────────────
FROM ubuntu:24.04 AS toolchain
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
clang \
libstdc++-14-dev \
cmake \
ninja-build \
mold \
git \
ca-certificates \
pkg-config \
glslang-tools \
libvulkan-dev \
libsdl2-dev \
libprotobuf-dev protobuf-compiler \
libpq-dev \
libpqxx-dev \
&& rm -rf /var/lib/apt/lists/*
ENV CC=clang
ENV CXX=clang++
# ── build stage ──────────────────────────────────────────────────────────────
FROM ${TOOLCHAIN_IMAGE} AS builder
WORKDIR /src
COPY . .
# glm, entt, Jolt, spdlog, expected, Catch2 and tracy are cloned at configure time
RUN cmake -B /build -G Ninja -DCMAKE_BUILD_TYPE=Release \
&& cmake --build /build --target tw_server
# Stage the shared libraries the binary was linked against; the runtime image has
# no package manager. glibc and its loader stay behind, they come with that image.
RUN mkdir -p /rootfs/usr/lib/x86_64-linux-gnu \
&& ldd /build/modules/server/tw_server \
| awk '/=> \//{ print $3 }' \
| grep -vE '/(libc|libm|libdl|libpthread|librt|libresolv|libanl)\.so' \
| xargs -I{} cp -L {} /rootfs/usr/lib/x86_64-linux-gnu/
# ── runtime stage ─────────────────────────────────────────────────────────────
FROM gcr.io/distroless/cc-debian13:nonroot
COPY --from=builder /rootfs/ /
COPY --from=builder /build/modules/server/tw_server /usr/local/bin/tw_server
# player connections, zone-server peering
EXPOSE 8101/udp 8102/udp
ENTRYPOINT ["/usr/local/bin/tw_server"]