diff options
author | EuAndreh <eu@euandre.org> | 2024-11-03 13:02:37 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2024-11-03 13:02:37 -0300 |
commit | 02862d9d64e830e4a3a7e5826fc10cc63c90cd89 (patch) | |
tree | 90d0c5bf82f886ce0b0db1a511c0bc10e3f96763 | |
parent | .gitignore: Simple reorder (diff) | |
download | scrypt-02862d9d64e830e4a3a7e5826fc10cc63c90cd89.tar.gz scrypt-02862d9d64e830e4a3a7e5826fc10cc63c90cd89.tar.xz |
Makefile: Use lddeps(1) for library dependencies
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | lddeps.txt | 1 |
2 files changed, 7 insertions, 2 deletions
@@ -9,6 +9,7 @@ PREFIX = /usr BINDIR = $(PREFIX)/bin LIBDIR = $(PREFIX)/lib GOLIBDIR = $(LIBDIR)/go +LDDEPSDIR = $(LIBDIR)/lddeps INCLUDEDIR = $(PREFIX)/include SRCDIR = $(PREFIX)/src/$(NAME) SHAREDIR = $(PREFIX)/share @@ -17,7 +18,7 @@ MANDIR = $(SHAREDIR)/man EXEC = ./ ## Where to store the installation. Empty by default. DESTDIR = -LDLIBS = --static -lscrypt-kdf +LDLIBS = --static `lddeps lddeps.txt` GOCFLAGS = -I $(GOLIBDIR) GOLDFLAGS = -L $(GOLIBDIR) @@ -35,7 +36,7 @@ GOLDFLAGS = -L $(GOLIBDIR) echo src/$(NAME).go src/version.go; fi) | uniq` .a.bin: - go tool link -L $(@D) $(GOLDFLAGS) -o $@ --extldflags '$(LDLIBS)' $< + go tool link -L $(@D) $(GOLDFLAGS) -o $@ --extldflags "$(LDLIBS)" $< @@ -188,10 +189,12 @@ install: all mkdir -p \ '$(DESTDIR)$(BINDIR)' \ '$(DESTDIR)$(GOLIBDIR)' \ + '$(DESTDIR)$(LDDEPSDIR)' \ '$(DESTDIR)$(SRCDIR)' \ cp $(NAME).bin '$(DESTDIR)$(BINDIR)'/$(NAME) cp src/$(NAME).a '$(DESTDIR)$(GOLIBDIR)' + cp lddeps.txt '$(DESTDIR)$(LDDEPSDIR)'/$(NAME).txt cp $(sources) '$(DESTDIR)$(SRCDIR)' ## Uninstalls from $(DESTDIR)$(PREFIX). This is a perfect mirror @@ -201,6 +204,7 @@ uninstall: rm -rf \ '$(DESTDIR)$(BINDIR)'/$(NAME) \ '$(DESTDIR)$(GOLIBDIR)'/$(NAME).a \ + '$(DESTDIR)$(LDDEPSDIR)'/$(NAME).txt \ '$(DESTDIR)$(SRCDIR)' \ diff --git a/lddeps.txt b/lddeps.txt new file mode 100644 index 0000000..17a3982 --- /dev/null +++ b/lddeps.txt @@ -0,0 +1 @@ +scrypt-kdf |