xref: /haiku/src/kits/network/libnetapi/Jamfile (revision 1149fa6ece3567c466008a04ae8a830a63bafdaa)
1SubDir HAIKU_TOP src kits network libnetapi ;
2
3UsePrivateHeaders net shared ;
4
5UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_network compat ]
6	: true ;
7UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ] : true ;
8
9local architectureObject ;
10for architectureObject in [ MultiArchSubDirSetup ] {
11	on $(architectureObject) {
12		local sslSources ;
13		local md5Sources ;
14		if [ FIsBuildFeatureEnabled openssl ] {
15			SubDirC++Flags -DOPENSSL_ENABLED ;
16			UseBuildFeatureHeaders openssl ;
17			sslSources = SSL.cpp ;
18			md5Sources = ;
19			Includes [ FGristFiles $(sslSources) SecureSocket.cpp
20					HttpAuthentication.cpp ]
21				: [ BuildFeatureAttribute openssl : headers ] ;
22				# Dependency needed to trigger downloading/unzipping the package before
23				# compiling the files.
24			SetupFeatureObjectsDir ssl ;
25		} else {
26			# As we don't have md5 from ssl, use our own
27			md5Sources = md5.c ;
28			SetupFeatureObjectsDir no-ssl ;
29		}
30
31		SharedLibrary [ MultiArchDefaultGristFiles libbnetapi.so ] :
32			init.cpp
33			DynamicBuffer.cpp
34			NetEndpoint.cpp
35			NetAddress.cpp
36			NetBuffer.cpp
37			NetDebug.cpp
38
39			$(sslSources)
40
41			NetworkAddress.cpp
42			NetworkAddressResolver.cpp
43			NetworkCookie.cpp
44			NetworkCookieJar.cpp
45			NetworkDevice.cpp
46			NetworkInterface.cpp
47			NetworkRoster.cpp
48
49			AbstractSocket.cpp
50			DatagramSocket.cpp
51			Socket.cpp
52			SecureSocket.cpp
53
54			# TODO: The HTTP stuff should all go into an add-on. It needs
55			# linking against libcrypto.so and only the add-on should link
56			# against it.
57			HttpAuthentication.cpp
58			HttpHeaders.cpp
59			HttpForm.cpp
60			HttpRequest.cpp
61			HttpResult.cpp
62			HttpTime.cpp
63
64			# TODO: another add-on for file:// (a much simpler one)
65			FileRequest.cpp
66
67			$(md5Sources)
68
69			Url.cpp
70			UrlContext.cpp
71			UrlProtocolAsynchronousListener.cpp
72			UrlProtocolDispatchingListener.cpp
73			UrlProtocolListener.cpp
74			UrlProtocolRoster.cpp
75			UrlRequest.cpp
76			UrlSynchronousRequest.cpp
77
78			:
79			be $(TARGET_NETWORK_LIBS) $(TARGET_LIBSTDC++) $(TARGET_LIBSUPC++)
80			[ BuildFeatureAttribute openssl : libraries ]
81			[ MultiArchDefaultGristFiles libshared.a ]
82			;
83	}
84}
85