xref: /haiku/src/kits/network/libnetapi/Jamfile (revision 15fb7d88e971c4d6c787c6a3a5c159afb1ebf77b)
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		local md5Sources ;
16
17		UsePrivateSystemHeaders ;
18
19		if [ FIsBuildFeatureEnabled openssl ] {
20			SubDirC++Flags -DOPENSSL_ENABLED ;
21			UseBuildFeatureHeaders openssl ;
22			sslSources = SSL.cpp ;
23			md5Sources = ;
24			Includes [ FGristFiles $(sslSources) SecureSocket.cpp
25					HttpAuthentication.cpp Certificate.cpp ]
26				: [ BuildFeatureAttribute openssl : headers ] ;
27				# Dependency needed to trigger downloading/unzipping the package
28				# before compiling the files.
29			SetupFeatureObjectsDir ssl ;
30		} else {
31			# As we don't have md5 from ssl, use our own
32			md5Sources = md5.c ;
33			SetupFeatureObjectsDir no-ssl ;
34		}
35
36		SharedLibrary [ MultiArchDefaultGristFiles libbnetapi.so ] :
37			DynamicBuffer.cpp
38			NetEndpoint.cpp
39			NetAddress.cpp
40			NetBuffer.cpp
41			NetDebug.cpp
42
43			$(sslSources)
44			Certificate.cpp
45
46			NetworkAddress.cpp
47			NetworkAddressResolver.cpp
48			NetworkCookie.cpp
49			NetworkCookieJar.cpp
50			NetworkDevice.cpp
51			NetworkInterface.cpp
52			NetworkRoster.cpp
53			NetworkRoute.cpp
54			NetworkSettings.cpp
55
56			AbstractSocket.cpp
57			DatagramSocket.cpp
58			ProxySecureSocket.cpp
59			SecureSocket.cpp
60			Socket.cpp
61			SocketMessenger.cpp
62
63			# TODO: another add-on for file:// (a much simpler one)
64			FileRequest.cpp
65
66			# TODO: another add-on for gopher://
67			GopherRequest.cpp
68
69			# TODO: The HTTP stuff should all go into an add-on. It needs
70			# linking against libcrypto.so and only the add-on should link
71			# against it.
72			DataRequest.cpp
73			HttpAuthentication.cpp
74			HttpHeaders.cpp
75			HttpForm.cpp
76			HttpRequest.cpp
77			HttpResult.cpp
78			HttpTime.cpp
79
80			notifications.cpp
81
82			$(md5Sources)
83
84			NetworkRequest.cpp
85			UrlContext.cpp
86			UrlProtocolAsynchronousListener.cpp
87			UrlProtocolDispatchingListener.cpp
88			UrlProtocolListener.cpp
89			UrlProtocolRoster.cpp
90			UrlRequest.cpp
91			UrlResult.cpp
92			UrlSynchronousRequest.cpp
93
94			:
95			be shared $(TARGET_NETWORK_LIBS) [ TargetLibstdc++ ]
96			[ TargetLibsupc++ ] [ BuildFeatureAttribute openssl : libraries ]
97			[ BuildFeatureAttribute icu : libraries ]
98			;
99	}
100}
101