diff options
| author | Steven Fackler <[email protected]> | 2014-01-20 20:20:10 -0800 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2014-01-20 20:20:10 -0800 |
| commit | e2554ea6af256c6ed3d7fd5a541ca2caac212181 (patch) | |
| tree | 14496f8f210ce338390e7b17429433bc71d9e574 /Makefile.in | |
| parent | Switch doc link to rust-ci (diff) | |
| download | rust-openssl-e2554ea6af256c6ed3d7fd5a541ca2caac212181.tar.xz rust-openssl-e2554ea6af256c6ed3d7fd5a541ca2caac212181.zip | |
Add a configure script and an install target
Diffstat (limited to 'Makefile.in')
| -rw-r--r-- | Makefile.in | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 00000000..fc694754 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,40 @@ +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)) +OPENSSL_TEST = $(BUILDDIR)/$(shell $(RUSTC) --test --crate-file-name $(OPENSSL_LIB)) + +all: $(OPENSSL) + +-include $(BUILDDIR)/openssl.d +-include $(BUILDDIR)/openssl_test.d + +$(BUILDDIR): + mkdir -p $@ + +$(OPENSSL): $(OPENSSL_LIB) | $(BUILDDIR) + $(RUSTC) $(RUSTFLAGS) --dep-info $(@D)/openssl.d --out-dir $(@D) $< + +check: $(OPENSSL_TEST) + $< + +$(OPENSSL_TEST): $(OPENSSL_LIB) | $(BUILDDIR) + $(RUSTC) $(RUSTFLAGS) --test --dep-info $(@D)/openssl_test.d \ + --out-dir $(@D) $< + +clean: + rm -rf $(BUILDDIR) + +doc: $(OPENSSL) + rustdoc $(OPENSSL_LIB) + +install: $(OPENSSL) + install $(OPENSSL) $(INSTALL_DIR) + +print-target: + @echo $(OPENSSL) + +.PHONY: all check clean print-target |