xref: /haiku/src/kits/network/libnetapi/Jamfile (revision 21258e2674226d6aa732321b6f8494841895af5f)
1SubDir HAIKU_TOP src kits network libnetapi ;
2
3UsePrivateHeaders app net shared storage support ;
4UsePrivateHeaders locale shared ;
5
6UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_network ] : true ;
7UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ] : true ;
8UseHeaders [ FDirName $(HAIKU_TOP) headers os add-ons network_settings ]
9	: true ;
10
11local architectureObject ;
12for architectureObject in [ MultiArchSubDirSetup ] {
13	on $(architectureObject) {
14		local sslSources ;
15
16		UsePrivateSystemHeaders ;
17
18		if [ FIsBuildFeatureEnabled openssl ] {
19			SubDirC++Flags -DOPENSSL_ENABLED ;
20			UseBuildFeatureHeaders openssl ;
21			sslSources = SSL.cpp ;
22			Includes [ FGristFiles $(sslSources) SecureSocket.cpp
23					HttpAuthentication.cpp Certificate.cpp ]
24				: [ BuildFeatureAttribute openssl : headers ] ;
25				# Dependency needed to trigger downloading/unzipping the package
26				# before compiling the files.
27			SetupFeatureObjectsDir ssl ;
28		} else {
29			SetupFeatureObjectsDir no-ssl ;
30		}
31
32		SharedLibrary [ MultiArchDefaultGristFiles libbnetapi.so ] :
33			DynamicBuffer.cpp
34			NetEndpoint.cpp
35			NetAddress.cpp
36			NetBuffer.cpp
37			NetDebug.cpp
38
39			$(sslSources)
40			Certificate.cpp
41
42			NetworkAddress.cpp
43			NetworkAddressResolver.cpp
44			NetworkCookie.cpp
45			NetworkCookieJar.cpp
46			NetworkDevice.cpp
47			NetworkInterface.cpp
48			NetworkRoster.cpp
49			NetworkRoute.cpp
50			NetworkSettings.cpp
51
52			AbstractSocket.cpp
53			DatagramSocket.cpp
54			ProxySecureSocket.cpp
55			SecureSocket.cpp
56			Socket.cpp
57			SocketMessenger.cpp
58
59			# TODO: another add-on for file:// (a much simpler one)
60			FileRequest.cpp
61
62			# TODO: another add-on for gopher://
63			GopherRequest.cpp
64
65			# TODO: The HTTP stuff should all go into an add-on. It needs
66			# linking against libcrypto.so and only the add-on should link
67			# against it.
68			DataRequest.cpp
69			HttpAuthentication.cpp
70			HttpHeaders.cpp
71			HttpForm.cpp
72			HttpRequest.cpp
73			HttpResult.cpp
74			HttpTime.cpp
75
76			notifications.cpp
77
78			NetworkRequest.cpp
79			UrlContext.cpp
80			UrlProtocolAsynchronousListener.cpp
81			UrlProtocolDispatchingListener.cpp
82			UrlProtocolListener.cpp
83			UrlProtocolRoster.cpp
84			UrlRequest.cpp
85			UrlResult.cpp
86			UrlSynchronousRequest.cpp
87
88			:
89			be shared $(TARGET_NETWORK_LIBS) [ TargetLibstdc++ ]
90			[ TargetLibsupc++ ] [ BuildFeatureAttribute openssl : libraries ]
91			[ BuildFeatureAttribute icu : libraries ]
92			;
93	}
94}
95