Skip to content
Repos

DevPlaceApp

Makefile 1.1 KB47 lines Opens in site

Directory Raw Download

# retoor <retoor@molodetz.nl>
# One door per project: every target drives CMake. Spec: SPEC.md section 6.4, OPS-01.
BUILD ?= build
JOBS  ?= $(shell nproc 2>/dev/null || echo 4)
CMAKE_FLAGS ?=

.PHONY: all install dev prod run test test-fast lint smoke check-net validate install-hooks clean

all: dev

install:
	@command -v cmake >/dev/null || { echo "cmake missing"; exit 1; }
	@pkg-config --exists sdl3 sdl3-ttf || { echo "SDL3 and SDL3_ttf development packages are required"; exit 1; }
	@echo "aiohttpcpp: expected in ~/.local (make install PREFIX=\$$HOME/.local in ../aiohttpcpp) or at ../aiohttpcpp"

dev:
	cmake -S . -B $(BUILD) -DCMAKE_BUILD_TYPE=Debug $(CMAKE_FLAGS)
	cmake --build $(BUILD) -j$(JOBS)

prod:
	cmake -S . -B build-release -DCMAKE_BUILD_TYPE=Release -DDEVPLACE_WERROR=ON $(CMAKE_FLAGS)
	cmake --build build-release -j$(JOBS)

run: dev
	./$(BUILD)/devplaceapp

test: dev
	./$(BUILD)/app_tests

test-fast: test

lint: check-net validate

smoke: dev
	tools/smoke.sh ./$(BUILD)/devplaceapp

check-net:
	tools/check-net.sh

validate:
	python3 tools/validate.py

install-hooks:
	tools/install-hooks.sh

clean:
	rm -rf build build-release
16.8ms