diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e7b4089 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +CC = clang +CFLAGS = -O4 -Ofast -march=native -flto -fomit-frame-pointer -finline-functions -funroll-loops -std=c2x +DIR = cgi + +SOURCES = $(wildcard $(DIR)/*.c) +TARGETS = $(patsubst $(DIR)/%.c,%,$(SOURCES)) + +all: $(TARGETS) + +%: $(DIR)/%.c + $(CC) $(CFLAGS) -o $(DIR)/$@ $< + +clean: + find $(DIR)/ -type f ! -name '*.c' -exec rm -f {} \;