This repository has been archived on 2021-01-15. You can view files and clone it, but cannot push or open issues or pull requests.
precommit-example/Makefile
Matej Focko bf1c5cdc30 Add precommit
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-01-15 14:50:15 +01:00

18 lines
311 B
Makefile

CC = clang
TIDY = clang-tidy
CFLAGS = -std=c11 -Wall -Wextra
LDLIBS = -lm
all:
$(CC) $(CFLAGS) main.c $(LDLIBS) -o main
tidy:
$(TIDY) --header-filter='.*' --warnings-as-errors='*' --quiet *.h *.c -- $(CFLAGS)
format:
clang-format -i -style=file *.h *.c
clean:
rm -f main *.o
.PHONY: tidy format clean