Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions libpkg/Makefile.autosetup
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ LOCAL_LDFLAGS+= -ldl
@endif

@if pkgos_darwin
LOCAL_LDFLAGS+= -lresolv -lz \
-framework CoreFoundation -framework CoreServices \
-framework SystemConfiguration
LOCAL_LDFLAGS+= -lresolv
@else
@if pkgos_freebsd
LOCAL_LDFLAGS+= -Wl,--version-script=$(top_srcdir)/libpkg/libpkg.ver,--undefined-version
Expand Down Expand Up @@ -171,8 +169,12 @@ LOCAL_CFLAGS+= @PKG_LIBCURL_CFLAGS@
LOCAL_LDFLAGS+= @PKG_LIBCURL_LDFLAGS@ @PKG_LIBCURL_LIBS@
@else
LOCAL_CFLAGS+= -I$(top_srcdir)/external/curl/include
LOCAL_LDFLAGS+= -L$(top_builddir)/external/libcurl -lcurl_pic
LOCAL_LDFLAGS+= -L$(top_builddir)/external/libcurl -lcurl_pic -lz
STATIC_LIBS+= $(top_builddir)/external/libcurl/libcurl.a
@if pkgos_darwin
LOCAL_LDFLAGS+= -framework CoreFoundation -framework CoreServices \
-framework SystemConfiguration
@endif
@endif

VPATH= $(top_srcdir)/libpkg
Expand Down
19 changes: 12 additions & 7 deletions src/Makefile.autosetup
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ OTHER_LIBS= @EXTRA_LIBS@ -lm -pthread
OTHER_LIBS+= @PKG_LIBARCHIVE_LDFLAGS@ @PKG_LIBARCHIVE_LIBS@
LOCAL_CFLAGS+= @PKG_LIBARCHIVE_CFLAGS@
@else
OTHER_LIBS+= -larchive -lbz2 -lz -llzma @ZSTDLIB@
OTHER_LIBS+= -larchive
@endif

@if HAVE_LIBUTIL
Expand Down Expand Up @@ -83,15 +83,17 @@ OTHER_LIBS+= -lssl -lcrypto
@if PKG_LIBCURL_LIBS
LOCAL_CFLAGS+= @PKG_LIBCURL_CFLAGS@
OTHER_LIBS+= @PKG_LIBCURL_LDFLAGS@ @PKG_LIBCURL_LIBS@
@else
OTHER_LIBS+= -lz
@if pkgos_darwin
OTHER_LIBS+= -framework CoreFoundation -framework CoreServices \
-framework SystemConfiguration
@endif
@endif

@if pkgos_darwin
LOCAL_LDFLAGS= $(LIBPKGFLAT) $(LIBS) $(OTHER_LIBS) -lresolv -lz \
-framework CoreFoundation -framework CoreServices \
-framework SystemConfiguration
STATIC_LDFLAGS= $(LIBPKGFLAT) $(LIBS) $(OTHER_LIBS) -lresolv -lz \
-framework CoreFoundation -framework CoreServices \
-framework SystemConfiguration
LOCAL_LDFLAGS= $(LIBPKGFLAT) $(LIBS) $(OTHER_LIBS) -lresolv
STATIC_LDFLAGS= $(LIBPKGFLAT) $(LIBS) $(OTHER_LIBS) -lresolv
# OSX doesn't support static binaries, sigh
STATIC_ARG=
@else
Expand All @@ -104,6 +106,9 @@ STATIC_ARG= -static
STATIC_LDFLAGS= $(LIBPKGFLAT) $(LIBS) $(OTHER_LIBS)
@endif

# For libarchive
STATIC_LDFLAGS+= -lbz2 -lz -llzma @ZSTDLIB@

VPATH= $(top_srcdir)/src

include $(MK)/prog.mk
Expand Down