From 924e5799328080d69074c971d7827889c869f884 Mon Sep 17 00:00:00 2001 From: Jack Moffitt Date: Thu, 26 Dec 2013 20:00:56 -0700 Subject: [PATCH] Build with make instead of rustpkg. --- Makefile.in | 24 ++++++++++++++++++++++++ configure | 4 ++++ lib.rs | 12 +++++++----- 3 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 Makefile.in create mode 100755 configure diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..ad2f528 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,24 @@ +VPATH=%VPATH% + +RUSTC ?= rustc +RUSTFLAGS ?= + +RUST_SRC=$(shell find $(VPATH)/. -type f -name '*.rs') + +.PHONY: all +all: librust-layers.dummy + +librust-layers.dummy: lib.rs $(RUST_SRC) + $(RUSTC) $(RUSTFLAGS) $< --lib --out-dir . + touch $@ + +rust-layers-test: lib.rs $(RUST_SRC) + $(RUSTC) $(RUSTFLAGS) $< -o $@ --test + +.PHONY: check +check: rust-layers-test + ./rust-layers-test $(TEST) + +.PHONY: clean +clean: + rm -f *.o *.a *.so *.dylib *.dll *.dummy *-test diff --git a/configure b/configure new file mode 100755 index 0000000..62a0f4c --- /dev/null +++ b/configure @@ -0,0 +1,4 @@ +#!/bin/bash + +SRCDIR="$(cd $(dirname $0) && pwd)" +sed "s#%VPATH%#${SRCDIR}#" ${SRCDIR}/Makefile.in > Makefile diff --git a/lib.rs b/lib.rs index e450d4d..01b45f3 100755 --- a/lib.rs +++ b/lib.rs @@ -7,20 +7,22 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#[link(name = "layers", vers = "0.1")]; + #[feature(managed_boxes)]; extern mod extra; -extern mod geom = "rust-geom"; -extern mod opengles = "rust-opengles"; +extern mod geom; +extern mod opengles; extern mod std; #[cfg(target_os="macos")] -extern mod core_foundation = "rust-core-foundation"; +extern mod core_foundation; #[cfg(target_os="macos")] -extern mod io_surface = "rust-io-surface"; +extern mod io_surface; #[cfg(target_os="linux")] -extern mod xlib = "rust-xlib"; +extern mod xlib; pub mod layers; pub mod color;