From 5a5fa464b4909549c5181ccb0642149f1b3e10c9 Mon Sep 17 00:00:00 2001 From: Jack Moffitt Date: Thu, 26 Dec 2013 19:49:58 -0700 Subject: [PATCH] Build with make instead of rustpkg. --- Makefile.in | 24 ++++++++++++++++++++++++ configure | 4 ++++ lib.rs | 6 ++++-- 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 Makefile.in create mode 100755 configure diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..c0ea080 --- /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: libcore_text.dummy + +libcore_text.dummy: lib.rs $(RUST_SRC) + $(RUSTC) $(RUSTFLAGS) $< --lib --out-dir . + touch $@ + +core_text-test: lib.rs $(RUST_SRC) + $(RUSTC) $(RUSTFLAGS) $< -o $@ --test + +.PHONY: check +check: core_text-test + ./core_text-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 ea41ab4..5b6da39 100644 --- a/lib.rs +++ b/lib.rs @@ -7,10 +7,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#[link(name = "core_text", vers = "0.1")]; + extern mod std; -extern mod core_foundation = "rust-core-foundation"; -extern mod core_graphics = "rust-core-graphics"; +extern mod core_foundation; +extern mod core_graphics; pub mod font; pub mod font_collection;