diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2016-09-24 15:14:48 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2016-09-24 15:15:03 -0700 |
commit | 07802bed19cd2fd7ddb632d161ebda657ecf1b3b (patch) | |
tree | 5f4c2aa827b0a787d54dbe02c386a9ed0dc54a92 | |
parent | 1669d44d71ded9ce00e201b17106dbb9303e8632 (diff) | |
download | zxcvbn-c-07802bed19cd2fd7ddb632d161ebda657ecf1b3b.tar.gz |
move -shared out of LDFLAGS
We only need -shared once, but LDFLAGS is general.
-rw-r--r-- | debian/patches/targets-to-build-shlib.patch | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/debian/patches/targets-to-build-shlib.patch b/debian/patches/targets-to-build-shlib.patch index b119f91..f4027a3 100644 --- a/debian/patches/targets-to-build-shlib.patch +++ b/debian/patches/targets-to-build-shlib.patch @@ -5,14 +5,14 @@ Subject: targets to build shlib Upstream suggests embedding this library in projects that require it. This patch adds targets to build a shared library, instead. --- - makefile | 21 ++++++++++++++++++--- - 1 file changed, 18 insertions(+), 3 deletions(-) + makefile | 20 +++++++++++++++++--- + 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/makefile b/makefile -index 2b06881..794de48 100644 +index 2b06881..37844d0 100644 --- a/makefile +++ b/makefile -@@ -1,9 +1,22 @@ +@@ -1,9 +1,21 @@ CFLAGS ?= -O2 -Wall -Wextra -Wdeclaration-after-statement CPPFLAGS ?= -O2 -Wall -Wextra @@ -20,7 +20,6 @@ index 2b06881..794de48 100644 +CPPFLAGS += -fPIC -I. +TARGET_LIB = libzxcvbn.so.0 +SONAME = libzxcvbn.so.0 -+LDFLAGS += -shared + WORDS = words-10k-pass.txt words-english.txt words-female.txt words-male.txt words-surname.txt @@ -32,11 +31,11 @@ index 2b06881..794de48 100644 + gcc $(CFLAGS) -o $@ test.c -L. -lm -lzxcvbn + +$(TARGET_LIB): zxcvbn-inline.o -+ gcc $(CFLAGS) $(LDFLAGS) -Wl,-soname,$(SONAME) -o $@ $^ -lm ++ gcc $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,$(SONAME) -o $@ $^ -lm test-file: test.c zxcvbn-file.o gcc $(CFLAGS) -DUSE_DICT_FILE -o test-file test.c zxcvbn-file.o -lm -@@ -42,11 +55,13 @@ zxcvbn-c++file.o: zxcvbn.c dict-crc.h zxcvbn.h +@@ -42,11 +54,13 @@ zxcvbn-c++file.o: zxcvbn.c dict-crc.h zxcvbn.h if [ ! -e zxcvbn.cpp ]; then ln -s zxcvbn.c zxcvbn.cpp; fi g++ $(CPPFLAGS) -DUSE_DICT_FILE -c -o zxcvbn-c++file.o zxcvbn.cpp @@ -51,7 +50,7 @@ index 2b06881..794de48 100644 @echo Testing C++ build, dictionary from file ./test-c++file -t testcases.txt @echo Testing C++ build, dictionary in executable -@@ -57,4 +72,4 @@ clean: +@@ -57,4 +71,4 @@ clean: rm -f test-file zxcvbn-file.o test-c++file zxcvbn-c++file.o rm -f test-inline zxcvbn-inline.o test-c++inline zxcvbn-c++inline.o rm -f dictgen |