From: Armaan Bhojwani Date: Sat, 29 May 2021 22:52:04 +0000 (-0400) Subject: meta: add GNUmakefile X-Git-Url: https://git.armaanb.net/?p=bin.git;a=commitdiff_plain;h=b6c4a54189dffb4e1716b95602b616b6c99a2f32 meta: add GNUmakefile --- diff --git a/.gitignore b/.gitignore index b307a43..dd6e19a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ -*cache* bin a.out diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 0000000..78858e6 --- /dev/null +++ b/GNUmakefile @@ -0,0 +1,15 @@ +SRCS = $(wildcard *.c) +OUTS = $(patsubst %.c,%,$(SRCS)) + +all: setup $(OUTS) + +%: %.c + $(CC) $(CFLAGS) -o bin/$@ $< + +setup: + mkdir -p bin + +clean: + rm -rf bin + +.PHONY: clean