TEST += bitfield TEST += option # -- INTERNALS ----------------------------------------------------------------- BINS = $(TEST:%=build/%) DEPS = $(TEST:%=build/%.d) # -- FLAGS --------------------------------------------------------------------- DEPS_GEN = -MMD CXXFLAGS = -g -Wall -Wextra -Werror -I. -std=c++14 $(DEPS_GEN) # -- RULES --------------------------------------------------------------------- all: build $(BINS) bear: bear intercept -- $(MAKE) all bear citnames build/%: build/%.o $(CXX) -o $@ $< 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)