summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTilman Sauerbeck <tilman@crux.nu>2010-05-05 19:27:55 +0200
committerTilman Sauerbeck <tilman@crux.nu>2010-05-05 19:27:55 +0200
commit4b4ad16b7f79fcb59bdbd4afe1129e759c741bc2 (patch)
tree6505ac1aab0faeefb1d8570b1bf10452425c56c8 /Makefile
parent5228efc2d634e5b75429b221ea4e09c20b5b4829 (diff)
downloadpkgutils-4b4ad16b7f79fcb59bdbd4afe1129e759c741bc2.tar.gz
pkgutils-4b4ad16b7f79fcb59bdbd4afe1129e759c741bc2.tar.xz
Get libarchive LDFLAGS for static linking from pkg-config.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 36f11f46..6c68f2de 100644
--- a/Makefile
+++ b/Makefile
@@ -32,7 +32,9 @@ CXXFLAGS += -DNDEBUG
CXXFLAGS += -O2 -Wall -pedantic -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" \
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-LDFLAGS += -static -larchive -lz
+LIBARCHIVELIBS := $(shell pkg-config --libs --static libarchive)
+
+LDFLAGS += -static $(LIBARCHIVELIBS)
OBJECTS = main.o pkgutil.o pkgadd.o pkgrm.o pkginfo.o

Generated by cgit