flake-templates/c/Makefile
2023-08-15 10:33:31 -03:00

16 lines
No EOL
411 B
Makefile

all: main
CC = clang
override CFLAGS += -g -Wno-everything -pthread -lm
SRCS = $(shell find . -name '.ccls-cache' -type d -prune -o -type f -name '*.c' -print)
HEADERS = $(shell find . -name '.ccls-cache' -type d -prune -o -type f -name '*.h' -print)
main: $(SRCS) $(HEADERS)
$(CC) $(CFLAGS) $(SRCS) -o "$@"
main-debug: $(SRCS) $(HEADERS)
$(CC) $(CFLAGS) -O0 $(SRCS) -o "$@"
clean:
rm -f main main-debug