From 118549451b238ab149bc70790e2832d0560878dd Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sun, 14 Oct 2018 18:01:40 -0400 Subject: [PATCH] add tidy target to the Makefile for clang-tidy --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0ad79a4..5c98d1f 100644 --- a/Makefile +++ b/Makefile @@ -5,10 +5,12 @@ SHARED_FLAGS := -O2 -flto -fPIC -fvisibility=hidden -fno-plt -pipe -Wall -Wextra CFLAGS := -std=c11 $(SHARED_FLAGS) -Wmissing-prototypes CXXFLAGS := -std=c++14 $(SHARED_FLAGS) LDFLAGS := -Wl,-z,defs,-z,relro,-z,now,-z,nodlopen,-z,text -OBJECTS := chacha.o malloc.o memory.o pages.o random.o util.o +SOURCES := chacha.c malloc.c memory.c pages.c random.c util.c +OBJECTS := $(SOURCES:.c=.o) ifeq ($(CONFIG_CXX_ALLOCATOR),true) LDLIBS += -lstdc++ + SOURCES += new.cc OBJECTS += new.o endif @@ -23,5 +25,10 @@ pages.o: pages.c pages.h memory.h util.h random.o: random.c random.h chacha.h util.h util.o: util.c util.h +tidy: + clang-tidy $(SOURCES) -- $(CPPFLAGS) + clean: rm -f hardened_malloc.so $(OBJECTS) + +.PHONY: clean tidy