]> git.armaanb.net Git - bin.git/commitdiff
meta: add GNUmakefile
authorArmaan Bhojwani <me@armaanb.net>
Sat, 29 May 2021 22:52:04 +0000 (18:52 -0400)
committerArmaan Bhojwani <me@armaanb.net>
Sun, 30 May 2021 04:43:47 +0000 (00:43 -0400)
.gitignore
GNUmakefile [new file with mode: 0644]

index b307a43cf90546cb3009e0d071654be41a09900f..dd6e19afed3d05e3055cbdf5f66713c36efcf765 100644 (file)
@@ -1,3 +1,2 @@
-*cache*
 bin
 a.out
diff --git a/GNUmakefile b/GNUmakefile
new file mode 100644 (file)
index 0000000..78858e6
--- /dev/null
@@ -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