forked from servo/rust-alert
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
41 lines (30 loc) · 770 Bytes
/
Makefile.in
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
34
35
36
37
38
39
40
VPATH=%VPATH%
CC ?= gcc
CXX ?= g++
CXXFLAGS ?=
AR ?= ar
RUSTC ?= rustc
RUSTFLAGS ?=
EXT_DEPS ?=
RUSTDOC ?= rustdoc
RUSTDOC_FLAGS ?=
RUSTDOC_TARGET ?= doc
RUST_SRC=$(shell find $(VPATH)/src -type f -name '*.rs')
.PHONY: all
all: librustalert.dummy
%.o: %.c
$(CC) $< -o $@ -c $(CFLAGS)
librustalert.dummy: src/lib.rs $(RUST_SRC) $(EXT_DEPS)
$(RUSTC) $(RUSTFLAGS) $< --out-dir .
touch $@
alert-test: src/lib.rs $(RUST_SRC) $(EXT_DEPS)
$(RUSTC) $(RUSTFLAGS) $< -o $@ --test
check: alert-test
./alert-test
.PHONY: doc
doc: $(RUSTDOC_TARGET)/alert/index.html
$(RUSTDOC_TARGET)/alert/index.html: src/lib.rs $(RUST_SRC) $(EXT_DEPS)
$(RUSTDOC) $(RUSTDOC_FLAGS) $< -o $(RUSTDOC_TARGET)
.PHONY: clean
clean:
rm -f *.o *.a *.so *.dylib *.rlib *.dll *.dummy *-test