From c229680ada76ee98f424980cc6a41dc86b2632d0 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 30 Apr 2023 17:19:18 +0300 Subject: add linting --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 32bae41..730d805 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ DO != echo -n > deps.mk DEBUGFLAGS != [ $(RELEASE) ] && echo "-flto=auto -O2 -g -DNODEBUG" || echo "-O0 -g -DDEBUG" CFLAGS = -Wall -Wextra -fopenmp DEPFLAGS = -MT $@ -MMD -MP -MF $@.d +LINTFLAGS = -fsyntax-only INCLUDEFLAGS = -Iinclude COMPILEFLAGS = LINKFLAGS = @@ -22,12 +23,17 @@ include src/source.mk COMPILE = $(CROSS_COMPILE)$(CC) $(DEBUGFLAGS)\ $(CFLAGS) $(DEPFLAGS) $(COMPILEFLAGS) $(INCLUDEFLAGS) +LINT = $(COMPILE) $(LINTFLAGS) + OBJS != ./scripts/gen-deps --sources "$(SOURCES)" MAIN_OBJ != ./scripts/gen-deps --sources "$(MAIN_SRC)" include tests/source.mk include deps.mk +.PHONY: lint +lint: $(OBJS:.o=.o.l) + .PHONY: format format: @cd src; find . -iname '*.[ch]' |\ -- cgit v1.3