xref: /haiku/src/libs/compat/freebsd_network/Jamfile (revision 4c1d9cf74e1c1706922e5b5795e788fb14fe81c9)
1SubDir HAIKU_TOP src libs compat freebsd_network ;
2
3UseHeaders [ FDirName $(SUBDIR) ] : true ;
4UseHeaders [ FDirName $(SUBDIR) compat ] : true ;
5UsePrivateHeaders net ;
6UsePrivateKernelHeaders ;
7UseHeaders $(HAIKU_PRIVATE_KERNEL_HEADERS) : true ;
8
9# Enabling C++ structures in C only code
10Includes [ FGristFiles kernel_c++_structs.h ]
11	: <src!system!kernel>kernel_c++_struct_sizes.h ;
12
13SubDirCcFlags [ FDefines _KERNEL=1 _XOPEN_SOURCE ] ;
14
15KernelStaticLibrary libfreebsd_network.a :
16	bus.cpp
17	callout.cpp
18	clock.c
19	compat.c
20	compat_cpp.cpp
21	condvar.c
22	Condvar.cpp
23	device.c
24	driver.c
25	eventhandler.c
26	fbsd_busdma_x86.c
27	fbsd_ether.c
28	fbsd_if_media.c
29	fbsd_kern_mbuf.c
30	fbsd_uipc_mbuf.c
31	fbsd_uipc_mbuf2.c
32	fbsd_mii.c
33	fbsd_mii_bitbang.c
34	fbsd_mii_physubr.c
35	fbsd_subr_bufring.c
36	fbsd_subr_sbuf.c
37	fbsd_time.c
38	firmware.c
39	if.c
40	libkern.cpp
41	mbuf.c
42	mii.c
43	mutex.c
44	pcpu.cpp
45	priv.cpp
46	smp.c
47	subr_autoconf.cpp
48	synch.c
49	systm.cpp
50	taskqueue.c
51	unit.cpp
52	;
53
54rule MIIHeaderGen
55{
56	SEARCH on $(2) = [ FDirName $(SUBDIR) compat dev mii ] ;
57	SEARCH on $(3) = [ FDirName $(SUBDIR) tools ] ;
58
59	Depends $(1) : $(2) $(3) ;
60	MakeLocateArch $(<) ;
61	MIIHeaderGen1 $(1) : $(2) $(3) ;
62	LocalClean clean : $(<) ;
63}
64
65actions MIIHeaderGen1
66{
67	gawk -v HEADERFILE=$(1) -f $(2[2]) $(2[1])
68}
69
70MIIHeaderGen [ FGristFiles miidevs.h ] : miidevs : miidevs2h.awk ;
71
72rule USBDevsHeaderGen
73{
74    SEARCH on $(2) = [ FDirName $(SUBDIR) compat dev usb ] ;
75	SEARCH on $(3) = [ FDirName $(SUBDIR) tools ] ;
76
77    Depends $(1) : $(2) $(3) ;
78	MakeLocateArch $(<) ;
79	USBDevsHeaderGen1 $(1) : $(2) $(3) ;
80	LocalClean clean : $(<) ;
81}
82
83actions USBDevsHeaderGen1
84{
85    gawk -v HEADERFILE=$(1[1]) -v DATAFILE=$(1[2]) -f $(2[2]) $(2[1])
86}
87
88USBDevsHeaderGen [ FGristFiles usbdevs.h usbdevs_data.h ] : usbdevs
89    : usbdevs2h.awk ;
90