blob: b5d6cf8b4e5c2afc53ebcc42f34ec677854b6213 (
plain) (
tree)
|
|
TEST += bitfield
TEST += option
# -- INTERNALS -----------------------------------------------------------------
BINS = $(TEST:%=build/%)
DEPS = $(TEST:%=build/%.d)
# -- FLAGS ---------------------------------------------------------------------
DEPS_GEN = -MMD
SANITIZER = -fsanitize=address -fsanitize=undefined -fsanitize=leak -fno-omit-frame-pointer
CXXFLAGS = -Og -g -Wall -Wextra -Werror -I. -std=c++14 $(DEPS_GEN) $(SANITIZER)
LDFLAGS = $(SANITIZER)
all: build $(BINS)
bear:
bear intercept -- $(MAKE) all
bear citnames
build/%: build/%.o
$(CXX) -o $@ $< $(LDFLAGS)
build/%.o: test/%.cc
$(CXX) -c -o $@ $< $(CXXFLAGS)
build:
mkdir -p build
clean:
$(RM) -r build
$(RM) compile_commands.json events.json
# Since DEPS files contain rules, include at the end.
-include $(DEPS)
|