1996997fdSBruce Evans# @(#)Makefile 8.2 (Berkeley) 1/4/94 2a4add9a9SPeter Wemm# $FreeBSD$ 359deaec5SRodney W. Grimes# 4a270eca5SBruce Evans# Doing a "make install" builds /usr/include. 559deaec5SRodney W. Grimes 6c6063d0dSWarner Losh.include <src.opts.mk> 7e1fe3dbaSRuslan Ermilov 8bf24694cSGlen BarberPACKAGE=runtime 98e8319a6SBryan DreweryCLEANFILES= osreldate.h version 10dd987372STijl CoosemansSUBDIR= arpa protocols rpcsvc rpc xlocale 11aa92269eSBryan DrewerySUBDIR_PARALLEL= 128bdfc6bfSTim J. RobbinsINCS= a.out.h ar.h assert.h bitstring.h complex.h cpio.h _ctype.h ctype.h \ 1316133e15STim J. Robbins db.h \ 14c544e42bSMarcel Moolenaar dirent.h dlfcn.h elf.h elf-hints.h err.h fmtmsg.h fnmatch.h fstab.h \ 15dd987372STijl Coosemans fts.h ftw.h getopt.h glob.h grp.h \ 161e3f1446SDavid E. O'Brien ieeefp.h ifaddrs.h \ 17c544e42bSMarcel Moolenaar inttypes.h iso646.h kenv.h langinfo.h libgen.h limits.h link.h \ 186b2c15daSJason Evans locale.h malloc.h malloc_np.h memory.h monetary.h mpool.h mqueue.h \ 191332b4bdSRuslan Ermilov ndbm.h netconfig.h \ 20401a7f6fSPeter Wemm netdb.h nl_types.h nlist.h nss.h nsswitch.h paths.h \ 2175067f4fSPoul-Henning Kamp printf.h proc_service.h pthread.h \ 22763ed733SEd Schouten pthread_np.h pwd.h ranlib.h readpassphrase.h regex.h \ 23b9d131feSKonstantin Belousov res_update.h resolv.h runetype.h sched.h \ 24b9d131feSKonstantin Belousov search.h semaphore.h setjmp.h \ 2506bee445SEd Schouten signal.h spawn.h stab.h stdalign.h stdbool.h stddef.h \ 26367bebd4SEd Schouten stdnoreturn.h stdio.h stdlib.h string.h stringlist.h \ 27f14ad5faSEd Schouten strings.h sysexits.h tar.h termios.h tgmath.h \ 28b902e8b2SStefan Farfeleder time.h timeconv.h timers.h ttyent.h \ 2950c77c6eSEd Schouten uchar.h ulimit.h unistd.h utime.h utmpx.h uuid.h varargs.h \ 30a8ed63bbSDavid Chisnall wchar.h wctype.h wordexp.h xlocale.h 3159deaec5SRodney W. Grimes 3228d60d6aSWarner Losh.PATH: ${SRCTOP}/contrib/libc-vis 338ccca122SBrooks DavisINCS+= vis.h 348ccca122SBrooks Davis 35fefa0fd5SAlexander KabaevMHDRS= float.h floatingpoint.h stdarg.h 36917e476dSPeter Dufault 37b9d131feSKonstantin BelousovPHDRS= _semaphore.h 38917e476dSPeter Dufault 3906bee445SEd SchoutenLHDRS= aio.h errno.h fcntl.h linker_set.h poll.h stdatomic.h stdint.h \ 4006bee445SEd Schouten syslog.h ucontext.h 4159deaec5SRodney W. Grimes 42577dfb1cSEmmanuel VadotLDIRS= geom net net80211 netgraph netinet netinet6 \ 43a7dc3128SBrooks Davis netipsec netsmb nfs nfsclient nfsserver sys vm 4415f3c66cSMarcel Moolenaar 45577dfb1cSEmmanuel VadotLSUBDIRS= dev/acpica dev/agp dev/an dev/ciss dev/filemon dev/firewire \ 46168fce73SSepherosa Ziehau dev/hwpmc dev/hyperv \ 47e6a376d1SEd Maste dev/ic dev/iicbus dev/io dev/mfi dev/mmc dev/nvme \ 4871fb3739SIan Lepore dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/pwm \ 49a21def4dSWarner Losh dev/smbus dev/speaker dev/tcp_log dev/veriexec dev/vkbd \ 50f5a95d9aSWarner Losh fs/devfs fs/fdescfs fs/msdosfs fs/nfs fs/nullfs \ 51237abf0cSDavide Italiano fs/procfs fs/smbfs fs/udf fs/unionfs \ 52f348204cSPawel Jakub Dawidek geom/cache geom/concat geom/eli geom/gate geom/journal geom/label \ 53b3f9d8c8SEdward Tomasz Napierala geom/mirror geom/mountver geom/multipath geom/nop \ 5489b17223SAlexander Motin geom/raid geom/raid3 geom/shsec geom/stripe geom/virstor \ 55772e66a6SGleb Smirnoff net/altq \ 56a6663252SAlexander V. Chernikov net/route \ 57fdbe44b0SGleb Smirnoff netgraph/atm netgraph/netflow \ 58d519cedbSGleb Smirnoff netinet/cc \ 59e5054602SMark Johnston netinet/netdump \ 60d371ed1cSOlivier Cochard netinet/tcp_stacks \ 61fdbe44b0SGleb Smirnoff security/mac_biba security/mac_bsdextended security/mac_lomac \ 62fdbe44b0SGleb Smirnoff security/mac_mls security/mac_partition \ 63eb12b8eaSSimon J. Gerraty security/mac_veriexec \ 6450875ed2SMarcel Moolenaar sys/disk \ 6551be47e4SMark Murray ufs/ffs ufs/ufs 6615f3c66cSMarcel Moolenaar 6711c63edeSAndrew ThompsonLSUBSUBDIRS= dev/mpt/mpilib 68c16e2101SJohn Baldwin 69f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/dev/acpica 70f61a3898SEmmanuel VadotACPICA= acpi_hpet.h \ 71f61a3898SEmmanuel Vadot acpiio.h 72f61a3898SEmmanuel VadotACPICADIR= ${INCLUDEDIR}/dev/acpica 73f61a3898SEmmanuel Vadot 74f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/dev/agp 75f61a3898SEmmanuel VadotAGP= agpreg.h 76f61a3898SEmmanuel VadotAGPDIR= ${INCLUDEDIR}/dev/agp 77f61a3898SEmmanuel Vadot 7840745025SEmmanuel Vadot.PATH: ${SRCTOP}/sys/bsm 7940745025SEmmanuel VadotBSM= audit.h \ 8040745025SEmmanuel Vadot audit_errno.h \ 8140745025SEmmanuel Vadot audit_internal.h \ 8240745025SEmmanuel Vadot audit_record.h \ 8340745025SEmmanuel Vadot audit_domain.h \ 8440745025SEmmanuel Vadot audit_fcntl.h \ 8540745025SEmmanuel Vadot audit_kevents.h \ 8640745025SEmmanuel Vadot audit_socket_type.h 8740745025SEmmanuel VadotBSMPACKAGE= libbsm 8840745025SEmmanuel VadotBSMDIR= ${INCLUDEDIR}/bsm 8940745025SEmmanuel Vadot 9040745025SEmmanuel Vadot.PATH: ${SRCTOP}/sys/security/audit 9140745025SEmmanuel VadotSECAUDIT= audit.h \ 9240745025SEmmanuel Vadot audit_ioctl.h \ 9340745025SEmmanuel Vadot audit_private.h 9440745025SEmmanuel VadotSECAUDITPACKAGE= libbsm 9540745025SEmmanuel VadotSECAUDITDIR= ${INCLUDEDIR}/security/audit 9640745025SEmmanuel Vadot 97577dfb1cSEmmanuel Vadot.PATH: ${SRCTOP}/sys/cam 98577dfb1cSEmmanuel VadotCAM= cam.h \ 99577dfb1cSEmmanuel Vadot cam_ccb.h \ 100577dfb1cSEmmanuel Vadot cam_compat.h \ 101577dfb1cSEmmanuel Vadot cam_debug.h \ 102577dfb1cSEmmanuel Vadot cam_iosched.h \ 103577dfb1cSEmmanuel Vadot cam_periph.h \ 104577dfb1cSEmmanuel Vadot cam_queue.h \ 105577dfb1cSEmmanuel Vadot cam_sim.h \ 106577dfb1cSEmmanuel Vadot cam_xpt.h \ 107577dfb1cSEmmanuel Vadot cam_xpt_internal.h \ 108577dfb1cSEmmanuel Vadot cam_xpt_periph.h \ 109577dfb1cSEmmanuel Vadot cam_xpt_sim.h 110577dfb1cSEmmanuel VadotCAMDIR= ${INCLUDEDIR}/cam 111577dfb1cSEmmanuel Vadot 112577dfb1cSEmmanuel Vadot.PATH: ${SRCTOP}/sys/cam/ata 113577dfb1cSEmmanuel VadotCAMATA= ata_all.h 114577dfb1cSEmmanuel VadotCAMATADIR= ${INCLUDEDIR}/cam/ata 115577dfb1cSEmmanuel Vadot 116577dfb1cSEmmanuel Vadot.PATH: ${SRCTOP}/sys/cam/mmc 117577dfb1cSEmmanuel VadotCAMMMC= mmc.h \ 118577dfb1cSEmmanuel Vadot mmc_bus.h \ 119577dfb1cSEmmanuel Vadot mmc_all.h 120577dfb1cSEmmanuel VadotCAMMMCDIR= ${INCLUDEDIR}/cam/mmc 121577dfb1cSEmmanuel Vadot 122577dfb1cSEmmanuel Vadot.PATH: ${SRCTOP}/sys/cam/nvme 123577dfb1cSEmmanuel VadotCAMNVME= nvme_all.h 124577dfb1cSEmmanuel VadotCAMNVMEDIR= ${INCLUDEDIR}/cam/nvme 125577dfb1cSEmmanuel Vadot 126577dfb1cSEmmanuel Vadot.PATH: ${SRCTOP}/sys/cam/scsi 127577dfb1cSEmmanuel VadotCAMSCSI= scsi_all.h \ 128577dfb1cSEmmanuel Vadot scsi_cd.h \ 129577dfb1cSEmmanuel Vadot scsi_ch.h \ 130577dfb1cSEmmanuel Vadot scsi_da.h \ 131577dfb1cSEmmanuel Vadot scsi_enc.h \ 132577dfb1cSEmmanuel Vadot scsi_enc_internal.h \ 133577dfb1cSEmmanuel Vadot scsi_iu.h \ 134577dfb1cSEmmanuel Vadot scsi_message.h \ 135577dfb1cSEmmanuel Vadot scsi_pass.h \ 136577dfb1cSEmmanuel Vadot scsi_pt.h \ 137577dfb1cSEmmanuel Vadot scsi_sa.h \ 138577dfb1cSEmmanuel Vadot scsi_ses.h \ 139577dfb1cSEmmanuel Vadot scsi_sg.h \ 140577dfb1cSEmmanuel Vadot scsi_targetio.h \ 141577dfb1cSEmmanuel Vadot smp_all.h 142577dfb1cSEmmanuel VadotCAMSCSIDIR= ${INCLUDEDIR}/cam/scsi 143577dfb1cSEmmanuel Vadot 144f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/fs/cd9660 145f61a3898SEmmanuel VadotFS9660= cd9660_mount.h \ 146f61a3898SEmmanuel Vadot cd9660_node.h \ 147f61a3898SEmmanuel Vadot cd9660_rrip.h \ 148f61a3898SEmmanuel Vadot iso.h \ 149f61a3898SEmmanuel Vadot iso_rrip.h 150f61a3898SEmmanuel VadotFS9660DIR= ${INCLUDEDIR}/isofs/cd9660 151f61a3898SEmmanuel Vadot 152f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/dev/evdev 153f61a3898SEmmanuel VadotEVDEV= input.h \ 154f61a3898SEmmanuel Vadot input-event-codes.h \ 155f61a3898SEmmanuel Vadot uinput.h 156f61a3898SEmmanuel VadotEVDEVDIR= ${INCLUDEDIR}/dev/evdev 157f61a3898SEmmanuel Vadot 15867de2db2SVladimir Kondratyev.PATH: ${SRCTOP}/sys/dev/hid 15994773907SVladimir KondratyevHID= hid.h \ 16094773907SVladimir Kondratyev hidraw.h 16167de2db2SVladimir KondratyevHIDDIR= ${INCLUDEDIR}/dev/hid 16267de2db2SVladimir Kondratyev 163f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/dev/hyperv/include ${SRCTOP}/sys/dev/hyperv/utilities 164f61a3898SEmmanuel VadotHYPERV= hv_snapshot.h \ 165f61a3898SEmmanuel Vadot hyperv.h 166f61a3898SEmmanuel VadotHYPERVDIR= ${INCLUDEDIR}/dev/hyperv 167f61a3898SEmmanuel Vadot 168f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/opencrypto 16977ffc939SJohn BaldwinOPENCRYPTO= cryptodev.h 170f61a3898SEmmanuel VadotOPENCRYPTODIR= ${INCLUDEDIR}/crypto 171f61a3898SEmmanuel Vadot 172f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/dev/pci 173f61a3898SEmmanuel VadotPCI= pcireg.h 174f61a3898SEmmanuel VadotPCIDIR= ${INCLUDEDIR}/dev/pci 175f61a3898SEmmanuel Vadot 176f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/dev/veriexec 177f61a3898SEmmanuel VadotVERIEXEC= veriexec_ioctl.h 178f61a3898SEmmanuel VadotVERIEXECDIR= ${INCLUDEDIR}/dev/veriexec 179f61a3898SEmmanuel Vadot 180*5729ebbaSCy Schubert.PATH: ${SRCTOP}/sys/netpfil/ipfilter/netinet 181f61a3898SEmmanuel VadotIPFILTER= ip_auth.h \ 182f61a3898SEmmanuel Vadot ip_compat.h \ 183f61a3898SEmmanuel Vadot ip_dstlist.h \ 184f61a3898SEmmanuel Vadot ip_fil.h \ 185f61a3898SEmmanuel Vadot ip_frag.h \ 186f61a3898SEmmanuel Vadot ip_htable.h \ 187f61a3898SEmmanuel Vadot ip_lookup.h \ 188f61a3898SEmmanuel Vadot ip_nat.h \ 189f61a3898SEmmanuel Vadot ip_pool.h \ 190f61a3898SEmmanuel Vadot ip_proxy.h \ 191f61a3898SEmmanuel Vadot ip_rules.h \ 192f61a3898SEmmanuel Vadot ip_scan.h \ 193f61a3898SEmmanuel Vadot ip_state.h \ 194f61a3898SEmmanuel Vadot ip_sync.h \ 195f61a3898SEmmanuel Vadot ipf_rb.h \ 196f61a3898SEmmanuel Vadot ipl.h \ 197f61a3898SEmmanuel Vadot radix_ipf.h 198f61a3898SEmmanuel VadotIPFILTERDIR= ${INCLUDEDIR}/netinet 199f61a3898SEmmanuel Vadot 200f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/netpfil/pf 201f61a3898SEmmanuel VadotPF= pf.h \ 202f61a3898SEmmanuel Vadot pf_altq.h \ 203f61a3898SEmmanuel Vadot pf_mtag.h 204f61a3898SEmmanuel VadotPFPACKAGE= pf 205f61a3898SEmmanuel VadotPFDIR= ${INCLUDEDIR}/netpfil/pf 206f61a3898SEmmanuel Vadot 207f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/rpc 208f61a3898SEmmanuel VadotRPC= rpcsec_tls.h \ 209f61a3898SEmmanuel Vadot types.h 210f61a3898SEmmanuel VadotRPCDIR= ${INCLUDEDIR}/rpc 211f61a3898SEmmanuel Vadot 212f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/teken 213f61a3898SEmmanuel VadotTEKEN= teken.h 214f61a3898SEmmanuel VadotTEKENDIR= ${INCLUDEDIR}/teken 215f61a3898SEmmanuel Vadot 216f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/contrib/openzfs/include/sys 217f61a3898SEmmanuel VadotNVPAIR= nvpair.h 218f61a3898SEmmanuel VadotNVPAIRDIR= ${INCLUDEDIR}/sys 219f61a3898SEmmanuel Vadot 220f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/dev/mlx5 221f61a3898SEmmanuel VadotMLX5= mlx5io.h 222f61a3898SEmmanuel VadotMLX5DIR= ${INCLUDEDIR}/dev/mlx5 223f61a3898SEmmanuel Vadot 224f61a3898SEmmanuel VadotINCSGROUPS= INCS \ 225f61a3898SEmmanuel Vadot ACPICA \ 226f61a3898SEmmanuel Vadot AGP \ 227ba56ee36SEmmanuel Vadot BSM \ 228577dfb1cSEmmanuel Vadot CAM \ 229577dfb1cSEmmanuel Vadot CAMATA \ 230577dfb1cSEmmanuel Vadot CAMMMC \ 231577dfb1cSEmmanuel Vadot CAMNVME \ 232577dfb1cSEmmanuel Vadot CAMSCSI \ 233f61a3898SEmmanuel Vadot CRYPTO \ 234f61a3898SEmmanuel Vadot EVDEV \ 235f61a3898SEmmanuel Vadot FS9660 \ 23667de2db2SVladimir Kondratyev HID \ 237f61a3898SEmmanuel Vadot HYPERV \ 238f61a3898SEmmanuel Vadot OPENCRYPTO \ 239f61a3898SEmmanuel Vadot PCI \ 240f61a3898SEmmanuel Vadot RPC \ 241ba56ee36SEmmanuel Vadot SECAUDIT \ 242f61a3898SEmmanuel Vadot TEKEN \ 243f61a3898SEmmanuel Vadot VERIEXEC 244f61a3898SEmmanuel Vadot 245f61a3898SEmmanuel Vadot.if ${MK_IPFILTER} != "no" 246f61a3898SEmmanuel VadotINCSGROUPS+= IPFILTER 247f61a3898SEmmanuel Vadot.endif 248f61a3898SEmmanuel Vadot 249f61a3898SEmmanuel Vadot.if ${MK_PF} != "no" 250f61a3898SEmmanuel VadotINCSGROUPS+= PF 251f61a3898SEmmanuel Vadot.endif 252f61a3898SEmmanuel Vadot 253f61a3898SEmmanuel Vadot.if ${MK_CDDL} != "no" 254f61a3898SEmmanuel VadotINCSGROUPS+= NVPAIR 255f61a3898SEmmanuel Vadot.endif 256f61a3898SEmmanuel Vadot 257f61a3898SEmmanuel Vadot.if ${MK_MLX5TOOL} != "no" 258f61a3898SEmmanuel VadotINCSGROUPS+= MLX5 259f61a3898SEmmanuel Vadot.endif 260f61a3898SEmmanuel Vadot 2617e4a2c28SEnji Cooper.if ${MK_BLUETOOTH} != "no" 2627e4a2c28SEnji CooperLSUBSUBDIRS+= netgraph/bluetooth/include 2637e4a2c28SEnji Cooper.endif 2647e4a2c28SEnji Cooper 2658b77741eSEnji Cooper.if ${MK_CUSE} != "no" 2668b77741eSEnji CooperLSUBDIRS+= fs/cuse 2678b77741eSEnji Cooper.endif 2688b77741eSEnji Cooper 269dd987372STijl Coosemans.if ${MK_GSSAPI} != "no" 270dd987372STijl CoosemansSUBDIR+= gssapi 271dd987372STijl CoosemansINCS+= gssapi.h 272dd987372STijl Coosemans.endif 273dd987372STijl Coosemans 274e1fe3dbaSRuslan Ermilov.if ${MK_HESIOD} != "no" 2753d86554cSPoul-Henning KampINCS+= hesiod.h 2763d86554cSPoul-Henning Kamp.endif 2773d86554cSPoul-Henning Kamp 2780ff204bbSPeter Wemm# Handle the #define aliases for libiconv 2790ff204bbSPeter Wemm.if ${MK_ICONV} == "yes" 280912ce912SPeter WemmINCS+= iconv.h 2810ff204bbSPeter Wemm.endif 2820ff204bbSPeter Wemm 2837e4a2c28SEnji Cooper.if ${MK_USB} != "no" 2847e4a2c28SEnji CooperLSUBDIRS+= dev/usb 2857e4a2c28SEnji Cooper.endif 2867e4a2c28SEnji Cooper 287b963e10dSBrandon Bergren.if ${MACHINE_CPUARCH} == "powerpc" && ${MACHINE_ARCH} != "powerpcspe" 2887e4a2c28SEnji Cooper_dev_powermac_nvram= dev/powermac_nvram 2897e4a2c28SEnji Cooper.endif 2900ff204bbSPeter Wemm 29115f3c66cSMarcel Moolenaar# Define SHARED to indicate whether you want symbolic links to the system 29215f3c66cSMarcel Moolenaar# source (``symlinks''), or a separate copy (``copies''). ``symlinks'' is 29315f3c66cSMarcel Moolenaar# probably only useful for developers and should be avoided if you do not 29415f3c66cSMarcel Moolenaar# wish to tie your /usr/include and /usr/src together. 29515f3c66cSMarcel Moolenaar#SHARED= symlinks 29615f3c66cSMarcel MoolenaarSHARED?= copies 29759deaec5SRodney W. Grimes 298c7b111cbSRuslan ErmilovINCS+= osreldate.h 2993672faeaSPeter Wemm 30028d60d6aSWarner LoshSYSDIR= ${SRCTOP}/sys 3010210509aSIan LeporeNEWVERS_SH= ${SYSDIR}/conf/newvers.sh 3020210509aSIan LeporePARAM_H= ${SYSDIR}/sys/param.h 303bfe5c479SIan LeporeMK_OSRELDATE_SH= ${.CURDIR}/mk-osreldate.sh 304bfe5c479SIan Lepore 30534ecf418SBryan DrewerySYMLINKS+= ${LIBDIR:C,[^/]+,..,g:C,^/,,}${INCLUDEDIR} ${LIBDIR}/include 306d32e83c2SBryan Drewery 3078e8319a6SBryan Dreweryosreldate.h: ${NEWVERS_SH} ${PARAM_H} ${MK_OSRELDATE_SH} 3088e8319a6SBryan Drewery env NEWVERS_SH=${NEWVERS_SH} PARAMFILE=${PARAM_H} SYSDIR=${SYSDIR} \ 309dd5f1297SIan Lepore sh ${MK_OSRELDATE_SH} 3103672faeaSPeter Wemm 311a7aaf57eSRuslan Ermilov.for i in ${LHDRS} 312c7b111cbSRuslan ErmilovINCSLINKS+= sys/$i ${INCLUDEDIR}/$i 31302cca882SMarcel Moolenaar.endfor 314a7aaf57eSRuslan Ermilov.for i in ${MHDRS} 315c7b111cbSRuslan ErmilovINCSLINKS+= machine/$i ${INCLUDEDIR}/$i 31602cca882SMarcel Moolenaar.endfor 317a7aaf57eSRuslan Ermilov.for i in ${PHDRS} 3186aeb05d7STom RhodesINCSLINKS+= sys/$i ${INCLUDEDIR}/$i 31902cca882SMarcel Moolenaar.endfor 32015f3c66cSMarcel Moolenaar 32125faff34SWarner Losh.if ${MACHINE} != ${MACHINE_CPUARCH} 322544de89dSJohn Baldwin_MARCHS= ${MACHINE_CPUARCH} 323544de89dSJohn Baldwin.endif 324544de89dSJohn Baldwin.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" 325544de89dSJohn Baldwin_MARCHS+= x86 3268f3e5dd0SWarner Losh.endif 3278f3e5dd0SWarner Losh 3289ea89f32SBryan DreweryMETA_TARGETS+= compat 329f883c0adSBryan Drewerystage_includes: ${SHARED} 330c99b67a7SBryan DrewerySDESTDIR= ${SYSROOT:U${DESTDIR}} 3317750ad47SMarcel Moolenaar 332a270eca5SBruce Evans# Take care of stale directory-level symlinks. 3338d30571dSAlex Richardson# Note: The "|| true" after find is needed in case one of the directories does 3348d30571dSAlex Richardson# not exist (yet). 33594086ceaSBryan Drewerycompat: 3368d30571dSAlex Richardson cd ${SDESTDIR}${INCLUDEDIR}; find ${LDIRS} ${LSUBDIRS} machine ${_MARCHS} \ 3378d30571dSAlex Richardson crypto -maxdepth 0 -mindepth 0 -type l -print -delete || true 338a52fd948SAlex Richardson mtree -deU ${NO_ROOT:D-W} ${MTREE_FOLLOWS_SYMLINKS} \ 33928d60d6aSWarner Losh -f ${SRCTOP}/etc/mtree/BSD.include.dist \ 340c99b67a7SBryan Drewery -p ${SDESTDIR}${INCLUDEDIR} > /dev/null 341a270eca5SBruce Evans 3429ea89f32SBryan Drewerycopies: .PHONY .META 3438d30571dSAlex Richardson cd ${SDESTDIR}${INCLUDEDIR}; find ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} crypto \ 3448d30571dSAlex Richardson machine machine/pc ${_MARCHS} -maxdepth 1 -mindepth 1 -type l \ 3458d30571dSAlex Richardson -name "*.h" -print -delete || true 34667de2db2SVladimir Kondratyev.for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/evdev:Ndev/hid:Ndev/hyperv:Ndev/pci:Ndev/veriexec} ${LSUBSUBDIRS} 34728d60d6aSWarner Losh cd ${SRCTOP}/sys; \ 348bf24694cSGlen Barber ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \ 349c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/$i 35015f3c66cSMarcel Moolenaar.endfor 35128d60d6aSWarner Losh cd ${SRCTOP}/sys/${MACHINE}/include; \ 352bf24694cSGlen Barber ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 353c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/machine 35428d60d6aSWarner Losh.if exists(${SRCTOP}/sys/${MACHINE}/include/pc) 35528d60d6aSWarner Losh cd ${SRCTOP}/sys/${MACHINE}/include/pc; \ 356bf24694cSGlen Barber ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 357c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/machine/pc 3589f1207d5SRuslan Ermilov.endif 359544de89dSJohn Baldwin.for _MARCH in ${_MARCHS} 36028d60d6aSWarner Losh.if exists(${SRCTOP}/sys/${_MARCH}/include) 361bf24694cSGlen Barber ${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \ 362c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/${_MARCH}; \ 36328d60d6aSWarner Losh cd ${SRCTOP}/sys/${_MARCH}/include; \ 364bf24694cSGlen Barber ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 365c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/${_MARCH} 36628d60d6aSWarner Losh.if exists(${SRCTOP}/sys/${_MARCH}/include/pc) 367bf24694cSGlen Barber ${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \ 368c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \ 36928d60d6aSWarner Losh cd ${SRCTOP}/sys/${_MARCH}/include/pc; \ 370bf24694cSGlen Barber ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 371c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc 3728f3e5dd0SWarner Losh.endif 3738f3e5dd0SWarner Losh.endif 374544de89dSJohn Baldwin.endfor 37559deaec5SRodney W. Grimes 3769ea89f32SBryan Drewerysymlinks: .PHONY .META 37715f3c66cSMarcel Moolenaar @${ECHO} "Setting up symlinks to kernel source tree..." 378400dc950SPeter Wemm.for i in ${LDIRS} 3797b0d3a3cSAlex Richardson cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 3807b0d3a3cSAlex Richardson $$(printf '../../../%s ' sys/$i/*.h) ${SDESTDIR}${INCLUDEDIR}/$i 38115f3c66cSMarcel Moolenaar.endfor 38267de2db2SVladimir Kondratyev.for i in ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/evdev:Ndev/hid:Ndev/hyperv:Ndev/pci:Ndev/veriexec} 3837b0d3a3cSAlex Richardson cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 3847b0d3a3cSAlex Richardson $$(printf '../../../../%s ' sys/$i/*.h) ${SDESTDIR}${INCLUDEDIR}/$i 385400dc950SPeter Wemm.endfor 3867b0d3a3cSAlex Richardson ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 3877b0d3a3cSAlex Richardson $$(printf '../../../../sys/dev/acpica/%s ' acpiio.h acpi_hpet.h) \ 388c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/dev/acpica; \ 3897b0d3a3cSAlex Richardson ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/agp/agpreg.h \ 390c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/dev/agp; \ 3917b0d3a3cSAlex Richardson ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 3927b0d3a3cSAlex Richardson $$(printf '../../../../sys/dev/evdev/%s ' input.h input-event-codes.h uinput.h) \ 3937b0d3a3cSAlex Richardson ${SDESTDIR}${INCLUDEDIR}/dev/evdev; 39494773907SVladimir Kondratyev ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 39594773907SVladimir Kondratyev $$(printf '../../../../sys/dev/hid/%s ' hid.h hidraw.h) \ 39667de2db2SVladimir Kondratyev ${SDESTDIR}${INCLUDEDIR}/dev/hid; \ 3977b0d3a3cSAlex Richardson ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/hyperv/include/hyperv.h \ 398c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/dev/hyperv; \ 3997b0d3a3cSAlex Richardson ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/hyperv/utilities/hv_snapshot.h \ 400c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/dev/hyperv; \ 4017b0d3a3cSAlex Richardson ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/pci/pcireg.h \ 402c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/dev/pci; \ 4037b0d3a3cSAlex Richardson ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/veriexec/veriexec_ioctl.h \ 4047b0d3a3cSAlex Richardson ${SDESTDIR}${INCLUDEDIR}/dev/veriexec; 405a270eca5SBruce Evans.for i in ${LSUBSUBDIRS} 4067b0d3a3cSAlex Richardson cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 4077b0d3a3cSAlex Richardson $$(printf '../../../../../%s ' sys/$i/*.h) ${SDESTDIR}${INCLUDEDIR}/$i 408a270eca5SBruce Evans.endfor 409e1fe3dbaSRuslan Ermilov.if ${MK_IPFILTER} != "no" 4107b0d3a3cSAlex Richardson cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 411*5729ebbaSCy Schubert $$(printf '../../../%s ' sys/netpfil/ipfilter/netinet/*.h) \ 4127b0d3a3cSAlex Richardson ${SDESTDIR}${INCLUDEDIR}/netinet; 413f98a656cSScott Long.endif 41475bf2db3SGleb Smirnoff.if ${MK_PF} != "no" 4157b0d3a3cSAlex Richardson cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 4167b0d3a3cSAlex Richardson $$(printf '../../../../%s ' sys/netpfil/pf/*.h) \ 4177b0d3a3cSAlex Richardson ${SDESTDIR}${INCLUDEDIR}/netpfil/pf; 41875bf2db3SGleb Smirnoff.endif 41977ffc939SJohn Baldwin ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../sys/opencrypto/cryptodev.h \ 420c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/crypto; \ 4217b0d3a3cSAlex Richardson cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 4227b0d3a3cSAlex Richardson $$(printf '../../../%s ' sys/${MACHINE}/include/*.h) \ 4237b0d3a3cSAlex Richardson ${SDESTDIR}${INCLUDEDIR}/machine; 42428d60d6aSWarner Losh.if exists(${SRCTOP}/sys/${MACHINE}/include/pc) 4257b0d3a3cSAlex Richardson cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 4267b0d3a3cSAlex Richardson $$(printf '../../../../%s ' sys/${MACHINE}/include/pc/*.h) \ 4277b0d3a3cSAlex Richardson ${SDESTDIR}${INCLUDEDIR}/machine/pc; 428a270eca5SBruce Evans.endif 429544de89dSJohn Baldwin.for _MARCH in ${_MARCHS} 43028d60d6aSWarner Losh.if exists(${SRCTOP}/sys/${_MARCH}/include) 431b6cc6932SEmmanuel Vadot ${INSTALL} -d ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 755 \ 432c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/${_MARCH}; \ 4337b0d3a3cSAlex Richardson cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 4347b0d3a3cSAlex Richardson $$(printf '../../../%s ' sys/${_MARCH}/include/*.h) \ 4357b0d3a3cSAlex Richardson ${SDESTDIR}${INCLUDEDIR}/${_MARCH}; 43628d60d6aSWarner Losh.if exists(${SRCTOP}/sys/${_MARCH}/include/pc) 437b6cc6932SEmmanuel Vadot ${INSTALL} -d ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 755 \ 438c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \ 4397b0d3a3cSAlex Richardson cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 4407b0d3a3cSAlex Richardson $$(printf '../../../../%s ' sys/${_MARCH}/include/pc/*.h) \ 4417b0d3a3cSAlex Richardson ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc; 4428f3e5dd0SWarner Losh.endif 4438f3e5dd0SWarner Losh.endif 444544de89dSJohn Baldwin.endfor 4457b0d3a3cSAlex Richardson cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 4467b0d3a3cSAlex Richardson $$(printf '../../../../%s ' sys/fs/cd9660/*.h) \ 447c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/isofs/cd9660; \ 4487b0d3a3cSAlex Richardson cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 4497b0d3a3cSAlex Richardson $$(printf '../../../sys/rpc/%s ' rpcsec_tls.h types.h) \ 4507b0d3a3cSAlex Richardson ${SDESTDIR}${INCLUDEDIR}/rpc; 4517b0d3a3cSAlex Richardson cd ${SRCTOP}/sys/rpc; 452cd87846eSKyle Evans.if ${MK_CDDL} != "no" 453b6cc6932SEmmanuel Vadot ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 45474eb7f97SAlex Richardson ../../../sys/contrib/openzfs/include/sys/nvpair.h \ 455cd87846eSKyle Evans ${SDESTDIR}${INCLUDEDIR}/sys 456cd87846eSKyle Evans.endif 457e808190aSHans Petter Selasky.if ${MK_MLX5TOOL} != "no" 458b6cc6932SEmmanuel Vadot ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/mlx5/mlx5io.h \ 459e808190aSHans Petter Selasky ${SDESTDIR}${INCLUDEDIR}/dev/mlx5 460e808190aSHans Petter Selasky.endif 4611a682d2cSSimon J. Gerraty 46294086ceaSBryan Drewery.include <bsd.prog.mk> 46394086ceaSBryan Drewery 46494086ceaSBryan Dreweryinstallincludes: ${SHARED} 46594086ceaSBryan Drewery${SHARED}: compat 46694086ceaSBryan Drewery 467dbf5bd50SBryan Drewery.if ${MACHINE} == "host" && !defined(_SKIP_BUILD) 4681a682d2cSSimon J. Gerraty# we're here because we are building a sysroot... 4691a682d2cSSimon J. Gerraty# we need MACHINE et al set correctly 4701a682d2cSSimon J. GerratyHOST_MACHINE!= uname -m 4711a682d2cSSimon J. GerratyHOST_MACHINE_ARCH!= uname -p 4721a682d2cSSimon J. GerratyMACHINE:= ${HOST_MACHINE} 4731a682d2cSSimon J. GerratyMACHINE_ARCH:= ${HOST_MACHINE_ARCH} 4741a682d2cSSimon J. Gerraty.endif 475