Merge pull request #25 from metajack/unrustpkg
Build with make instead of rustpkg.
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
VPATH=%VPATH%
|
||||
|
||||
RUSTC ?= rustc
|
||||
RUSTFLAGS ?=
|
||||
|
||||
RUST_SRC=$(shell find $(VPATH)/. -type f -name '*.rs')
|
||||
|
||||
.PHONY: all
|
||||
all: libcore_foundation.dummy
|
||||
|
||||
libcore_foundation.dummy: lib.rs $(RUST_SRC)
|
||||
$(RUSTC) $(RUSTFLAGS) $< --lib --out-dir .
|
||||
touch $@
|
||||
|
||||
core_foundation-test: lib.rs $(RUST_SRC)
|
||||
$(RUSTC) $(RUSTFLAGS) $< -o $@ --test
|
||||
|
||||
.PHONY: check
|
||||
check: core_foundation-test
|
||||
./core_foundation-test $(TEST)
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f *.o *.a *.so *.dylib *.dll *.dummy *-test
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
SRCDIR="$(cd $(dirname $0) && pwd)"
|
||||
sed "s#%VPATH%#${SRCDIR}#" ${SRCDIR}/Makefile.in > Makefile
|
||||
Reference in New Issue
Block a user