SubDir HAIKU_TOP src kits network libbind ;

SetSubDirSupportedPlatforms haiku ;

UseHeaders [ FDirName $(SUBDIR) include ] : true ;
SubDirSysHdrs $(SUBDIR) ;

# private sources for this port
SEARCH_SOURCE += [ FDirName $(SUBDIR) src ] ;

# BIND sources
SEARCH_SOURCE += [ FDirName $(SUBDIR) bsd ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) dst ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) inet ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) irs ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) isc ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) nameser ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) resolv ] ;

{
	# we want to have the xxx_r functions, too
	local defines = _REENTRANT=1 USE_MD5=1 ;
	defines = [ FDefines $(defines) ] ;
	SubDirCcFlags $(defines) ;
	SubDirC++Flags $(defines) ;
}

MergeObject <libbind>libbind_dst.o :
	dst_api.c
	hmac_link.c
	md5_dgst.c
	support.c
;

MergeObject <libbind>libbind_inet.o :
	inet_addr.c
	inet_cidr_ntop.c
	inet_cidr_pton.c
	inet_data.c
	inet_lnaof.c
	inet_makeaddr.c
	inet_net_ntop.c
	inet_net_pton.c
	inet_neta.c
	inet_netof.c
	inet_network.c
	inet_ntoa.c
	inet_ntop.c
	inet_pton.c
	nsap_addr.c
;

MergeObject <libbind>libbind_irs.o :
	dns.c
	dns_ho.c
	dns_nw.c
	dns_pr.c
	dns_sv.c
	gai_strerror.c
	gen.c
	gen_ho.c
	gen_ng.c
	gen_nw.c
	gen_pr.c
	gen_sv.c
	getaddrinfo.c
	gethostent.c
	gethostent_r.c
	getnameinfo.c
	getnetent.c
	getnetent_r.c
	getnetgrent.c
	getnetgrent_r.c
	getprotoent.c
	getprotoent_r.c
	getservent.c
	getservent_r.c
	hesiod.c
	irp.c
	irp_ho.c
	irp_ng.c
	irp_nw.c
	irp_pr.c
	irp_sv.c
	irpmarshall.c
	irs_data.c
	lcl.c
	lcl_ho.c
	lcl_ng.c
	lcl_nw.c
	lcl_pr.c
	lcl_sv.cpp
	nis.c
	nul_ng.c
	util.c
;

MergeObject <libbind>libbind_isc.o :
	assertions.c
	base64.c
	bitncmp.c
	ctl_clnt.c
	ctl_p.c
	ctl_srvr.c
	ev_connects.c
	ev_files.c
	ev_streams.c
	ev_timers.c
	ev_waits.c
	eventlib.c
	heap.c
	hex.c
	logging.c
	memcluster.c
	movefile.c
	tree.c
;

MergeObject <libbind>libbind_nameser.o :
	ns_date.c
	ns_name.c
	ns_netint.c
	ns_parse.c
	ns_print.c
	ns_samedomain.c
	ns_sign.c
	ns_ttl.c
	ns_verify.c
;

MergeObject <libbind>libbind_resolv.o :
	herror.c
	mtctxres.c
	res_comp.c
	res_data.c
	res_debug.c
	res_findzonecut.c
	res_init.c
	res_mkquery.c
	res_mkupdate.c
	res_query.c
	res_send.c
	res_sendsigned.c
	res_update.c
;

MergeObject <libbind>libbind_private.o :
	# private functions
	strsep.c
;
