forked from servo/rust-xlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.in
More file actions
33 lines (24 loc) · 667 Bytes
/
Makefile.in
File metadata and controls
33 lines (24 loc) · 667 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
VPATH=%VPATH%
RUSTC ?= rustc
RUSTFLAGS ?=
RUSTDOC ?= rustdoc
RUSTDOC_FLAGS ?=
RUSTDOC_TARGET ?= doc
RUST_SRC=$(shell find $(VPATH)/src -type f -name '*.rs')
.PHONY: all
all: libxlib.dummy
libxlib.dummy: src/lib.rs $(RUST_SRC)
$(RUSTC) $(RUSTFLAGS) $< --crate-type=lib --out-dir .
touch $@
xlib-test: src/lib.rs $(RUST_SRC)
$(RUSTC) $(RUSTFLAGS) $< -o $@ --test
.PHONY: check
check: xlib-test
./xlib-test $(TEST)
.PHONY: doc
doc: $(RUSTDOC_TARGET)/xlib/index.html
$(RUSTDOC_TARGET)/xlib/index.html: src/lib.rs $(RUST_SRC)
$(RUSTDOC) $(RUSTDOC_FLAGS) $< -o $(RUSTDOC_TARGET)
.PHONY: clean
clean:
rm -f *.o *.a *.so *.dylib *.rlib *.dll *.dummy *-test