summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..7eac15c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,18 @@
+SRCS = $(wildcard src/*.c)
+BINS = $(patsubst src/%.c,bin/%,$(SRCS))
+
+CFLAGS =
+CC = gcc $(CFLAGS)
+
+all: build
+
+build: $(BINS)
+
+.SECONDEXPANSION:
+$(BINS): $$(patsubst bin/%,src/%.c,$$@)
+ @mkdir -pv bin
+ $(CC) -o $@ $(patsubst bin/%,src/%.c,$@)
+
+clean:
+ rm -f $(BINS)
+ rmdir bin