From d9743696562fc85643e016d778ee994f0b9296db Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Sun, 2 Jul 2023 22:33:19 +0200 Subject: add initial state of bitfield and option --- Makefile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3f0706e --- /dev/null +++ b/Makefile @@ -0,0 +1,36 @@ +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) -- cgit v1.2.3