aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2018-08-27 22:15:16 +0200
committerTeddy Wing2018-08-27 22:15:16 +0200
commitd610aab64b2505b2ee7cd37be5b3d1b8097c3a64 (patch)
treee4ac5bd9103068ccdb7ba72ba034269d53177b6e
parent97a19adb5a2e53a86ba5505795f505117d2fa7b6 (diff)
downloaddome-key-map-d610aab64b2505b2ee7cd37be5b3d1b8097c3a64.tar.bz2
Makefile: Add target for library
A new Make target to build the Rust library. This facilitates handling of other targets that depend on the library.
-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: