🧑💻 Add Makefile.
Signed-off-by: yc <yc@hackclub.app>
This commit is contained in:
parent
94ae90d846
commit
e8932313cd
1 changed files with 14 additions and 0 deletions
14
Makefile
Normal file
14
Makefile
Normal file
|
@ -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 {} \;
|
Loading…
Reference in a new issue