diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..a2ffcc346 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM nvidia/vulkan:1.1.121 + +RUN apt update -y +RUN apt install g++ -y + +RUN mkdir /workspace +WORKDIR /workspace + +COPY . /workspace + +RUN make build_linux + diff --git a/Makefile b/Makefile index 8af4f4753..c813bfcbb 100644 --- a/Makefile +++ b/Makefile @@ -23,9 +23,24 @@ build: build_shaders -lvulkan-1 \ -o ./bin/main.exe +build_linux: + g++ \ + -Wall \ + src/* \ + -std=c++11 \ + -I"./src" \ + -lvulkan \ + -o ./bin/main + build_shaders: $(SCMP) -V shaders/glsl/computeheadless.comp -o shaders/glsl/computeheadless.comp.spv +build_docker: + docker build . -t axsauze/vulkan-sum:0.1 + +push_docker: + docker push axsauze/vulkan-sum:0.1 + format: $(CF) -i -style="{BasedOnStyle: mozilla, IndentWidth: 4}" src/*.cpp src/*.h src/*.hpp @@ -33,5 +48,5 @@ clean: rm ./bin/main.exe; run: - cd bin && ./main.exe; + ./bin/main.exe; diff --git a/src/VulkanTools.cpp b/src/VulkanTools.cpp index 963084153..c252e4f93 100644 --- a/src/VulkanTools.cpp +++ b/src/VulkanTools.cpp @@ -15,7 +15,7 @@ getAssetPath() #if defined(VK_EXAMPLE_DATA_DIR) return VK_EXAMPLE_DATA_DIR; #else - return "./../"; + return "./"; #endif }