aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 5576df4..5f1288b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,12 @@
-includer: clean
- gcc -o $@ includer.c target/debug/libdome_key_map.a
+SOURCE_FILES = $(shell find src -type f -name '*.rs')
+
+LIB := target/debug/libdome_key_map.a
+
+$(LIB): $(SOURCE_FILES)
+ cargo build
+
+includer: clean $(LIB)
+ gcc -o $@ includer.c $(LIB)
.PHONY: clean
clean: