From d610aab64b2505b2ee7cd37be5b3d1b8097c3a64 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Mon, 27 Aug 2018 22:15:16 +0200 Subject: 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. --- Makefile | 11 +++++++++-- 1 file 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: -- cgit v1.2.3