From d501a1ddfda31defcbad4456f00d581748a83bcb Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 20 Jun 2014 17:06:17 -0700 Subject: Add a makefile --- Makefile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..80eece3 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +RUSTC := rustc +BUILD := build +LIB := $(BUILD)/$(shell $(RUSTC) --crate-file-name src/toml.rs) +TEST := $(BUILD)/tomltest + +all: $(LIB) + +-include $(BUILD)/toml.d +-include $(BUILD)/tomltest.d + +$(LIB): src/toml.rs + @mkdir -p $(@D) + $(RUSTC) -O $< --out-dir $(@D) --dep-info + +check: $(TEST) + $(TEST) + +$(TEST): src/toml.rs + $(RUSTC) $< --test -o $@ --dep-info + +clean: + rm -rf $(BUILD) -- cgit v1.2.3