Add a makefile
This commit is contained in:
parent
11115f13a3
commit
d501a1ddfd
22
Makefile
Normal file
22
Makefile
Normal file
|
@ -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)
|
Loading…
Reference in a new issue