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