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

19 lines
311 B
Makefile
Raw Permalink Normal View History

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