# Prism — Build tasks
# See https://just.systems

default: build

CC       := "clang"
CXX      := "clang++"
VK_FLAGS := "-DVK_NO_PROTOTYPES -I$VULKAN_SDK/include -I$VULKAN_SDK/include/vma"
BUILDDIR := "build"

# Build the project (object files only — no entry point yet)
build:
	mkdir -p {{BUILDDIR}}
	{{CXX}} -g -c -Wno-nullability-completeness {{VK_FLAGS}} \
		src/prism/rhi/vulkan/profiles/vulkan_profiles.cpp \
		-o {{BUILDDIR}}/vulkan_profiles.o
	{{CXX}} -g -c -Wno-nullability-completeness {{VK_FLAGS}} \
		src/prism/rhi/vulkan/pr_rhi_vk_vma.cpp \
		-o {{BUILDDIR}}/pr_rhi_vk_vma.o
	{{CC}} -g -c {{VK_FLAGS}} $VULKAN_SDK/include/volk/volk.c -o {{BUILDDIR}}/volk.o
	{{CC}} -g -c {{VK_FLAGS}} src/prism/rhi/vulkan/pr_rhi_vk.c -o {{BUILDDIR}}/pr_rhi_vk.o
	{{CC}} -g -c src/wapp/wapp.c -o {{BUILDDIR}}/wapp.o
	@echo "--- build done (objects in {{BUILDDIR}}/) ---"

# Clean object files
clean:
	rm -rf {{BUILDDIR}}

# Run linter / typecheck
lint:
	@echo "TODO: implement linter"

# Run tests
test:
	@echo "TODO: implement tests"
