diff options
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | Makefile.in (renamed from Makefile) | 4 | ||||
| -rwxr-xr-x | configure | 18 |
3 files changed, 23 insertions, 1 deletions
@@ -1,3 +1,3 @@ -/.rust/ /doc/ /build/ +/Makefile @@ -1,6 +1,7 @@ RUSTC = rustc BUILDDIR = build RUSTFLAGS = -O -Z debug-info +INSTALL_DIR = %PREFIX% OPENSSL_LIB = lib.rs OPENSSL = $(BUILDDIR)/$(shell $(RUSTC) --crate-file-name $(OPENSSL_LIB)) @@ -30,6 +31,9 @@ clean: doc: $(OPENSSL) rustdoc $(OPENSSL_LIB) +install: $(OPENSSL) + install $(OPENSSL) $(INSTALL_DIR) + print-target: @echo $(OPENSSL) diff --git a/configure b/configure new file mode 100755 index 00000000..55cf6a0b --- /dev/null +++ b/configure @@ -0,0 +1,18 @@ +#!/bin/bash + +TEMP=`getopt -o "" --long prefix: -n "$0" -- "$@"` + +if [ $? != 0 ]; then exit 1; fi + +eval set -- "$TEMP" + +PREFIX=/usr/lib + +while true ; do + case "$1" in + --prefix) PREFIX=$2; shift 2;; + --) shift; break;; + esac +done + +sed -e "s|%PREFIX%|$PREFIX|" < Makefile.in > Makefile |