diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-03-12 17:04:02 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-03-13 14:31:36 +0100 |
commit | 61a3b55d115f770ed2cc493f052efa68e15a87ae (patch) | |
tree | 449676a356d7e413b514c5a359ea34104b493344 /openpgp-ffi/examples | |
parent | cc1250dc96c6459f4510357430405032d6dbf9a9 (diff) |
ffi, openpgp-ffi: Properly use LDLIBS to link against Sequoia.
- Fixes linking tests and examples with ld --as-needed.
Diffstat (limited to 'openpgp-ffi/examples')
-rw-r--r-- | openpgp-ffi/examples/Makefile | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/openpgp-ffi/examples/Makefile b/openpgp-ffi/examples/Makefile index faf6962d..6742a9a5 100644 --- a/openpgp-ffi/examples/Makefile +++ b/openpgp-ffi/examples/Makefile @@ -17,7 +17,8 @@ EXAMPLES = \ reader-cookie \ CFLAGS = -I../include -O0 -g -Wall -Werror -LDFLAGS = -L$(CARGO_TARGET_DIR)/debug -lsequoia_openpgp_ffi +LDFLAGS = -L$(CARGO_TARGET_DIR)/debug +LDLIBS = -lsequoia_openpgp_ffi # Prefix our target directory. TARGETS := $(foreach example,$(EXAMPLES),$(EXAMPLE_TARGET_DIR)/$(example)) @@ -31,4 +32,4 @@ $(TARGETS): ../include/sequoia/openpgp.h $(EXAMPLE_TARGET_DIR)/%: %.c mkdir -p $(EXAMPLE_TARGET_DIR) - $(CC) $(CFLAGS) $(LDFLAGS) -o "$@" "$<" + $(CC) $(CFLAGS) $(LDFLAGS) -o "$@" "$<" $(LDLIBS) |