slige/runtime/Makefile
2024-12-12 10:17:25 +01:00

33 lines
558 B
Makefile

CXX_FLAGS = \
-std=c++23 \
-Og \
-fsanitize=address,undefined \
-pedantic -pedantic-errors \
-Wall -Wextra -Wpedantic -Wconversion \
OUT=build/sliger
CXX_HEADERS = $(shell find . -name "*.hpp" -type f -printf '%P\n')
CXX_SOURCES = $(shell find . -name "*.cpp" -type f -printf '%P\n')
CXX_OBJECTS = $(patsubst %.cpp,build/%.o,$(CXX_SOURCES))
CXX = g++
all: build_dir $(OUT)
$(OUT): $(CXX_OBJECTS)
$(CXX) -o $@ $(CXX_FLAGS) $^
build_dir:
mkdir -p build/
build/%.o: %.cpp $(CXX_HEADERS)
$(CXX) -c -o $@ $(CXX_FLAGS) $<
clean:
rm -rf build/