diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 36 |
1 files changed, 36 insertions, 0 deletions
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) |