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 c3f0e6bb39
Add first source file
Signed-off-by: Matej Focko <me@mfocko.xyz>
2021-01-14 20:56:59 +01:00

16 lines
285 B
Makefile

CC = clang
TIDY = clang-tidy
CFLAGS = -std=c11 -Wall -Wextra
LDLIBS = -lm
build:
$(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