From 1b133b90fd01fec8790c4590359ffbc8721de798 Mon Sep 17 00:00:00 2001 From: Niels Sascha Reedijk Date: Wed, 20 Jan 2021 14:24:53 +0000 Subject: [PATCH] libnetservices.a: create new static library for the network services These will be added to the _devel packages so that other applications can link to them. Change-Id: If3fd231869823b42d6d896c6c9eb7a95c5fe715d Reviewed-on: https://review.haiku-os.org/c/haiku/+/3666 Reviewed-by: Adrien Destugues --- build/jam/packages/HaikuDevel | 4 +- build/jam/packages/HaikuDevelSecondary | 1 + src/kits/network/libnetservices/Jamfile | 66 ++++++++++++++----------- 3 files changed, 40 insertions(+), 31 deletions(-) diff --git a/build/jam/packages/HaikuDevel b/build/jam/packages/HaikuDevel index ebb86a9f25..f438f5539d 100644 --- a/build/jam/packages/HaikuDevel +++ b/build/jam/packages/HaikuDevel @@ -41,8 +41,8 @@ for lib in [ HaikuImageGetSystemLibs ] $(developmentLibs) { AddFilesToPackage develop lib : libc.a libcolumnlistview.a <$(architecture)>liblocalestub.a - libm.a libpthread.a - libprint.a libprintutils.a + libm.a libnetservices.a + libpthread.a libprint.a libprintutils.a <$(architecture)>libshared.a ; # the POSIX error code mapper library diff --git a/build/jam/packages/HaikuDevelSecondary b/build/jam/packages/HaikuDevelSecondary index 947d4e03eb..6c1f36b61f 100644 --- a/build/jam/packages/HaikuDevelSecondary +++ b/build/jam/packages/HaikuDevelSecondary @@ -38,6 +38,7 @@ AddFilesToPackage develop lib $(architecture) : <$(architecture)>libcolumnlistview.a <$(architecture)>liblocalestub.a <$(architecture)>libm.a + <$(architecture)>libnetservices.a <$(architecture)>libpthread.a <$(architecture)>libshared.a ; diff --git a/src/kits/network/libnetservices/Jamfile b/src/kits/network/libnetservices/Jamfile index 845e4da369..6a6ece1466 100644 --- a/src/kits/network/libnetservices/Jamfile +++ b/src/kits/network/libnetservices/Jamfile @@ -2,42 +2,50 @@ SubDir HAIKU_TOP src kits network libnetservices ; UsePrivateHeaders net netservices shared support ; +local sources = + # FUTURE: The HTTP stuff should all go into an add-on. It needs + # linking against libcrypto.so and only the add-on should link + # against it. + DataRequest.cpp + HttpAuthentication.cpp + HttpHeaders.cpp + HttpForm.cpp + HttpRequest.cpp + HttpResult.cpp + + # FUTURE: another add-on for file:// (a much simpler one) + FileRequest.cpp + + # FUTURE: another add-on for gopher:// + GopherRequest.cpp + + HttpTime.cpp + NetworkCookie.cpp + NetworkCookieJar.cpp + + NetworkRequest.cpp + UrlContext.cpp + UrlProtocolAsynchronousListener.cpp + UrlProtocolDispatchingListener.cpp + UrlProtocolListener.cpp + UrlProtocolRoster.cpp + UrlRequest.cpp + UrlResult.cpp + UrlSynchronousRequest.cpp + ; + local architectureObject ; for architectureObject in [ MultiArchSubDirSetup ] { on $(architectureObject) { local architecture = $(TARGET_PACKAGING_ARCH) ; MergeObject netservices.o : - # FUTURE: The HTTP stuff should all go into an add-on. It needs - # linking against libcrypto.so and only the add-on should link - # against it. - DataRequest.cpp - HttpAuthentication.cpp - HttpHeaders.cpp - HttpForm.cpp - HttpRequest.cpp - HttpResult.cpp - - # FUTURE: another add-on for file:// (a much simpler one) - FileRequest.cpp - - # FUTURE: another add-on for gopher:// - GopherRequest.cpp - - HttpTime.cpp - NetworkCookie.cpp - NetworkCookieJar.cpp - - NetworkRequest.cpp - UrlContext.cpp - UrlProtocolAsynchronousListener.cpp - UrlProtocolDispatchingListener.cpp - UrlProtocolListener.cpp - UrlProtocolRoster.cpp - UrlRequest.cpp - UrlResult.cpp - UrlSynchronousRequest.cpp + $(sources) : <$(architecture)>libshared.a ; + + StaticLibrary <$(architecture)>libnetservices.a : + $(sources) + ; } }