mirror of
https://git.sfja.dk/Mikkel/slige.git
synced 2025-01-18 22:46:30 +00:00
31 lines
495 B
Makefile
31 lines
495 B
Makefile
|
|
CXX_FLAGS = \
|
|
-std=c++20 \
|
|
-Og \
|
|
-fsanitize=address,undefined \
|
|
-pedantic -pedantic-errors \
|
|
-Wall -Wextra -Wpedantic -Wconversion \
|
|
|
|
OUT=build/sliger
|
|
|
|
CXX_HEADERS = $(shell find . -name "*.hpp")
|
|
|
|
CXX_SOURCES = $(shell find . -name "*.cpp")
|
|
|
|
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/
|
|
|