aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-06-20 17:06:17 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-06-20 17:06:17 -0700
commitd501a1ddfda31defcbad4456f00d581748a83bcb (patch)
treee988326d3bb87bbbbf948fe24973ff02a75e3165
parent11115f13a3499420cd09b745a298ef071755b24b (diff)
downloadmilf-rs-d501a1ddfda31defcbad4456f00d581748a83bcb.tar.gz
milf-rs-d501a1ddfda31defcbad4456f00d581748a83bcb.zip
Add a makefile
-rw-r--r--Makefile22
1 files changed, 22 insertions, 0 deletions
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)