1
0
Fork 0
yc.hackclub.app/Makefile
yc 1ea5588e41
🔨 Remove hard-coded C compiler choice.
Signed-off-by: yc <yc@hackclub.app>
2024-04-24 08:25:31 +00:00

14 lines
329 B
Makefile

CC = cc
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 {} \;