Skip to content

Commit 0ea80b4

Browse files
committed
Build dynamic and static libs
1 parent 481a4e1 commit 0ea80b4

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

Makefile.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export RUSTC = rustc
22
RUSTDOC = rustdoc
3-
export RUSTFLAGS = -O -Z extra-debug-info
3+
export RUSTFLAGS = -O -Z extra-debug-info --cfg ndebug
44
BUILDDIR = build
55
INSTALL_DIR = %PREFIX%
66

@@ -27,7 +27,7 @@ config.stamp: configure Makefile.in
2727
PHF_DIR = submodules/rust-phf
2828
PHF = $(foreach file,$(shell $(MAKE) -s -C $(PHF_DIR) print-targets),$(PHF_DIR)/$(file))
2929
OPENSSL_DIR = submodules/rust-openssl
30-
OPENSSL = $(OPENSSL_DIR)/$(shell $(MAKE) -s -C $(OPENSSL_DIR) print-target)
30+
OPENSSL = $(foreach file,$(shell $(MAKE) -s -C $(OPENSSL_DIR) print-target),$(OPENSSL_DIR)/$(file))
3131

3232
$(PHF): config.stamp
3333
$(MAKE) -C $(PHF_DIR)
@@ -41,13 +41,13 @@ $(OPENSSL): config.stamp
4141
# Main targets
4242
###############################################################################
4343
POSTGRES_LIB_FILE = src/lib.rs
44-
POSTGRES_LIB = $(BUILDDIR)/$(shell $(RUSTC) --crate-file-name $(POSTGRES_LIB_FILE))
44+
POSTGRES_LIB = $(foreach file,$(shell $(RUSTC) --crate-file-name $(POSTGRES_LIB_FILE)),$(BUILDDIR)/$(file))
4545
POSTGRES_TEST = $(BUILDDIR)/$(shell $(RUSTC) --test --crate-file-name $(POSTGRES_LIB_FILE))
4646

4747
POSTGRES_LIB_DEPS = $(BUILDDIR)/postgres.d
4848
POSTGRES_TEST_DEPS = $(BUILDDIR)/postgres_test.d
4949

50-
LINK_ARGS = -L $(dir $(OPENSSL)) $(foreach file,$(PHF),-L $(dir $(file)))
50+
LINK_ARGS = $(foreach file,$(OPENSSL),-L $(dir $(file))) $(foreach file,$(PHF),-L $(dir $(file)))
5151

5252
-include $(POSTGRES_LIB_DEPS)
5353
-include $(POSTGRES_TEST_DEPS)

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ fn main() {
5656
*/
5757

5858
#[crate_id="github.com/sfackler/rust-postgres#postgres:0.0"];
59-
#[crate_type="lib"];
59+
#[crate_type="rlib"];
60+
#[crate_type="dylib"];
6061
#[doc(html_root_url="http://www.rust-ci.org/sfackler/rust-postgres/doc")];
6162

6263
#[warn(missing_doc)];

submodules/rust-openssl

Submodule rust-openssl updated from 490e518 to 360fa1f

0 commit comments

Comments
 (0)