From e8932313cd2dc53550be9d64ca7590497b122663 Mon Sep 17 00:00:00 2001 From: yc Date: Wed, 24 Apr 2024 08:19:37 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Add=20Makef?= =?UTF-8?q?ile.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yc --- Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Makefile 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 {} \;