1a270eca5SBruce Evans# Doing a "make install" builds /usr/include. 259deaec5SRodney W. Grimes 3c6063d0dSWarner Losh.include <src.opts.mk> 4e1fe3dbaSRuslan Ermilov 578847e1eSDoug RabsonPACKAGE=clibs 68e8319a6SBryan DreweryCLEANFILES= osreldate.h version 7be04fec4SKyle EvansSUBDIR= arpa protocols rpcsvc rpc ssp xlocale 8a09ea2bbSBrooks Davis.if ${MACHINE_CPUARCH} == "amd64" 9a09ea2bbSBrooks DavisSUBDIR+= i386 10d5d97bedSMike KarelsINCLUDE_SUBDIRS+= i386 11d5d97bedSMike Karels.endif 12d5d97bedSMike Karels.if ${MACHINE_CPUARCH} == "aarch64" 13d5d97bedSMike KarelsSUBDIR+= arm 14d5d97bedSMike KarelsINCLUDE_SUBDIRS+= arm 15a09ea2bbSBrooks Davis.endif 16aa92269eSBryan DrewerySUBDIR_PARALLEL= 171761b09bSWarner LoshINCS= a.out.h ar.h assert.h bitstring.h byteswap.h \ 181761b09bSWarner Losh complex.h cpio.h _ctype.h ctype.h \ 1916133e15STim J. Robbins db.h \ 20a56fe703SKonstantin Belousov dirent.h dlfcn.h elf.h elf-hints.h endian.h err.h exterr.h \ 21a56fe703SKonstantin Belousov fmtmsg.h fnmatch.h \ 2230e0d2a5SWarner Losh fstab.h fts.h ftw.h getopt.h glob.h grp.h \ 231e3f1446SDavid E. O'Brien ieeefp.h ifaddrs.h \ 24c544e42bSMarcel Moolenaar inttypes.h iso646.h kenv.h langinfo.h libgen.h limits.h link.h \ 256b2c15daSJason Evans locale.h malloc.h malloc_np.h memory.h monetary.h mpool.h mqueue.h \ 261332b4bdSRuslan Ermilov ndbm.h netconfig.h \ 27401a7f6fSPeter Wemm netdb.h nl_types.h nlist.h nss.h nsswitch.h paths.h \ 2875067f4fSPoul-Henning Kamp printf.h proc_service.h pthread.h \ 29763ed733SEd Schouten pthread_np.h pwd.h ranlib.h readpassphrase.h regex.h \ 30160b4b92SKonstantin Belousov res_update.h resolv.h runetype.h sched.h \ 31160b4b92SKonstantin Belousov search.h semaphore.h setjmp.h \ 326296500aSRobert Clausecker signal.h spawn.h stab.h stdalign.h stdbit.h stdbool.h stdckdint.h \ 336296500aSRobert Clausecker stddef.h stdnoreturn.h stdio.h stdlib.h string.h stringlist.h \ 34f14ad5faSEd Schouten strings.h sysexits.h tar.h termios.h tgmath.h \ 35b902e8b2SStefan Farfeleder time.h timeconv.h timers.h ttyent.h \ 3695e33099SBrooks Davis uchar.h uexterror.h ulimit.h unistd.h utime.h utmpx.h uuid.h \ 3795e33099SBrooks Davis varargs.h \ 38a8ed63bbSDavid Chisnall wchar.h wctype.h wordexp.h xlocale.h 3959deaec5SRodney W. Grimes 4028d60d6aSWarner Losh.PATH: ${SRCTOP}/contrib/libc-vis 418ccca122SBrooks DavisINCS+= vis.h 428ccca122SBrooks Davis 432d92a5abSBrooks DavisMHDRS= float.h floatingpoint.h 44917e476dSPeter Dufault 452d92a5abSBrooks DavisPHDRS= _semaphore.h stdarg.h 46917e476dSPeter Dufault 4706bee445SEd SchoutenLHDRS= aio.h errno.h fcntl.h linker_set.h poll.h stdatomic.h stdint.h \ 4806bee445SEd Schouten syslog.h ucontext.h 4959deaec5SRodney W. Grimes 500594b287SEmmanuel VadotLDIRS= geom net net80211 netgraph netinet netinet6 \ 5111ca01e9SAlexander V. Chernikov netipsec netlink netsmb nfs nfsclient nfsserver sys vm 5215f3c66cSMarcel Moolenaar 53663b174bSEmmanuel VadotLSUBDIRS= dev/acpica dev/agp dev/ciss dev/filemon dev/firewire \ 54060f0a17SEmmanuel Vadot dev/hwpmc dev/hyperv \ 550ac9aac8SKonstantin Belousov dev/ic dev/iicbus dev/io dev/mfi dev/mmc dev/ntsync \ 56060f0a17SEmmanuel Vadot dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/pwm \ 575af09f50SMark Johnston dev/smbus dev/speaker dev/tcp_log dev/veriexec dev/vkbd dev/wg \ 58f5a95d9aSWarner Losh fs/devfs fs/fdescfs fs/msdosfs fs/nfs fs/nullfs \ 59237abf0cSDavide Italiano fs/procfs fs/smbfs fs/udf fs/unionfs \ 60f348204cSPawel Jakub Dawidek geom/cache geom/concat geom/eli geom/gate geom/journal geom/label \ 61b3f9d8c8SEdward Tomasz Napierala geom/mirror geom/mountver geom/multipath geom/nop \ 62c7996ddfSKirk McKusick geom/raid geom/raid3 geom/shsec geom/stripe geom/union geom/virstor \ 6348efb6c4Svoidanix geom/zoned \ 64772e66a6SGleb Smirnoff net/altq \ 65a6663252SAlexander V. Chernikov net/route \ 6621735dfaSMichael Butler netgraph/netflow \ 67d519cedbSGleb Smirnoff netinet/cc \ 68e5054602SMark Johnston netinet/netdump \ 69d371ed1cSOlivier Cochard netinet/tcp_stacks \ 7011ca01e9SAlexander V. Chernikov netlink/route \ 711554ba03SSimon J. Gerraty security/mac_biba security/mac_bsdextended \ 721554ba03SSimon J. Gerraty security/mac_grantbylabel \ 731554ba03SSimon J. Gerraty security/mac_lomac \ 74fdbe44b0SGleb Smirnoff security/mac_mls security/mac_partition \ 75eb12b8eaSSimon J. Gerraty security/mac_veriexec \ 7650875ed2SMarcel Moolenaar sys/disk \ 7751be47e4SMark Murray ufs/ffs ufs/ufs 7815f3c66cSMarcel Moolenaar 7911c63edeSAndrew ThompsonLSUBSUBDIRS= dev/mpt/mpilib 80c16e2101SJohn Baldwin 81f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/dev/acpica 82f61a3898SEmmanuel VadotACPICA= acpi_hpet.h \ 83f61a3898SEmmanuel Vadot acpiio.h 84f61a3898SEmmanuel VadotACPICADIR= ${INCLUDEDIR}/dev/acpica 85f61a3898SEmmanuel Vadot 86f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/dev/agp 87f61a3898SEmmanuel VadotAGP= agpreg.h 88f61a3898SEmmanuel VadotAGPDIR= ${INCLUDEDIR}/dev/agp 89f61a3898SEmmanuel Vadot 908c3eaf24SEmmanuel Vadot.PATH: ${SRCTOP}/sys/bsm 918c3eaf24SEmmanuel VadotBSM= audit.h \ 928c3eaf24SEmmanuel Vadot audit_errno.h \ 938c3eaf24SEmmanuel Vadot audit_internal.h \ 948c3eaf24SEmmanuel Vadot audit_record.h \ 958c3eaf24SEmmanuel Vadot audit_domain.h \ 968c3eaf24SEmmanuel Vadot audit_fcntl.h \ 978c3eaf24SEmmanuel Vadot audit_kevents.h \ 988c3eaf24SEmmanuel Vadot audit_socket_type.h 99a053f948SLexi WinterBSMPACKAGE= audit 1008c3eaf24SEmmanuel VadotBSMDIR= ${INCLUDEDIR}/bsm 1018c3eaf24SEmmanuel Vadot 10241956c13SStephen J. Kiernan.PATH: ${SRCTOP}/sys/security 10341956c13SStephen J. KiernanSECAUDIT= audit/audit.h \ 10441956c13SStephen J. Kiernan audit/audit_ioctl.h \ 10541956c13SStephen J. Kiernan audit/audit_private.h 106a053f948SLexi WinterSECAUDITPACKAGE= audit 1078c3eaf24SEmmanuel VadotSECAUDITDIR= ${INCLUDEDIR}/security/audit 1088c3eaf24SEmmanuel Vadot 1090594b287SEmmanuel Vadot.PATH: ${SRCTOP}/sys/cam 1100594b287SEmmanuel VadotCAM= cam.h \ 1110594b287SEmmanuel Vadot cam_ccb.h \ 1120594b287SEmmanuel Vadot cam_compat.h \ 1130594b287SEmmanuel Vadot cam_debug.h \ 1140594b287SEmmanuel Vadot cam_iosched.h \ 1150594b287SEmmanuel Vadot cam_periph.h \ 1160594b287SEmmanuel Vadot cam_queue.h \ 1170594b287SEmmanuel Vadot cam_sim.h \ 1180594b287SEmmanuel Vadot cam_xpt.h \ 1190594b287SEmmanuel Vadot cam_xpt_internal.h \ 1200594b287SEmmanuel Vadot cam_xpt_periph.h \ 1210594b287SEmmanuel Vadot cam_xpt_sim.h 1220594b287SEmmanuel VadotCAMDIR= ${INCLUDEDIR}/cam 1230594b287SEmmanuel Vadot 1240594b287SEmmanuel Vadot.PATH: ${SRCTOP}/sys/cam/ata 1250594b287SEmmanuel VadotCAMATA= ata_all.h 1260594b287SEmmanuel VadotCAMATADIR= ${INCLUDEDIR}/cam/ata 1270594b287SEmmanuel Vadot 1280594b287SEmmanuel Vadot.PATH: ${SRCTOP}/sys/cam/mmc 1290594b287SEmmanuel VadotCAMMMC= mmc.h \ 1300594b287SEmmanuel Vadot mmc_bus.h \ 1310594b287SEmmanuel Vadot mmc_all.h 1320594b287SEmmanuel VadotCAMMMCDIR= ${INCLUDEDIR}/cam/mmc 1330594b287SEmmanuel Vadot 1340594b287SEmmanuel Vadot.PATH: ${SRCTOP}/sys/cam/nvme 1350594b287SEmmanuel VadotCAMNVME= nvme_all.h 1360594b287SEmmanuel VadotCAMNVMEDIR= ${INCLUDEDIR}/cam/nvme 1370594b287SEmmanuel Vadot 1380594b287SEmmanuel Vadot.PATH: ${SRCTOP}/sys/cam/scsi 1390594b287SEmmanuel VadotCAMSCSI= scsi_all.h \ 1400594b287SEmmanuel Vadot scsi_cd.h \ 1410594b287SEmmanuel Vadot scsi_ch.h \ 1420594b287SEmmanuel Vadot scsi_da.h \ 1430594b287SEmmanuel Vadot scsi_enc.h \ 1440594b287SEmmanuel Vadot scsi_enc_internal.h \ 1450594b287SEmmanuel Vadot scsi_iu.h \ 1460594b287SEmmanuel Vadot scsi_message.h \ 1470594b287SEmmanuel Vadot scsi_pass.h \ 1480594b287SEmmanuel Vadot scsi_pt.h \ 1490594b287SEmmanuel Vadot scsi_sa.h \ 1500594b287SEmmanuel Vadot scsi_ses.h \ 1510594b287SEmmanuel Vadot scsi_sg.h \ 1520594b287SEmmanuel Vadot scsi_targetio.h \ 1530594b287SEmmanuel Vadot smp_all.h 1540594b287SEmmanuel VadotCAMSCSIDIR= ${INCLUDEDIR}/cam/scsi 1550594b287SEmmanuel Vadot 1565f74217cSAbdelkader Boudih.PATH: ${SRCTOP}/sys/dev/coreboot 1575f74217cSAbdelkader BoudihCOREBOOT= corebootio.h 1585f74217cSAbdelkader BoudihCOREBOOTDIR= ${INCLUDEDIR}/dev/coreboot 1595f74217cSAbdelkader Boudih 160f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/fs/cd9660 161f61a3898SEmmanuel VadotFS9660= cd9660_mount.h \ 162f61a3898SEmmanuel Vadot cd9660_node.h \ 163f61a3898SEmmanuel Vadot cd9660_rrip.h \ 164f61a3898SEmmanuel Vadot iso.h \ 165f61a3898SEmmanuel Vadot iso_rrip.h 166f61a3898SEmmanuel VadotFS9660DIR= ${INCLUDEDIR}/isofs/cd9660 167f61a3898SEmmanuel Vadot 168f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/dev/evdev 169f61a3898SEmmanuel VadotEVDEV= input.h \ 170f61a3898SEmmanuel Vadot input-event-codes.h \ 171f61a3898SEmmanuel Vadot uinput.h 172f61a3898SEmmanuel VadotEVDEVDIR= ${INCLUDEDIR}/dev/evdev 173f61a3898SEmmanuel Vadot 17467de2db2SVladimir Kondratyev.PATH: ${SRCTOP}/sys/dev/hid 17594773907SVladimir KondratyevHID= hid.h \ 17694773907SVladimir Kondratyev hidraw.h 17767de2db2SVladimir KondratyevHIDDIR= ${INCLUDEDIR}/dev/hid 17867de2db2SVladimir Kondratyev 179f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/dev/hyperv/include ${SRCTOP}/sys/dev/hyperv/utilities 180f61a3898SEmmanuel VadotHYPERV= hv_snapshot.h \ 181f61a3898SEmmanuel Vadot hyperv.h 182f61a3898SEmmanuel VadotHYPERVDIR= ${INCLUDEDIR}/dev/hyperv 183f61a3898SEmmanuel Vadot 184f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/opencrypto 185283352ddSJohn BaldwinOPENCRYPTO= cryptodev.h 186f61a3898SEmmanuel VadotOPENCRYPTODIR= ${INCLUDEDIR}/crypto 187f61a3898SEmmanuel Vadot 1881aaa8f67SJohn Baldwin.PATH: ${SRCTOP}/sys/dev/nvme 1891aaa8f67SJohn BaldwinNVME= nvme.h 1901aaa8f67SJohn BaldwinNVMEDIR= ${INCLUDEDIR}/dev/nvme 1911aaa8f67SJohn Baldwin 19270e5a9eaSJohn Baldwin.PATH: ${SRCTOP}/sys/dev/nvmf 19370e5a9eaSJohn BaldwinNVMF= nvmf.h \ 19470e5a9eaSJohn Baldwin nvmf_proto.h 19570e5a9eaSJohn BaldwinNVMFDIR= ${INCLUDEDIR}/dev/nvmf 19670e5a9eaSJohn Baldwin 197f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/dev/pci 198f61a3898SEmmanuel VadotPCI= pcireg.h 199f61a3898SEmmanuel VadotPCIDIR= ${INCLUDEDIR}/dev/pci 200f61a3898SEmmanuel Vadot 201*8895b134SJaeyoon Choi.PATH: ${SRCTOP}/sys/dev/ufshci 202*8895b134SJaeyoon ChoiUFSHCI= ufshci.h \ 203*8895b134SJaeyoon Choi ufshci_ioctl.h 204*8895b134SJaeyoon ChoiUFSHCIDIR= ${INCLUDEDIR}/dev/ufshci 205*8895b134SJaeyoon Choi 206f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/dev/veriexec 207f61a3898SEmmanuel VadotVERIEXEC= veriexec_ioctl.h 208f61a3898SEmmanuel VadotVERIEXECDIR= ${INCLUDEDIR}/dev/veriexec 209f61a3898SEmmanuel Vadot 2103b9b51feSCy Schubert.PATH: ${SRCTOP}/sys/netpfil/ipfilter/netinet 211f61a3898SEmmanuel VadotIPFILTER= ip_auth.h \ 212f61a3898SEmmanuel Vadot ip_compat.h \ 213f61a3898SEmmanuel Vadot ip_dstlist.h \ 214f61a3898SEmmanuel Vadot ip_fil.h \ 215f61a3898SEmmanuel Vadot ip_frag.h \ 216f61a3898SEmmanuel Vadot ip_htable.h \ 217f61a3898SEmmanuel Vadot ip_lookup.h \ 218f61a3898SEmmanuel Vadot ip_nat.h \ 219f61a3898SEmmanuel Vadot ip_pool.h \ 220f61a3898SEmmanuel Vadot ip_proxy.h \ 221f61a3898SEmmanuel Vadot ip_rules.h \ 222f61a3898SEmmanuel Vadot ip_scan.h \ 223f61a3898SEmmanuel Vadot ip_state.h \ 224f61a3898SEmmanuel Vadot ip_sync.h \ 225f61a3898SEmmanuel Vadot ipf_rb.h \ 226f61a3898SEmmanuel Vadot ipl.h \ 227f61a3898SEmmanuel Vadot radix_ipf.h 228f61a3898SEmmanuel VadotIPFILTERDIR= ${INCLUDEDIR}/netinet 229f61a3898SEmmanuel Vadot 230f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/netpfil/pf 231f61a3898SEmmanuel VadotPF= pf.h \ 232f61a3898SEmmanuel Vadot pf_altq.h \ 2332cef6288SAlexander V. Chernikov pf_mtag.h \ 2342cef6288SAlexander V. Chernikov pf_nl.h 235f61a3898SEmmanuel VadotPFPACKAGE= pf 236f61a3898SEmmanuel VadotPFDIR= ${INCLUDEDIR}/netpfil/pf 237f61a3898SEmmanuel Vadot 238f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/rpc 239f61a3898SEmmanuel VadotRPC= rpcsec_tls.h \ 240f61a3898SEmmanuel Vadot types.h 241f61a3898SEmmanuel VadotRPCDIR= ${INCLUDEDIR}/rpc 242f61a3898SEmmanuel Vadot 243f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/teken 244f61a3898SEmmanuel VadotTEKEN= teken.h 245f61a3898SEmmanuel VadotTEKENDIR= ${INCLUDEDIR}/teken 246f61a3898SEmmanuel Vadot 247e928afc5SJohn Baldwin.PATH: ${ZFSTOP}/include/sys 248f61a3898SEmmanuel VadotNVPAIR= nvpair.h 249f61a3898SEmmanuel VadotNVPAIRDIR= ${INCLUDEDIR}/sys 250f61a3898SEmmanuel Vadot 251f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/dev/mlx5 252f61a3898SEmmanuel VadotMLX5= mlx5io.h 253f61a3898SEmmanuel VadotMLX5DIR= ${INCLUDEDIR}/dev/mlx5 254f61a3898SEmmanuel Vadot 255744bfb21SJohn Baldwin.PATH: ${SRCTOP}/sys/dev/wg 256744bfb21SJohn BaldwinWG= if_wg.h 257744bfb21SJohn BaldwinWGDIR= ${INCLUDEDIR}/dev/wg 258744bfb21SJohn Baldwin 259f61a3898SEmmanuel VadotINCSGROUPS= INCS \ 260f61a3898SEmmanuel Vadot ACPICA \ 261f61a3898SEmmanuel Vadot AGP \ 262f41efc45SEmmanuel Vadot BSM \ 2630594b287SEmmanuel Vadot CAM \ 2640594b287SEmmanuel Vadot CAMATA \ 2650594b287SEmmanuel Vadot CAMMMC \ 2660594b287SEmmanuel Vadot CAMNVME \ 2670594b287SEmmanuel Vadot CAMSCSI \ 2685f74217cSAbdelkader Boudih COREBOOT \ 269f61a3898SEmmanuel Vadot CRYPTO \ 270f61a3898SEmmanuel Vadot EVDEV \ 271f61a3898SEmmanuel Vadot FS9660 \ 27267de2db2SVladimir Kondratyev HID \ 273f61a3898SEmmanuel Vadot HYPERV \ 274f61a3898SEmmanuel Vadot OPENCRYPTO \ 2751aaa8f67SJohn Baldwin NVME \ 27670e5a9eaSJohn Baldwin NVMF \ 277f61a3898SEmmanuel Vadot PCI \ 278f61a3898SEmmanuel Vadot RPC \ 279f41efc45SEmmanuel Vadot SECAUDIT \ 280f61a3898SEmmanuel Vadot TEKEN \ 281*8895b134SJaeyoon Choi UFSHCI \ 282744bfb21SJohn Baldwin VERIEXEC \ 283744bfb21SJohn Baldwin WG 284f61a3898SEmmanuel Vadot 285f61a3898SEmmanuel Vadot.if ${MK_IPFILTER} != "no" 286f61a3898SEmmanuel VadotINCSGROUPS+= IPFILTER 287f61a3898SEmmanuel Vadot.endif 288f61a3898SEmmanuel Vadot 289f61a3898SEmmanuel Vadot.if ${MK_PF} != "no" 290f61a3898SEmmanuel VadotINCSGROUPS+= PF 291f61a3898SEmmanuel Vadot.endif 292f61a3898SEmmanuel Vadot 293f61a3898SEmmanuel Vadot.if ${MK_CDDL} != "no" 294f61a3898SEmmanuel VadotINCSGROUPS+= NVPAIR 295f61a3898SEmmanuel Vadot.endif 296f61a3898SEmmanuel Vadot 297f61a3898SEmmanuel Vadot.if ${MK_MLX5TOOL} != "no" 298f61a3898SEmmanuel VadotINCSGROUPS+= MLX5 299f61a3898SEmmanuel Vadot.endif 300f61a3898SEmmanuel Vadot 3017e4a2c28SEnji Cooper.if ${MK_BLUETOOTH} != "no" 3027e4a2c28SEnji CooperLSUBSUBDIRS+= netgraph/bluetooth/include 3037e4a2c28SEnji Cooper.endif 3047e4a2c28SEnji Cooper 3058b77741eSEnji Cooper.if ${MK_CUSE} != "no" 3068b77741eSEnji CooperLSUBDIRS+= fs/cuse 3078b77741eSEnji Cooper.endif 3088b77741eSEnji Cooper 309dc5ba6b8SLexi Winter.if ${MK_KERBEROS} != "no" && ${MK_MITKRB5} == "no" 310dd987372STijl CoosemansSUBDIR+= gssapi 311dd987372STijl CoosemansINCS+= gssapi.h 312dd987372STijl Coosemans.endif 313dd987372STijl Coosemans 314e1fe3dbaSRuslan Ermilov.if ${MK_HESIOD} != "no" 3153d86554cSPoul-Henning KampINCS+= hesiod.h 3163d86554cSPoul-Henning Kamp.endif 3173d86554cSPoul-Henning Kamp 3180ff204bbSPeter Wemm# Handle the #define aliases for libiconv 3190ff204bbSPeter Wemm.if ${MK_ICONV} == "yes" 320912ce912SPeter WemmINCS+= iconv.h 3210ff204bbSPeter Wemm.endif 3220ff204bbSPeter Wemm 3237e4a2c28SEnji Cooper.if ${MK_USB} != "no" 3247e4a2c28SEnji CooperLSUBDIRS+= dev/usb 3257e4a2c28SEnji Cooper.endif 3267e4a2c28SEnji Cooper 3275af09f50SMark Johnston.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "aarch64" || \ 3285af09f50SMark Johnston ${MACHINE_CPUARCH} == "riscv" 3295af09f50SMark Johnston.if ${MK_BHYVE} != "no" 3305af09f50SMark JohnstonLSUBDIRS+= dev/vmm 3315af09f50SMark Johnston.endif 3325af09f50SMark Johnston.endif 3335af09f50SMark Johnston 33494d1731eSMinsoo Choo.if ${MACHINE_CPUARCH} == "powerpc" 3357e4a2c28SEnji Cooper_dev_powermac_nvram= dev/powermac_nvram 3367e4a2c28SEnji Cooper.endif 3370ff204bbSPeter Wemm 338060f0a17SEmmanuel Vadot# Define SHARED to indicate whether you want symbolic links to the system 339060f0a17SEmmanuel Vadot# source (``symlinks''), or a separate copy (``copies''). ``symlinks'' is 340060f0a17SEmmanuel Vadot# probably only useful for developers and should be avoided if you do not 341060f0a17SEmmanuel Vadot# wish to tie your /usr/include and /usr/src together. 342060f0a17SEmmanuel Vadot#SHARED= symlinks 343060f0a17SEmmanuel VadotSHARED?= copies 344060f0a17SEmmanuel Vadot 345c7b111cbSRuslan ErmilovINCS+= osreldate.h 3463672faeaSPeter Wemm 34728d60d6aSWarner LoshSYSDIR= ${SRCTOP}/sys 3480210509aSIan LeporeNEWVERS_SH= ${SYSDIR}/conf/newvers.sh 3490210509aSIan LeporePARAM_H= ${SYSDIR}/sys/param.h 350bfe5c479SIan LeporeMK_OSRELDATE_SH= ${.CURDIR}/mk-osreldate.sh 351bfe5c479SIan Lepore 35234ecf418SBryan DrewerySYMLINKS+= ${LIBDIR:C,[^/]+,..,g:C,^/,,}${INCLUDEDIR} ${LIBDIR}/include 353d32e83c2SBryan Drewery 3548e8319a6SBryan Dreweryosreldate.h: ${NEWVERS_SH} ${PARAM_H} ${MK_OSRELDATE_SH} 3558e8319a6SBryan Drewery env NEWVERS_SH=${NEWVERS_SH} PARAMFILE=${PARAM_H} SYSDIR=${SYSDIR} \ 356dd5f1297SIan Lepore sh ${MK_OSRELDATE_SH} 3573672faeaSPeter Wemm 358a7aaf57eSRuslan Ermilov.for i in ${LHDRS} 359c7b111cbSRuslan ErmilovINCSLINKS+= sys/$i ${INCLUDEDIR}/$i 36002cca882SMarcel Moolenaar.endfor 361a7aaf57eSRuslan Ermilov.for i in ${MHDRS} 362c7b111cbSRuslan ErmilovINCSLINKS+= machine/$i ${INCLUDEDIR}/$i 36302cca882SMarcel Moolenaar.endfor 364a7aaf57eSRuslan Ermilov.for i in ${PHDRS} 3656aeb05d7STom RhodesINCSLINKS+= sys/$i ${INCLUDEDIR}/$i 36602cca882SMarcel Moolenaar.endfor 36715f3c66cSMarcel Moolenaar 36825faff34SWarner Losh.if ${MACHINE} != ${MACHINE_CPUARCH} 369544de89dSJohn Baldwin_MARCHS= ${MACHINE_CPUARCH} 370544de89dSJohn Baldwin.endif 371544de89dSJohn Baldwin.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" 372544de89dSJohn Baldwin_MARCHS+= x86 3738f3e5dd0SWarner Losh.endif 3748f3e5dd0SWarner Losh 375060f0a17SEmmanuel VadotMETA_TARGETS+= compat 376060f0a17SEmmanuel Vadotstage_includes: ${SHARED} 377f6e77cb8SStephen J. KiernanSDESTDIR?= ${SYSROOT:U${DESTDIR}} 3787750ad47SMarcel Moolenaar 379a270eca5SBruce Evans# Take care of stale directory-level symlinks. 3808d30571dSAlex Richardson# Note: The "|| true" after find is needed in case one of the directories does 3818d30571dSAlex Richardson# not exist (yet). 382060f0a17SEmmanuel Vadotcompat: 3838d30571dSAlex Richardson cd ${SDESTDIR}${INCLUDEDIR}; find ${LDIRS} ${LSUBDIRS} machine ${_MARCHS} \ 3848d30571dSAlex Richardson crypto -maxdepth 0 -mindepth 0 -type l -print -delete || true 385a52fd948SAlex Richardson mtree -deU ${NO_ROOT:D-W} ${MTREE_FOLLOWS_SYMLINKS} \ 38628d60d6aSWarner Losh -f ${SRCTOP}/etc/mtree/BSD.include.dist \ 387c99b67a7SBryan Drewery -p ${SDESTDIR}${INCLUDEDIR} > /dev/null 388d5d97bedSMike Karels.for d in ${INCLUDE_SUBDIRS} 389a09ea2bbSBrooks Davis ${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \ 390d5d97bedSMike Karels ${SDESTDIR}${INCLUDEDIR}/${d} 391d5d97bedSMike Karels.endfor 392a270eca5SBruce Evans 393060f0a17SEmmanuel Vadotcopies: .PHONY .META 3948d30571dSAlex Richardson cd ${SDESTDIR}${INCLUDEDIR}; find ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} crypto \ 3958d30571dSAlex Richardson machine machine/pc ${_MARCHS} -maxdepth 1 -mindepth 1 -type l \ 3968d30571dSAlex Richardson -name "*.h" -print -delete || true 3975f74217cSAbdelkader Boudih.for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/coreboot:Ndev/evdev:Ndev/hid:Ndev/hyperv:Ndev/pci:Ndev/veriexec:Ndev/wg} ${LSUBSUBDIRS} 39828d60d6aSWarner Losh cd ${SRCTOP}/sys; \ 3998b8babf0SKyle Evans ${INSTALL} -C ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \ 400c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/$i 40115f3c66cSMarcel Moolenaar.endfor 40228d60d6aSWarner Losh cd ${SRCTOP}/sys/${MACHINE}/include; \ 4038b8babf0SKyle Evans ${INSTALL} -C ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 404c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/machine 40528d60d6aSWarner Losh.if exists(${SRCTOP}/sys/${MACHINE}/include/pc) 40628d60d6aSWarner Losh cd ${SRCTOP}/sys/${MACHINE}/include/pc; \ 4078b8babf0SKyle Evans ${INSTALL} -C ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 408c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/machine/pc 4099f1207d5SRuslan Ermilov.endif 410544de89dSJohn Baldwin.for _MARCH in ${_MARCHS} 41128d60d6aSWarner Losh.if exists(${SRCTOP}/sys/${_MARCH}/include) 4128b8babf0SKyle Evans ${INSTALL} -d ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 755 \ 413c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/${_MARCH}; \ 41428d60d6aSWarner Losh cd ${SRCTOP}/sys/${_MARCH}/include; \ 4158b8babf0SKyle Evans ${INSTALL} -C ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 416c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/${_MARCH} 41728d60d6aSWarner Losh.if exists(${SRCTOP}/sys/${_MARCH}/include/pc) 4188b8babf0SKyle Evans ${INSTALL} -d ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 755 \ 419c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \ 42028d60d6aSWarner Losh cd ${SRCTOP}/sys/${_MARCH}/include/pc; \ 4218b8babf0SKyle Evans ${INSTALL} -C ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 422c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc 4238f3e5dd0SWarner Losh.endif 4248f3e5dd0SWarner Losh.endif 425544de89dSJohn Baldwin.endfor 42659deaec5SRodney W. Grimes 427060f0a17SEmmanuel Vadotsymlinks: .PHONY .META 428060f0a17SEmmanuel Vadot @${ECHO} "Setting up symlinks to kernel source tree..." 429060f0a17SEmmanuel Vadot.for i in ${LDIRS} 430060f0a17SEmmanuel Vadot cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 431060f0a17SEmmanuel Vadot $$(printf '../../../%s ' sys/$i/*.h) ${SDESTDIR}${INCLUDEDIR}/$i 432060f0a17SEmmanuel Vadot.endfor 4335f74217cSAbdelkader Boudih.for i in ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/coreboot:Ndev/evdev:Ndev/hid:Ndev/hyperv:Ndev/pci:Ndev/veriexec:Ndev/wg} 434060f0a17SEmmanuel Vadot cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 435060f0a17SEmmanuel Vadot $$(printf '../../../../%s ' sys/$i/*.h) ${SDESTDIR}${INCLUDEDIR}/$i 436060f0a17SEmmanuel Vadot.endfor 437060f0a17SEmmanuel Vadot ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 438060f0a17SEmmanuel Vadot $$(printf '../../../../sys/dev/acpica/%s ' acpiio.h acpi_hpet.h) \ 439060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/dev/acpica; \ 440060f0a17SEmmanuel Vadot ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/agp/agpreg.h \ 441060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/dev/agp; \ 442060f0a17SEmmanuel Vadot ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 443060f0a17SEmmanuel Vadot $$(printf '../../../../sys/dev/evdev/%s ' input.h input-event-codes.h uinput.h) \ 444060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/dev/evdev; 445060f0a17SEmmanuel Vadot ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 446060f0a17SEmmanuel Vadot $$(printf '../../../../sys/dev/hid/%s ' hid.h hidraw.h) \ 447060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/dev/hid; \ 448060f0a17SEmmanuel Vadot ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/hyperv/include/hyperv.h \ 449060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/dev/hyperv; \ 450060f0a17SEmmanuel Vadot ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/hyperv/utilities/hv_snapshot.h \ 451060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/dev/hyperv; \ 452060f0a17SEmmanuel Vadot ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/pci/pcireg.h \ 453060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/dev/pci; \ 4545f74217cSAbdelkader Boudih ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/coreboot/corebootio.h \ 4555f74217cSAbdelkader Boudih ${SDESTDIR}${INCLUDEDIR}/dev/coreboot; \ 456060f0a17SEmmanuel Vadot ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/veriexec/veriexec_ioctl.h \ 457060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/dev/veriexec; 458060f0a17SEmmanuel Vadot.for i in ${LSUBSUBDIRS} 459060f0a17SEmmanuel Vadot cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 460060f0a17SEmmanuel Vadot $$(printf '../../../../../%s ' sys/$i/*.h) ${SDESTDIR}${INCLUDEDIR}/$i 461060f0a17SEmmanuel Vadot.endfor 462060f0a17SEmmanuel Vadot.if ${MK_IPFILTER} != "no" 463060f0a17SEmmanuel Vadot cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 4643b9b51feSCy Schubert $$(printf '../../../%s ' sys/netpfil/ipfilter/netinet/*.h) \ 465060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/netinet; 466060f0a17SEmmanuel Vadot.endif 467060f0a17SEmmanuel Vadot.if ${MK_PF} != "no" 468060f0a17SEmmanuel Vadot cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 469060f0a17SEmmanuel Vadot $$(printf '../../../../%s ' sys/netpfil/pf/*.h) \ 470060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/netpfil/pf; 471060f0a17SEmmanuel Vadot.endif 4727af04dffSJohn Baldwin ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../sys/opencrypto/cryptodev.h \ 473060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/crypto; \ 474060f0a17SEmmanuel Vadot cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 475060f0a17SEmmanuel Vadot $$(printf '../../../%s ' sys/${MACHINE}/include/*.h) \ 476060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/machine; 477060f0a17SEmmanuel Vadot.if exists(${SRCTOP}/sys/${MACHINE}/include/pc) 478060f0a17SEmmanuel Vadot cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 479060f0a17SEmmanuel Vadot $$(printf '../../../../%s ' sys/${MACHINE}/include/pc/*.h) \ 480060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/machine/pc; 481060f0a17SEmmanuel Vadot.endif 482060f0a17SEmmanuel Vadot.for _MARCH in ${_MARCHS} 483060f0a17SEmmanuel Vadot.if exists(${SRCTOP}/sys/${_MARCH}/include) 484060f0a17SEmmanuel Vadot ${INSTALL} -d ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 755 \ 485060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/${_MARCH}; \ 486060f0a17SEmmanuel Vadot cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 487060f0a17SEmmanuel Vadot $$(printf '../../../%s ' sys/${_MARCH}/include/*.h) \ 488060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/${_MARCH}; 489060f0a17SEmmanuel Vadot.if exists(${SRCTOP}/sys/${_MARCH}/include/pc) 490060f0a17SEmmanuel Vadot ${INSTALL} -d ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 755 \ 491060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \ 492060f0a17SEmmanuel Vadot cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 493060f0a17SEmmanuel Vadot $$(printf '../../../../%s ' sys/${_MARCH}/include/pc/*.h) \ 494060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc; 495060f0a17SEmmanuel Vadot.endif 496060f0a17SEmmanuel Vadot.endif 497060f0a17SEmmanuel Vadot.endfor 498060f0a17SEmmanuel Vadot cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 499060f0a17SEmmanuel Vadot $$(printf '../../../../%s ' sys/fs/cd9660/*.h) \ 500060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/isofs/cd9660; \ 501060f0a17SEmmanuel Vadot cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 502060f0a17SEmmanuel Vadot $$(printf '../../../sys/rpc/%s ' rpcsec_tls.h types.h) \ 503060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/rpc; 504060f0a17SEmmanuel Vadot cd ${SRCTOP}/sys/rpc; 505060f0a17SEmmanuel Vadot.if ${MK_CDDL} != "no" 506060f0a17SEmmanuel Vadot ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 507060f0a17SEmmanuel Vadot ../../../sys/contrib/openzfs/include/sys/nvpair.h \ 508060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/sys 509060f0a17SEmmanuel Vadot.endif 510060f0a17SEmmanuel Vadot.if ${MK_MLX5TOOL} != "no" 511060f0a17SEmmanuel Vadot ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/mlx5/mlx5io.h \ 512060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/dev/mlx5 513060f0a17SEmmanuel Vadot.endif 514060f0a17SEmmanuel Vadot 51594086ceaSBryan Drewery.include <bsd.prog.mk> 51694086ceaSBryan Drewery 517060f0a17SEmmanuel Vadotinstallincludes: ${SHARED} 518060f0a17SEmmanuel Vadot${SHARED}: compat 51994086ceaSBryan Drewery 520dbf5bd50SBryan Drewery.if ${MACHINE} == "host" && !defined(_SKIP_BUILD) 5211a682d2cSSimon J. Gerraty# we're here because we are building a sysroot... 5221a682d2cSSimon J. Gerraty# we need MACHINE et al set correctly 5231a682d2cSSimon J. GerratyHOST_MACHINE!= uname -m 5241a682d2cSSimon J. GerratyHOST_MACHINE_ARCH!= uname -p 5251a682d2cSSimon J. GerratyMACHINE:= ${HOST_MACHINE} 5261a682d2cSSimon J. GerratyMACHINE_ARCH:= ${HOST_MACHINE_ARCH} 5271a682d2cSSimon J. Gerraty.endif 5281a2249ffSBrooks Davis 5291a2249ffSBrooks Davischeck-ldirs: 5301a2249ffSBrooks Davis missing_dirs=""; \ 5311a2249ffSBrooks Davis for dir in ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS}; do \ 5321a2249ffSBrooks Davis if [ ! -d ${SRCTOP}/sys/$$dir ]; then \ 5331a2249ffSBrooks Davis echo "${SRCTOP}/sys/$$dir"; \ 5341a2249ffSBrooks Davis missing_dirs="$$missing_dirs $$dir"; \ 5351a2249ffSBrooks Davis fi; \ 5361a2249ffSBrooks Davis done; \ 5371a2249ffSBrooks Davis if [ -n "$$missing_dirs" ]; then \ 5381a2249ffSBrooks Davis echo "Nonexistant directories:" $$missing_dirs; \ 5391a2249ffSBrooks Davis false; \ 5401a2249ffSBrooks Davis fi 541