summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2022-12-23 23:13:54 +0100
committerThomas Voss <mail@thomasvoss.com> 2022-12-23 23:13:54 +0100
commit031bb1d6418236d6b7d581aba48ad8c3864af5c9 (patch)
treeda08ebab3aa65e18a0ea0655e8905497ab5ebe13
parent9ff166501ed5c7027da8ef6e238fac4fb524b2fc (diff)
Make the Makefile more extendable
-rw-r--r--examples/Makefile16
1 files changed, 14 insertions, 2 deletions
diff --git a/examples/Makefile b/examples/Makefile
index 451863a..25d3fa5 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -1,2 +1,14 @@
-all:
- cc -Og -g -ggdb -I../src gehashmap.c -o gehashmap
+.POSIX:
+
+CC = cc
+CFLAGS = -Og -g -ggdb
+LDFLAGS = -I../src
+
+srcs = gehashmap
+
+all: ${srcs}
+
+gehashmap: gehashmap.c
+
+clean:
+ rm -f ${srcs}