CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Get libarchive LDFLAGS for static linking from pkg-config.
authorTilman Sauerbeck <tilman@crux.nu>
Wed, 5 May 2010 17:27:55 +0000 (19:27 +0200)
committerTilman Sauerbeck <tilman@crux.nu>
Wed, 5 May 2010 17:27:55 +0000 (19:27 +0200)
Makefile

index 36f11f46a5d2fcaa82ae478121c90e6d88217056..6c68f2de4ca99f1703507ce065080d6cb66e0493 100644 (file)
--- 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