slige/runtime/Makefile

31 lines
495 B
Makefile
Raw Normal View History

2024-11-08 12:22:42 +01:00
CXX_FLAGS = \
-std=c++20 \
-Og \
-fsanitize=address,undefined \
-pedantic -pedantic-errors \
-Wall -Wextra -Wpedantic -Wconversion \
OUT=build/sliger
2024-11-12 09:52:55 +01:00
CXX_HEADERS = $(shell find . -name "*.hpp")
2024-11-08 12:22:42 +01:00
2024-11-12 09:52:55 +01:00
CXX_SOURCES = $(shell find . -name "*.cpp")
2024-11-08 12:22:42 +01:00
CXX_OBJECTS = $(patsubst %.cpp,build/%.o,$(CXX_SOURCES))
all: build_dir $(OUT)
$(OUT): $(CXX_OBJECTS)
g++ -o $@ $(CXX_FLAGS) $^
build_dir:
mkdir -p build/
build/%.o: %.cpp $(CXX_HEADERS)
g++ -c -o $@ $(CXX_FLAGS) $<
clean:
rm -rf build/