diff --git a/.gitignore b/.gitignore index 27c3218..f152462 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ *~ /doc +/target + diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..7285f47 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,10 @@ +[package] + +name = "xlib" +version = "0.1.0" +authors = ["The Servo Project Developers"] + +[[lib]] + +name = "xlib" +crate-type = ["rlib"] diff --git a/Makefile.in b/Makefile.in index 6e1c393..486501d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -6,16 +6,16 @@ RUSTDOC ?= rustdoc RUSTDOC_FLAGS ?= RUSTDOC_TARGET ?= doc -RUST_SRC=$(shell find $(VPATH)/. -type f -name '*.rs') +RUST_SRC=$(shell find $(VPATH)/src -type f -name '*.rs') .PHONY: all all: libxlib.dummy -libxlib.dummy: lib.rs $(RUST_SRC) +libxlib.dummy: src/lib.rs $(RUST_SRC) $(RUSTC) $(RUSTFLAGS) $< --crate-type=lib --out-dir . touch $@ -xlib-test: lib.rs $(RUST_SRC) +xlib-test: src/lib.rs $(RUST_SRC) $(RUSTC) $(RUSTFLAGS) $< -o $@ --test .PHONY: check @@ -25,7 +25,7 @@ check: xlib-test .PHONY: doc doc: $(RUSTDOC_TARGET)/xlib/index.html -$(RUSTDOC_TARGET)/xlib/index.html: lib.rs $(RUST_SRC) +$(RUSTDOC_TARGET)/xlib/index.html: src/lib.rs $(RUST_SRC) $(RUSTDOC) $(RUSTDOC_FLAGS) $< -o $(RUSTDOC_TARGET) .PHONY: clean diff --git a/lib.rs b/src/lib.rs similarity index 100% rename from lib.rs rename to src/lib.rs diff --git a/xlib.rs b/src/xlib.rs similarity index 100% rename from xlib.rs rename to src/xlib.rs