Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build with make instead of rustpkg. #8

Merged
merged 1 commit into from Dec 27, 2013
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Build with make instead of rustpkg.

  • Loading branch information
metajack committed Dec 27, 2013
commit e24c27537157619681e463c6f0a5fabd386223b3
@@ -0,0 +1,24 @@
VPATH=%VPATH%

RUSTC ?= rustc
RUSTFLAGS ?=

RUST_SRC=$(shell find $(VPATH)/. -type f -name '*.rs')

.PHONY: all
all: libxlib.dummy

libxlib.dummy: lib.rs $(RUST_SRC)
$(RUSTC) $(RUSTFLAGS) $< --lib --out-dir .
touch $@

xlib-test: lib.rs $(RUST_SRC)
$(RUSTC) $(RUSTFLAGS) $< -o $@ --test

.PHONY: check
check: xlib-test
./xlib-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
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.