xref: /freebsd/include/Makefile (revision 43e29d03f416d7dda52112a29600a7c82ee1a91e)
1#	@(#)Makefile	8.2 (Berkeley) 1/4/94
2# $FreeBSD$
3#
4# Doing a "make install" builds /usr/include.
5
6.include <src.opts.mk>
7
8PACKAGE=runtime
9CLEANFILES= osreldate.h version
10SUBDIR= arpa protocols rpcsvc rpc xlocale
11.if ${MACHINE_CPUARCH} == "amd64"
12SUBDIR+=	i386
13.endif
14SUBDIR_PARALLEL=
15INCS=	a.out.h ar.h assert.h bitstring.h byteswap.h \
16	complex.h cpio.h _ctype.h ctype.h \
17	db.h \
18	dirent.h dlfcn.h elf.h elf-hints.h endian.h err.h fmtmsg.h fnmatch.h \
19	fstab.h fts.h ftw.h getopt.h glob.h grp.h \
20	ieeefp.h ifaddrs.h \
21	inttypes.h iso646.h kenv.h langinfo.h libgen.h limits.h link.h \
22	locale.h malloc.h malloc_np.h memory.h monetary.h mpool.h mqueue.h \
23	ndbm.h netconfig.h \
24	netdb.h nl_types.h nlist.h nss.h nsswitch.h paths.h \
25	printf.h proc_service.h pthread.h \
26	pthread_np.h pwd.h ranlib.h readpassphrase.h regex.h \
27	res_update.h resolv.h runetype.h sched.h \
28	search.h semaphore.h setjmp.h \
29	signal.h spawn.h stab.h stdalign.h stdbool.h stddef.h \
30	stdnoreturn.h stdio.h stdlib.h string.h stringlist.h \
31	strings.h sysexits.h tar.h termios.h tgmath.h \
32	time.h timeconv.h timers.h ttyent.h \
33	uchar.h ulimit.h unistd.h utime.h utmpx.h uuid.h varargs.h \
34	wchar.h wctype.h wordexp.h xlocale.h
35
36.PATH: ${SRCTOP}/contrib/libc-vis
37INCS+=	vis.h
38
39MHDRS=	float.h floatingpoint.h stdarg.h
40
41PHDRS=	_semaphore.h
42
43LHDRS=	aio.h errno.h fcntl.h linker_set.h poll.h stdatomic.h stdint.h \
44	syslog.h ucontext.h
45
46LDIRS=	geom net net80211 netgraph netinet netinet6 \
47	netipsec netlink netsmb nfs nfsclient nfsserver sys vm
48
49LSUBDIRS=	dev/acpica dev/agp dev/ciss dev/filemon dev/firewire \
50	dev/hwpmc dev/hyperv \
51	dev/ic dev/iicbus dev/io dev/mfi dev/mmc \
52	dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/pwm \
53	dev/smbus dev/speaker dev/tcp_log dev/veriexec dev/vkbd dev/wg \
54	fs/devfs fs/fdescfs fs/msdosfs fs/nfs fs/nullfs \
55	fs/procfs fs/smbfs fs/udf fs/unionfs \
56	geom/cache geom/concat geom/eli geom/gate geom/journal geom/label \
57	geom/mirror geom/mountver geom/multipath geom/nop \
58	geom/raid geom/raid3 geom/shsec geom/stripe geom/union geom/virstor \
59	net/altq \
60	net/route \
61	netgraph/netflow \
62	netinet/cc \
63	netinet/netdump \
64	netinet/tcp_stacks \
65	netlink/route \
66	security/mac_biba security/mac_bsdextended security/mac_lomac \
67	security/mac_mls security/mac_partition \
68	security/mac_veriexec \
69	sys/disk \
70	ufs/ffs ufs/ufs
71
72LSUBSUBDIRS=	dev/mpt/mpilib
73
74.PATH: ${SRCTOP}/sys/dev/acpica
75ACPICA=		acpi_hpet.h \
76		acpiio.h
77ACPICADIR=	${INCLUDEDIR}/dev/acpica
78
79.PATH: ${SRCTOP}/sys/dev/agp
80AGP=		agpreg.h
81AGPDIR=		${INCLUDEDIR}/dev/agp
82
83.PATH: ${SRCTOP}/sys/bsm
84BSM=		audit.h \
85		audit_errno.h \
86		audit_internal.h \
87		audit_record.h \
88		audit_domain.h \
89		audit_fcntl.h \
90		audit_kevents.h \
91		audit_socket_type.h
92BSMPACKAGE=	libbsm
93BSMDIR=		${INCLUDEDIR}/bsm
94
95.PATH: ${SRCTOP}/sys/security/audit
96SECAUDIT=	audit.h \
97		audit_ioctl.h \
98		audit_private.h
99SECAUDITPACKAGE=	libbsm
100SECAUDITDIR=	${INCLUDEDIR}/security/audit
101
102.PATH:	${SRCTOP}/sys/cam
103CAM=	cam.h \
104	cam_ccb.h \
105	cam_compat.h \
106	cam_debug.h \
107	cam_iosched.h \
108	cam_periph.h \
109	cam_queue.h \
110	cam_sim.h \
111	cam_xpt.h \
112	cam_xpt_internal.h \
113	cam_xpt_periph.h \
114	cam_xpt_sim.h
115CAMDIR=	${INCLUDEDIR}/cam
116
117.PATH: ${SRCTOP}/sys/cam/ata
118CAMATA=		ata_all.h
119CAMATADIR=	${INCLUDEDIR}/cam/ata
120
121.PATH: ${SRCTOP}/sys/cam/mmc
122CAMMMC=		mmc.h \
123		mmc_bus.h \
124		mmc_all.h
125CAMMMCDIR=	${INCLUDEDIR}/cam/mmc
126
127.PATH: ${SRCTOP}/sys/cam/nvme
128CAMNVME=	nvme_all.h
129CAMNVMEDIR=	${INCLUDEDIR}/cam/nvme
130
131.PATH: ${SRCTOP}/sys/cam/scsi
132CAMSCSI=	scsi_all.h \
133		scsi_cd.h \
134		scsi_ch.h \
135		scsi_da.h \
136		scsi_enc.h \
137		scsi_enc_internal.h \
138		scsi_iu.h \
139		scsi_message.h \
140		scsi_pass.h \
141		scsi_pt.h \
142		scsi_sa.h \
143		scsi_ses.h \
144		scsi_sg.h \
145		scsi_targetio.h \
146		smp_all.h
147CAMSCSIDIR=	${INCLUDEDIR}/cam/scsi
148
149.PATH: ${SRCTOP}/sys/fs/cd9660
150FS9660=		cd9660_mount.h \
151		cd9660_node.h \
152		cd9660_rrip.h \
153		iso.h \
154		iso_rrip.h
155FS9660DIR=	${INCLUDEDIR}/isofs/cd9660
156
157.PATH: ${SRCTOP}/sys/dev/evdev
158EVDEV=		input.h \
159		input-event-codes.h \
160		uinput.h
161EVDEVDIR=	${INCLUDEDIR}/dev/evdev
162
163.PATH: ${SRCTOP}/sys/dev/hid
164HID=		hid.h \
165		hidraw.h
166HIDDIR=		${INCLUDEDIR}/dev/hid
167
168.PATH: ${SRCTOP}/sys/dev/hyperv/include ${SRCTOP}/sys/dev/hyperv/utilities
169HYPERV=		hv_snapshot.h \
170		hyperv.h
171HYPERVDIR=	${INCLUDEDIR}/dev/hyperv
172
173.PATH: ${SRCTOP}/sys/opencrypto
174OPENCRYPTO=	cryptodev.h
175OPENCRYPTODIR=	${INCLUDEDIR}/crypto
176
177.PATH: ${SRCTOP}/sys/dev/nvme
178NVME=		nvme.h
179NVMEDIR=	${INCLUDEDIR}/dev/nvme
180
181.PATH: ${SRCTOP}/sys/dev/pci
182PCI=		pcireg.h
183PCIDIR=		${INCLUDEDIR}/dev/pci
184
185.PATH: ${SRCTOP}/sys/dev/veriexec
186VERIEXEC=	veriexec_ioctl.h
187VERIEXECDIR=	${INCLUDEDIR}/dev/veriexec
188
189.PATH: ${SRCTOP}/sys/netpfil/ipfilter/netinet
190IPFILTER=	ip_auth.h \
191		ip_compat.h \
192		ip_dstlist.h \
193		ip_fil.h \
194		ip_frag.h \
195		ip_htable.h \
196		ip_lookup.h \
197		ip_nat.h \
198		ip_pool.h \
199		ip_proxy.h \
200		ip_rules.h \
201		ip_scan.h \
202		ip_state.h \
203		ip_sync.h \
204		ipf_rb.h \
205		ipl.h \
206		radix_ipf.h
207IPFILTERDIR=	${INCLUDEDIR}/netinet
208
209.PATH: ${SRCTOP}/sys/netpfil/pf
210PF=		pf.h \
211		pf_altq.h \
212		pf_mtag.h
213PFPACKAGE=	pf
214PFDIR=	${INCLUDEDIR}/netpfil/pf
215
216.PATH: ${SRCTOP}/sys/rpc
217RPC=		rpcsec_tls.h \
218		types.h
219RPCDIR=		${INCLUDEDIR}/rpc
220
221.PATH: ${SRCTOP}/sys/teken
222TEKEN=		teken.h
223TEKENDIR=	${INCLUDEDIR}/teken
224
225.PATH: ${SRCTOP}/sys/contrib/openzfs/include/sys
226NVPAIR=		nvpair.h
227NVPAIRDIR=	${INCLUDEDIR}/sys
228
229.PATH: ${SRCTOP}/sys/dev/mlx5
230MLX5=		mlx5io.h
231MLX5DIR=	${INCLUDEDIR}/dev/mlx5
232
233.PATH: ${SRCTOP}/sys/dev/wg
234WG=		if_wg.h
235WGDIR=		${INCLUDEDIR}/dev/wg
236
237INCSGROUPS=	INCS \
238		ACPICA \
239		AGP \
240		BSM \
241		CAM \
242		CAMATA \
243		CAMMMC \
244		CAMNVME \
245		CAMSCSI \
246		CRYPTO \
247		EVDEV \
248		FS9660 \
249		HID \
250		HYPERV \
251		OPENCRYPTO \
252		NVME \
253		PCI \
254		RPC \
255		SECAUDIT \
256		TEKEN \
257		VERIEXEC \
258		WG
259
260.if ${MK_IPFILTER} != "no"
261INCSGROUPS+=	IPFILTER
262.endif
263
264.if ${MK_PF} != "no"
265INCSGROUPS+=	PF
266.endif
267
268.if ${MK_CDDL} != "no"
269INCSGROUPS+=	NVPAIR
270.endif
271
272.if ${MK_MLX5TOOL} != "no"
273INCSGROUPS+=	MLX5
274.endif
275
276.if ${MK_BLUETOOTH} != "no"
277LSUBSUBDIRS+=	netgraph/bluetooth/include
278.endif
279
280.if ${MK_CUSE} != "no"
281LSUBDIRS+=	fs/cuse
282.endif
283
284.if ${MK_GSSAPI} != "no"
285SUBDIR+=	gssapi
286INCS+=		gssapi.h
287.endif
288
289.if ${MK_HESIOD} != "no"
290INCS+=	hesiod.h
291.endif
292
293# Handle the #define aliases for libiconv
294.if ${MK_ICONV} == "yes"
295INCS+=		iconv.h
296.endif
297
298.if ${MK_USB} != "no"
299LSUBDIRS+=	dev/usb
300.endif
301
302.if ${MACHINE_CPUARCH} == "powerpc" && ${MACHINE_ARCH} != "powerpcspe"
303_dev_powermac_nvram=	dev/powermac_nvram
304.endif
305
306# Define SHARED to indicate whether you want symbolic links to the system
307# source (``symlinks''), or a separate copy (``copies'').  ``symlinks'' is
308# probably only useful for developers and should be avoided if you do not
309# wish to tie your /usr/include and /usr/src together.
310#SHARED=	symlinks
311SHARED?=	copies
312
313INCS+=	osreldate.h
314
315SYSDIR=			${SRCTOP}/sys
316NEWVERS_SH=		${SYSDIR}/conf/newvers.sh
317PARAM_H=		${SYSDIR}/sys/param.h
318MK_OSRELDATE_SH=	${.CURDIR}/mk-osreldate.sh
319
320SYMLINKS+= ${LIBDIR:C,[^/]+,..,g:C,^/,,}${INCLUDEDIR} ${LIBDIR}/include
321
322osreldate.h: ${NEWVERS_SH} ${PARAM_H} ${MK_OSRELDATE_SH}
323	env NEWVERS_SH=${NEWVERS_SH} PARAMFILE=${PARAM_H} SYSDIR=${SYSDIR} \
324	    sh ${MK_OSRELDATE_SH}
325
326.for i in ${LHDRS}
327INCSLINKS+=	sys/$i ${INCLUDEDIR}/$i
328.endfor
329.for i in ${MHDRS}
330INCSLINKS+=	machine/$i ${INCLUDEDIR}/$i
331.endfor
332.for i in ${PHDRS}
333INCSLINKS+=	sys/$i ${INCLUDEDIR}/$i
334.endfor
335
336.if ${MACHINE} != ${MACHINE_CPUARCH}
337_MARCHS=	${MACHINE_CPUARCH}
338.endif
339.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
340_MARCHS+=	x86
341.endif
342
343META_TARGETS+=	compat
344stage_includes: ${SHARED}
345SDESTDIR=	${SYSROOT:U${DESTDIR}}
346
347# Take care of stale directory-level symlinks.
348# Note: The "|| true" after find is needed in case one of the directories does
349# not exist (yet).
350compat:
351	cd ${SDESTDIR}${INCLUDEDIR}; find ${LDIRS} ${LSUBDIRS} machine ${_MARCHS} \
352	    crypto -maxdepth 0 -mindepth 0 -type l -print -delete || true
353	mtree -deU ${NO_ROOT:D-W} ${MTREE_FOLLOWS_SYMLINKS} \
354	    -f ${SRCTOP}/etc/mtree/BSD.include.dist \
355	    -p ${SDESTDIR}${INCLUDEDIR} > /dev/null
356.if ${MACHINE_CPUARCH} == "amd64"
357	${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \
358	    ${SDESTDIR}${INCLUDEDIR}/i386
359.endif
360
361copies: .PHONY .META
362	cd ${SDESTDIR}${INCLUDEDIR}; find ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} crypto \
363	    machine machine/pc ${_MARCHS} -maxdepth 1 -mindepth 1 -type l \
364	    -name "*.h" -print -delete || true
365.for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/evdev:Ndev/hid:Ndev/hyperv:Ndev/pci:Ndev/veriexec:Ndev/wg} ${LSUBSUBDIRS}
366	cd ${SRCTOP}/sys; \
367	${INSTALL} -C ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \
368	    ${SDESTDIR}${INCLUDEDIR}/$i
369.endfor
370	cd ${SRCTOP}/sys/${MACHINE}/include; \
371	${INSTALL} -C ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
372	    ${SDESTDIR}${INCLUDEDIR}/machine
373.if exists(${SRCTOP}/sys/${MACHINE}/include/pc)
374	cd ${SRCTOP}/sys/${MACHINE}/include/pc; \
375	${INSTALL} -C ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
376	    ${SDESTDIR}${INCLUDEDIR}/machine/pc
377.endif
378.for _MARCH in ${_MARCHS}
379.if exists(${SRCTOP}/sys/${_MARCH}/include)
380	${INSTALL} -d ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 755 \
381	    ${SDESTDIR}${INCLUDEDIR}/${_MARCH}; \
382	cd ${SRCTOP}/sys/${_MARCH}/include; \
383	${INSTALL} -C ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
384	    ${SDESTDIR}${INCLUDEDIR}/${_MARCH}
385.if exists(${SRCTOP}/sys/${_MARCH}/include/pc)
386	${INSTALL} -d ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 755 \
387	    ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \
388	cd ${SRCTOP}/sys/${_MARCH}/include/pc; \
389	${INSTALL} -C ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
390	    ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc
391.endif
392.endif
393.endfor
394
395symlinks: .PHONY .META
396	@${ECHO} "Setting up symlinks to kernel source tree..."
397.for i in ${LDIRS}
398	cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \
399	    $$(printf '../../../%s ' sys/$i/*.h) ${SDESTDIR}${INCLUDEDIR}/$i
400.endfor
401.for i in ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/evdev:Ndev/hid:Ndev/hyperv:Ndev/pci:Ndev/veriexec:Ndev/wg}
402	cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \
403	    $$(printf '../../../../%s ' sys/$i/*.h) ${SDESTDIR}${INCLUDEDIR}/$i
404.endfor
405	${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \
406	    $$(printf '../../../../sys/dev/acpica/%s ' acpiio.h acpi_hpet.h) \
407	    ${SDESTDIR}${INCLUDEDIR}/dev/acpica; \
408	${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/agp/agpreg.h \
409	    ${SDESTDIR}${INCLUDEDIR}/dev/agp; \
410	${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \
411	    $$(printf '../../../../sys/dev/evdev/%s ' input.h input-event-codes.h uinput.h) \
412	    ${SDESTDIR}${INCLUDEDIR}/dev/evdev;
413	${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \
414	    $$(printf '../../../../sys/dev/hid/%s ' hid.h hidraw.h) \
415	    ${SDESTDIR}${INCLUDEDIR}/dev/hid; \
416	${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/hyperv/include/hyperv.h \
417	    ${SDESTDIR}${INCLUDEDIR}/dev/hyperv; \
418	${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/hyperv/utilities/hv_snapshot.h \
419	    ${SDESTDIR}${INCLUDEDIR}/dev/hyperv; \
420	${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/pci/pcireg.h \
421	    ${SDESTDIR}${INCLUDEDIR}/dev/pci; \
422	${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/veriexec/veriexec_ioctl.h \
423	    ${SDESTDIR}${INCLUDEDIR}/dev/veriexec;
424.for i in ${LSUBSUBDIRS}
425	cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \
426	    $$(printf '../../../../../%s ' sys/$i/*.h) ${SDESTDIR}${INCLUDEDIR}/$i
427.endfor
428.if ${MK_IPFILTER} != "no"
429	cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \
430	    $$(printf '../../../%s ' sys/netpfil/ipfilter/netinet/*.h) \
431	    ${SDESTDIR}${INCLUDEDIR}/netinet;
432.endif
433.if ${MK_PF} != "no"
434	cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \
435	    $$(printf '../../../../%s ' sys/netpfil/pf/*.h) \
436	    ${SDESTDIR}${INCLUDEDIR}/netpfil/pf;
437.endif
438	${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../sys/opencrypto/cryptodev.h \
439	    ${SDESTDIR}${INCLUDEDIR}/crypto; \
440	cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \
441	    $$(printf '../../../%s ' sys/${MACHINE}/include/*.h) \
442	    ${SDESTDIR}${INCLUDEDIR}/machine;
443.if exists(${SRCTOP}/sys/${MACHINE}/include/pc)
444	cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \
445	    $$(printf '../../../../%s ' sys/${MACHINE}/include/pc/*.h) \
446	    ${SDESTDIR}${INCLUDEDIR}/machine/pc;
447.endif
448.for _MARCH in ${_MARCHS}
449.if exists(${SRCTOP}/sys/${_MARCH}/include)
450	${INSTALL} -d ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 755 \
451	    ${SDESTDIR}${INCLUDEDIR}/${_MARCH}; \
452	cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \
453	    $$(printf '../../../%s ' sys/${_MARCH}/include/*.h) \
454	    ${SDESTDIR}${INCLUDEDIR}/${_MARCH};
455.if exists(${SRCTOP}/sys/${_MARCH}/include/pc)
456	${INSTALL} -d ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 755 \
457	    ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \
458	cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \
459	    $$(printf '../../../../%s ' sys/${_MARCH}/include/pc/*.h) \
460	    ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc;
461.endif
462.endif
463.endfor
464	cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \
465	    $$(printf '../../../../%s ' sys/fs/cd9660/*.h) \
466	    ${SDESTDIR}${INCLUDEDIR}/isofs/cd9660; \
467	cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \
468	    $$(printf '../../../sys/rpc/%s ' rpcsec_tls.h types.h) \
469	    ${SDESTDIR}${INCLUDEDIR}/rpc;
470	cd ${SRCTOP}/sys/rpc;
471.if ${MK_CDDL} != "no"
472	${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \
473	    ../../../sys/contrib/openzfs/include/sys/nvpair.h \
474	    ${SDESTDIR}${INCLUDEDIR}/sys
475.endif
476.if ${MK_MLX5TOOL} != "no"
477	${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/mlx5/mlx5io.h \
478	    ${SDESTDIR}${INCLUDEDIR}/dev/mlx5
479.endif
480
481.include <bsd.prog.mk>
482
483installincludes: ${SHARED}
484${SHARED}: compat
485
486.if ${MACHINE} == "host" && !defined(_SKIP_BUILD)
487# we're here because we are building a sysroot...
488# we need MACHINE et al set correctly
489HOST_MACHINE!= uname -m
490HOST_MACHINE_ARCH!= uname -p
491MACHINE:= ${HOST_MACHINE}
492MACHINE_ARCH:= ${HOST_MACHINE_ARCH}
493.endif
494
495check-ldirs:
496	missing_dirs=""; \
497	for dir in ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS}; do \
498		if [ ! -d ${SRCTOP}/sys/$$dir ]; then \
499			echo "${SRCTOP}/sys/$$dir"; \
500			missing_dirs="$$missing_dirs $$dir"; \
501		fi; \
502	done; \
503	if [ -n "$$missing_dirs" ]; then \
504		echo "Nonexistant directories:" $$missing_dirs; \
505		false; \
506	fi
507