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 \ 239b0f1823SDavid Xu res_update.h resolv.h runetype.h search.h semaphore.h setjmp.h \ 2406bee445SEd Schouten signal.h spawn.h stab.h stdalign.h stdbool.h stddef.h \ 25367bebd4SEd Schouten stdnoreturn.h stdio.h stdlib.h string.h stringlist.h \ 26f14ad5faSEd Schouten strings.h sysexits.h tar.h termios.h tgmath.h \ 27b902e8b2SStefan Farfeleder time.h timeconv.h timers.h ttyent.h \ 2850c77c6eSEd Schouten uchar.h ulimit.h unistd.h utime.h utmpx.h uuid.h varargs.h \ 29a8ed63bbSDavid Chisnall wchar.h wctype.h wordexp.h xlocale.h 3059deaec5SRodney W. Grimes 3128d60d6aSWarner Losh.PATH: ${SRCTOP}/contrib/libc-vis 328ccca122SBrooks DavisINCS+= vis.h 338ccca122SBrooks Davis 34fefa0fd5SAlexander KabaevMHDRS= float.h floatingpoint.h stdarg.h 35917e476dSPeter Dufault 369b0f1823SDavid XuPHDRS= sched.h _semaphore.h 37917e476dSPeter Dufault 3806bee445SEd SchoutenLHDRS= aio.h errno.h fcntl.h linker_set.h poll.h stdatomic.h stdint.h \ 3906bee445SEd Schouten syslog.h ucontext.h 4059deaec5SRodney W. Grimes 410594b287SEmmanuel VadotLDIRS= geom net net80211 netgraph netinet netinet6 \ 42a7dc3128SBrooks Davis netipsec netsmb nfs nfsclient nfsserver sys vm 4315f3c66cSMarcel Moolenaar 44*060f0a17SEmmanuel VadotLSUBDIRS= dev/acpica dev/agp dev/an dev/ciss dev/filemon dev/firewire \ 45*060f0a17SEmmanuel Vadot dev/hwpmc dev/hyperv \ 46*060f0a17SEmmanuel Vadot dev/ic dev/iicbus dev/if_wg dev/io dev/mfi dev/mmc dev/nvme \ 47*060f0a17SEmmanuel Vadot dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/pwm \ 48*060f0a17SEmmanuel Vadot dev/smbus dev/speaker dev/tcp_log dev/veriexec dev/vkbd \ 49f5a95d9aSWarner Losh fs/devfs fs/fdescfs fs/msdosfs fs/nfs fs/nullfs \ 50237abf0cSDavide Italiano fs/procfs fs/smbfs fs/udf fs/unionfs \ 51f348204cSPawel Jakub Dawidek geom/cache geom/concat geom/eli geom/gate geom/journal geom/label \ 52b3f9d8c8SEdward Tomasz Napierala geom/mirror geom/mountver geom/multipath geom/nop \ 5389b17223SAlexander Motin geom/raid geom/raid3 geom/shsec geom/stripe geom/virstor \ 54772e66a6SGleb Smirnoff net/altq \ 55a6663252SAlexander V. Chernikov net/route \ 56fdbe44b0SGleb Smirnoff netgraph/atm netgraph/netflow \ 57d519cedbSGleb Smirnoff netinet/cc \ 58e5054602SMark Johnston netinet/netdump \ 59d371ed1cSOlivier Cochard netinet/tcp_stacks \ 60fdbe44b0SGleb Smirnoff security/mac_biba security/mac_bsdextended security/mac_lomac \ 61fdbe44b0SGleb Smirnoff security/mac_mls security/mac_partition \ 62eb12b8eaSSimon J. Gerraty security/mac_veriexec \ 6350875ed2SMarcel Moolenaar sys/disk \ 6451be47e4SMark Murray ufs/ffs ufs/ufs 6515f3c66cSMarcel Moolenaar 6611c63edeSAndrew ThompsonLSUBSUBDIRS= dev/mpt/mpilib 67c16e2101SJohn Baldwin 68f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/dev/acpica 69f61a3898SEmmanuel VadotACPICA= acpi_hpet.h \ 70f61a3898SEmmanuel Vadot acpiio.h 71f61a3898SEmmanuel VadotACPICADIR= ${INCLUDEDIR}/dev/acpica 72f61a3898SEmmanuel Vadot 73f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/dev/agp 74f61a3898SEmmanuel VadotAGP= agpreg.h 75f61a3898SEmmanuel VadotAGPDIR= ${INCLUDEDIR}/dev/agp 76f61a3898SEmmanuel Vadot 778c3eaf24SEmmanuel Vadot.PATH: ${SRCTOP}/sys/bsm 788c3eaf24SEmmanuel VadotBSM= audit.h \ 798c3eaf24SEmmanuel Vadot audit_errno.h \ 808c3eaf24SEmmanuel Vadot audit_internal.h \ 818c3eaf24SEmmanuel Vadot audit_record.h \ 828c3eaf24SEmmanuel Vadot audit_domain.h \ 838c3eaf24SEmmanuel Vadot audit_fcntl.h \ 848c3eaf24SEmmanuel Vadot audit_kevents.h \ 858c3eaf24SEmmanuel Vadot audit_socket_type.h 868c3eaf24SEmmanuel VadotBSMPACKAGE= libbsm 878c3eaf24SEmmanuel VadotBSMDIR= ${INCLUDEDIR}/bsm 888c3eaf24SEmmanuel Vadot 898c3eaf24SEmmanuel Vadot.PATH: ${SRCTOP}/sys/security/audit 908c3eaf24SEmmanuel VadotSECAUDIT= audit.h \ 918c3eaf24SEmmanuel Vadot audit_ioctl.h \ 928c3eaf24SEmmanuel Vadot audit_private.h 938c3eaf24SEmmanuel VadotSECAUDITPACKAGE= libbsm 948c3eaf24SEmmanuel VadotSECAUDITDIR= ${INCLUDEDIR}/security/audit 958c3eaf24SEmmanuel Vadot 960594b287SEmmanuel Vadot.PATH: ${SRCTOP}/sys/cam 970594b287SEmmanuel VadotCAM= cam.h \ 980594b287SEmmanuel Vadot cam_ccb.h \ 990594b287SEmmanuel Vadot cam_compat.h \ 1000594b287SEmmanuel Vadot cam_debug.h \ 1010594b287SEmmanuel Vadot cam_iosched.h \ 1020594b287SEmmanuel Vadot cam_periph.h \ 1030594b287SEmmanuel Vadot cam_queue.h \ 1040594b287SEmmanuel Vadot cam_sim.h \ 1050594b287SEmmanuel Vadot cam_xpt.h \ 1060594b287SEmmanuel Vadot cam_xpt_internal.h \ 1070594b287SEmmanuel Vadot cam_xpt_periph.h \ 1080594b287SEmmanuel Vadot cam_xpt_sim.h 1090594b287SEmmanuel VadotCAMDIR= ${INCLUDEDIR}/cam 1100594b287SEmmanuel Vadot 1110594b287SEmmanuel Vadot.PATH: ${SRCTOP}/sys/cam/ata 1120594b287SEmmanuel VadotCAMATA= ata_all.h 1130594b287SEmmanuel VadotCAMATADIR= ${INCLUDEDIR}/cam/ata 1140594b287SEmmanuel Vadot 1150594b287SEmmanuel Vadot.PATH: ${SRCTOP}/sys/cam/mmc 1160594b287SEmmanuel VadotCAMMMC= mmc.h \ 1170594b287SEmmanuel Vadot mmc_bus.h \ 1180594b287SEmmanuel Vadot mmc_all.h 1190594b287SEmmanuel VadotCAMMMCDIR= ${INCLUDEDIR}/cam/mmc 1200594b287SEmmanuel Vadot 1210594b287SEmmanuel Vadot.PATH: ${SRCTOP}/sys/cam/nvme 1220594b287SEmmanuel VadotCAMNVME= nvme_all.h 1230594b287SEmmanuel VadotCAMNVMEDIR= ${INCLUDEDIR}/cam/nvme 1240594b287SEmmanuel Vadot 1250594b287SEmmanuel Vadot.PATH: ${SRCTOP}/sys/cam/scsi 1260594b287SEmmanuel VadotCAMSCSI= scsi_all.h \ 1270594b287SEmmanuel Vadot scsi_cd.h \ 1280594b287SEmmanuel Vadot scsi_ch.h \ 1290594b287SEmmanuel Vadot scsi_da.h \ 1300594b287SEmmanuel Vadot scsi_enc.h \ 1310594b287SEmmanuel Vadot scsi_enc_internal.h \ 1320594b287SEmmanuel Vadot scsi_iu.h \ 1330594b287SEmmanuel Vadot scsi_message.h \ 1340594b287SEmmanuel Vadot scsi_pass.h \ 1350594b287SEmmanuel Vadot scsi_pt.h \ 1360594b287SEmmanuel Vadot scsi_sa.h \ 1370594b287SEmmanuel Vadot scsi_ses.h \ 1380594b287SEmmanuel Vadot scsi_sg.h \ 1390594b287SEmmanuel Vadot scsi_targetio.h \ 1400594b287SEmmanuel Vadot smp_all.h 1410594b287SEmmanuel VadotCAMSCSIDIR= ${INCLUDEDIR}/cam/scsi 1420594b287SEmmanuel Vadot 143f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/fs/cd9660 144f61a3898SEmmanuel VadotFS9660= cd9660_mount.h \ 145f61a3898SEmmanuel Vadot cd9660_node.h \ 146f61a3898SEmmanuel Vadot cd9660_rrip.h \ 147f61a3898SEmmanuel Vadot iso.h \ 148f61a3898SEmmanuel Vadot iso_rrip.h 149f61a3898SEmmanuel VadotFS9660DIR= ${INCLUDEDIR}/isofs/cd9660 150f61a3898SEmmanuel Vadot 151f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/dev/evdev 152f61a3898SEmmanuel VadotEVDEV= input.h \ 153f61a3898SEmmanuel Vadot input-event-codes.h \ 154f61a3898SEmmanuel Vadot uinput.h 155f61a3898SEmmanuel VadotEVDEVDIR= ${INCLUDEDIR}/dev/evdev 156f61a3898SEmmanuel Vadot 15767de2db2SVladimir Kondratyev.PATH: ${SRCTOP}/sys/dev/hid 15894773907SVladimir KondratyevHID= hid.h \ 15994773907SVladimir Kondratyev hidraw.h 16067de2db2SVladimir KondratyevHIDDIR= ${INCLUDEDIR}/dev/hid 16167de2db2SVladimir Kondratyev 162f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/dev/hyperv/include ${SRCTOP}/sys/dev/hyperv/utilities 163f61a3898SEmmanuel VadotHYPERV= hv_snapshot.h \ 164f61a3898SEmmanuel Vadot hyperv.h 165f61a3898SEmmanuel VadotHYPERVDIR= ${INCLUDEDIR}/dev/hyperv 166f61a3898SEmmanuel Vadot 167f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/opencrypto 168283352ddSJohn BaldwinOPENCRYPTO= cryptodev.h 169f61a3898SEmmanuel VadotOPENCRYPTODIR= ${INCLUDEDIR}/crypto 170f61a3898SEmmanuel Vadot 171f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/dev/pci 172f61a3898SEmmanuel VadotPCI= pcireg.h 173f61a3898SEmmanuel VadotPCIDIR= ${INCLUDEDIR}/dev/pci 174f61a3898SEmmanuel Vadot 175f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/dev/veriexec 176f61a3898SEmmanuel VadotVERIEXEC= veriexec_ioctl.h 177f61a3898SEmmanuel VadotVERIEXECDIR= ${INCLUDEDIR}/dev/veriexec 178f61a3898SEmmanuel Vadot 179f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/contrib/ipfilter/netinet 180f61a3898SEmmanuel VadotIPFILTER= ip_auth.h \ 181f61a3898SEmmanuel Vadot ip_compat.h \ 182f61a3898SEmmanuel Vadot ip_dstlist.h \ 183f61a3898SEmmanuel Vadot ip_fil.h \ 184f61a3898SEmmanuel Vadot ip_frag.h \ 185f61a3898SEmmanuel Vadot ip_htable.h \ 186f61a3898SEmmanuel Vadot ip_lookup.h \ 187f61a3898SEmmanuel Vadot ip_nat.h \ 188f61a3898SEmmanuel Vadot ip_pool.h \ 189f61a3898SEmmanuel Vadot ip_proxy.h \ 190f61a3898SEmmanuel Vadot ip_rules.h \ 191f61a3898SEmmanuel Vadot ip_scan.h \ 192f61a3898SEmmanuel Vadot ip_state.h \ 193f61a3898SEmmanuel Vadot ip_sync.h \ 194f61a3898SEmmanuel Vadot ipf_rb.h \ 195f61a3898SEmmanuel Vadot ipl.h \ 196f61a3898SEmmanuel Vadot radix_ipf.h 197f61a3898SEmmanuel VadotIPFILTERDIR= ${INCLUDEDIR}/netinet 198f61a3898SEmmanuel Vadot 199f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/netpfil/pf 200f61a3898SEmmanuel VadotPF= pf.h \ 201f61a3898SEmmanuel Vadot pf_altq.h \ 202f61a3898SEmmanuel Vadot pf_mtag.h 203f61a3898SEmmanuel VadotPFPACKAGE= pf 204f61a3898SEmmanuel VadotPFDIR= ${INCLUDEDIR}/netpfil/pf 205f61a3898SEmmanuel Vadot 206f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/rpc 207f61a3898SEmmanuel VadotRPC= rpcsec_tls.h \ 208f61a3898SEmmanuel Vadot types.h 209f61a3898SEmmanuel VadotRPCDIR= ${INCLUDEDIR}/rpc 210f61a3898SEmmanuel Vadot 211f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/teken 212f61a3898SEmmanuel VadotTEKEN= teken.h 213f61a3898SEmmanuel VadotTEKENDIR= ${INCLUDEDIR}/teken 214f61a3898SEmmanuel Vadot 215f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/contrib/openzfs/include/sys 216f61a3898SEmmanuel VadotNVPAIR= nvpair.h 217f61a3898SEmmanuel VadotNVPAIRDIR= ${INCLUDEDIR}/sys 218f61a3898SEmmanuel Vadot 219f61a3898SEmmanuel Vadot.PATH: ${SRCTOP}/sys/dev/mlx5 220f61a3898SEmmanuel VadotMLX5= mlx5io.h 221f61a3898SEmmanuel VadotMLX5DIR= ${INCLUDEDIR}/dev/mlx5 222f61a3898SEmmanuel Vadot 22374ae3f3eSKyle Evans.PATH: ${SRCTOP}/sys/dev/if_wg 22474ae3f3eSKyle EvansWG= if_wg.h 22574ae3f3eSKyle EvansWGDIR= ${INCLUDEDIR}/dev/if_wg 22674ae3f3eSKyle Evans 227f61a3898SEmmanuel VadotINCSGROUPS= INCS \ 228f61a3898SEmmanuel Vadot ACPICA \ 229f61a3898SEmmanuel Vadot AGP \ 2300594b287SEmmanuel Vadot CAM \ 2310594b287SEmmanuel Vadot CAMATA \ 2320594b287SEmmanuel Vadot CAMMMC \ 2330594b287SEmmanuel Vadot CAMNVME \ 2340594b287SEmmanuel Vadot CAMSCSI \ 235f61a3898SEmmanuel Vadot CRYPTO \ 236f61a3898SEmmanuel Vadot EVDEV \ 237f61a3898SEmmanuel Vadot FS9660 \ 23867de2db2SVladimir Kondratyev HID \ 239f61a3898SEmmanuel Vadot HYPERV \ 240f61a3898SEmmanuel Vadot OPENCRYPTO \ 241f61a3898SEmmanuel Vadot PCI \ 242f61a3898SEmmanuel Vadot RPC \ 243f61a3898SEmmanuel Vadot TEKEN \ 24474ae3f3eSKyle Evans VERIEXEC \ 24574ae3f3eSKyle Evans WG 246f61a3898SEmmanuel Vadot 2478c3eaf24SEmmanuel Vadot.if ${MK_AUDIT} != "no" 2488c3eaf24SEmmanuel VadotINCSGROUPS+= BSM 2498c3eaf24SEmmanuel VadotINCSGROUPS+= SECAUDIT 2508c3eaf24SEmmanuel Vadot.endif 2518c3eaf24SEmmanuel Vadot 252f61a3898SEmmanuel Vadot.if ${MK_IPFILTER} != "no" 253f61a3898SEmmanuel VadotINCSGROUPS+= IPFILTER 254f61a3898SEmmanuel Vadot.endif 255f61a3898SEmmanuel Vadot 256f61a3898SEmmanuel Vadot.if ${MK_PF} != "no" 257f61a3898SEmmanuel VadotINCSGROUPS+= PF 258f61a3898SEmmanuel Vadot.endif 259f61a3898SEmmanuel Vadot 260f61a3898SEmmanuel Vadot.if ${MK_CDDL} != "no" 261f61a3898SEmmanuel VadotINCSGROUPS+= NVPAIR 262f61a3898SEmmanuel Vadot.endif 263f61a3898SEmmanuel Vadot 264f61a3898SEmmanuel Vadot.if ${MK_MLX5TOOL} != "no" 265f61a3898SEmmanuel VadotINCSGROUPS+= MLX5 266f61a3898SEmmanuel Vadot.endif 267f61a3898SEmmanuel Vadot 2687e4a2c28SEnji Cooper.if ${MK_BLUETOOTH} != "no" 2697e4a2c28SEnji CooperLSUBSUBDIRS+= netgraph/bluetooth/include 2707e4a2c28SEnji Cooper.endif 2717e4a2c28SEnji Cooper 2728b77741eSEnji Cooper.if ${MK_CUSE} != "no" 2738b77741eSEnji CooperLSUBDIRS+= fs/cuse 2748b77741eSEnji Cooper.endif 2758b77741eSEnji Cooper 276dd987372STijl Coosemans.if ${MK_GSSAPI} != "no" 277dd987372STijl CoosemansSUBDIR+= gssapi 278dd987372STijl CoosemansINCS+= gssapi.h 279dd987372STijl Coosemans.endif 280dd987372STijl Coosemans 281e1fe3dbaSRuslan Ermilov.if ${MK_HESIOD} != "no" 2823d86554cSPoul-Henning KampINCS+= hesiod.h 2833d86554cSPoul-Henning Kamp.endif 2843d86554cSPoul-Henning Kamp 2850ff204bbSPeter Wemm# Handle the #define aliases for libiconv 2860ff204bbSPeter Wemm.if ${MK_ICONV} == "yes" 287912ce912SPeter WemmINCS+= iconv.h 2880ff204bbSPeter Wemm.endif 2890ff204bbSPeter Wemm 2907e4a2c28SEnji Cooper.if ${MK_USB} != "no" 2917e4a2c28SEnji CooperLSUBDIRS+= dev/usb 2927e4a2c28SEnji Cooper.endif 2937e4a2c28SEnji Cooper 294b963e10dSBrandon Bergren.if ${MACHINE_CPUARCH} == "powerpc" && ${MACHINE_ARCH} != "powerpcspe" 2957e4a2c28SEnji Cooper_dev_powermac_nvram= dev/powermac_nvram 2967e4a2c28SEnji Cooper.endif 2970ff204bbSPeter Wemm 298*060f0a17SEmmanuel Vadot# Define SHARED to indicate whether you want symbolic links to the system 299*060f0a17SEmmanuel Vadot# source (``symlinks''), or a separate copy (``copies''). ``symlinks'' is 300*060f0a17SEmmanuel Vadot# probably only useful for developers and should be avoided if you do not 301*060f0a17SEmmanuel Vadot# wish to tie your /usr/include and /usr/src together. 302*060f0a17SEmmanuel Vadot#SHARED= symlinks 303*060f0a17SEmmanuel VadotSHARED?= copies 304*060f0a17SEmmanuel Vadot 305c7b111cbSRuslan ErmilovINCS+= osreldate.h 3063672faeaSPeter Wemm 30728d60d6aSWarner LoshSYSDIR= ${SRCTOP}/sys 3080210509aSIan LeporeNEWVERS_SH= ${SYSDIR}/conf/newvers.sh 3090210509aSIan LeporePARAM_H= ${SYSDIR}/sys/param.h 310bfe5c479SIan LeporeMK_OSRELDATE_SH= ${.CURDIR}/mk-osreldate.sh 311bfe5c479SIan Lepore 31234ecf418SBryan DrewerySYMLINKS+= ${LIBDIR:C,[^/]+,..,g:C,^/,,}${INCLUDEDIR} ${LIBDIR}/include 313d32e83c2SBryan Drewery 3148e8319a6SBryan Dreweryosreldate.h: ${NEWVERS_SH} ${PARAM_H} ${MK_OSRELDATE_SH} 3158e8319a6SBryan Drewery env NEWVERS_SH=${NEWVERS_SH} PARAMFILE=${PARAM_H} SYSDIR=${SYSDIR} \ 316dd5f1297SIan Lepore sh ${MK_OSRELDATE_SH} 3173672faeaSPeter Wemm 318a7aaf57eSRuslan Ermilov.for i in ${LHDRS} 319c7b111cbSRuslan ErmilovINCSLINKS+= sys/$i ${INCLUDEDIR}/$i 32002cca882SMarcel Moolenaar.endfor 321a7aaf57eSRuslan Ermilov.for i in ${MHDRS} 322c7b111cbSRuslan ErmilovINCSLINKS+= machine/$i ${INCLUDEDIR}/$i 32302cca882SMarcel Moolenaar.endfor 324a7aaf57eSRuslan Ermilov.for i in ${PHDRS} 3256aeb05d7STom RhodesINCSLINKS+= sys/$i ${INCLUDEDIR}/$i 32602cca882SMarcel Moolenaar.endfor 32715f3c66cSMarcel Moolenaar 32825faff34SWarner Losh.if ${MACHINE} != ${MACHINE_CPUARCH} 329544de89dSJohn Baldwin_MARCHS= ${MACHINE_CPUARCH} 330544de89dSJohn Baldwin.endif 331544de89dSJohn Baldwin.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" 332544de89dSJohn Baldwin_MARCHS+= x86 3338f3e5dd0SWarner Losh.endif 3348f3e5dd0SWarner Losh 335*060f0a17SEmmanuel VadotMETA_TARGETS+= compat 336*060f0a17SEmmanuel Vadotstage_includes: ${SHARED} 337c99b67a7SBryan DrewerySDESTDIR= ${SYSROOT:U${DESTDIR}} 3387750ad47SMarcel Moolenaar 339a270eca5SBruce Evans# Take care of stale directory-level symlinks. 3408d30571dSAlex Richardson# Note: The "|| true" after find is needed in case one of the directories does 3418d30571dSAlex Richardson# not exist (yet). 342*060f0a17SEmmanuel Vadotcompat: 3438d30571dSAlex Richardson cd ${SDESTDIR}${INCLUDEDIR}; find ${LDIRS} ${LSUBDIRS} machine ${_MARCHS} \ 3448d30571dSAlex Richardson crypto -maxdepth 0 -mindepth 0 -type l -print -delete || true 345a52fd948SAlex Richardson mtree -deU ${NO_ROOT:D-W} ${MTREE_FOLLOWS_SYMLINKS} \ 34628d60d6aSWarner Losh -f ${SRCTOP}/etc/mtree/BSD.include.dist \ 347c99b67a7SBryan Drewery -p ${SDESTDIR}${INCLUDEDIR} > /dev/null 348a270eca5SBruce Evans 349*060f0a17SEmmanuel Vadotcopies: .PHONY .META 3508d30571dSAlex Richardson cd ${SDESTDIR}${INCLUDEDIR}; find ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} crypto \ 3518d30571dSAlex Richardson machine machine/pc ${_MARCHS} -maxdepth 1 -mindepth 1 -type l \ 3528d30571dSAlex Richardson -name "*.h" -print -delete || true 353*060f0a17SEmmanuel Vadot.for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/evdev:Ndev/hid:Ndev/hyperv:Ndev/pci:Ndev/veriexec} ${LSUBSUBDIRS} 35428d60d6aSWarner Losh cd ${SRCTOP}/sys; \ 35535b6d9b6SEmmanuel Vadot ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \ 356c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/$i 35715f3c66cSMarcel Moolenaar.endfor 35828d60d6aSWarner Losh cd ${SRCTOP}/sys/${MACHINE}/include; \ 35935b6d9b6SEmmanuel Vadot ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 360c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/machine 36128d60d6aSWarner Losh.if exists(${SRCTOP}/sys/${MACHINE}/include/pc) 36228d60d6aSWarner Losh cd ${SRCTOP}/sys/${MACHINE}/include/pc; \ 36335b6d9b6SEmmanuel Vadot ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 364c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/machine/pc 3659f1207d5SRuslan Ermilov.endif 366544de89dSJohn Baldwin.for _MARCH in ${_MARCHS} 36728d60d6aSWarner Losh.if exists(${SRCTOP}/sys/${_MARCH}/include) 36835b6d9b6SEmmanuel Vadot ${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \ 369c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/${_MARCH}; \ 37028d60d6aSWarner Losh cd ${SRCTOP}/sys/${_MARCH}/include; \ 37135b6d9b6SEmmanuel Vadot ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 372c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/${_MARCH} 37328d60d6aSWarner Losh.if exists(${SRCTOP}/sys/${_MARCH}/include/pc) 37435b6d9b6SEmmanuel Vadot ${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \ 375c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \ 37628d60d6aSWarner Losh cd ${SRCTOP}/sys/${_MARCH}/include/pc; \ 37735b6d9b6SEmmanuel Vadot ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 378c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc 3798f3e5dd0SWarner Losh.endif 3808f3e5dd0SWarner Losh.endif 381544de89dSJohn Baldwin.endfor 38259deaec5SRodney W. Grimes 383*060f0a17SEmmanuel Vadotsymlinks: .PHONY .META 384*060f0a17SEmmanuel Vadot @${ECHO} "Setting up symlinks to kernel source tree..." 385*060f0a17SEmmanuel Vadot.for i in ${LDIRS} 386*060f0a17SEmmanuel Vadot cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 387*060f0a17SEmmanuel Vadot $$(printf '../../../%s ' sys/$i/*.h) ${SDESTDIR}${INCLUDEDIR}/$i 388*060f0a17SEmmanuel Vadot.endfor 389*060f0a17SEmmanuel Vadot.for i in ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/evdev:Ndev/hid:Ndev/hyperv:Ndev/pci:Ndev/veriexec} 390*060f0a17SEmmanuel Vadot cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 391*060f0a17SEmmanuel Vadot $$(printf '../../../../%s ' sys/$i/*.h) ${SDESTDIR}${INCLUDEDIR}/$i 392*060f0a17SEmmanuel Vadot.endfor 393*060f0a17SEmmanuel Vadot ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 394*060f0a17SEmmanuel Vadot $$(printf '../../../../sys/dev/acpica/%s ' acpiio.h acpi_hpet.h) \ 395*060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/dev/acpica; \ 396*060f0a17SEmmanuel Vadot ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/agp/agpreg.h \ 397*060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/dev/agp; \ 398*060f0a17SEmmanuel Vadot ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 399*060f0a17SEmmanuel Vadot $$(printf '../../../../sys/dev/evdev/%s ' input.h input-event-codes.h uinput.h) \ 400*060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/dev/evdev; 401*060f0a17SEmmanuel Vadot ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 402*060f0a17SEmmanuel Vadot $$(printf '../../../../sys/dev/hid/%s ' hid.h hidraw.h) \ 403*060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/dev/hid; \ 404*060f0a17SEmmanuel Vadot ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/hyperv/include/hyperv.h \ 405*060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/dev/hyperv; \ 406*060f0a17SEmmanuel Vadot ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/hyperv/utilities/hv_snapshot.h \ 407*060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/dev/hyperv; \ 408*060f0a17SEmmanuel Vadot ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/pci/pcireg.h \ 409*060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/dev/pci; \ 410*060f0a17SEmmanuel Vadot ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/veriexec/veriexec_ioctl.h \ 411*060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/dev/veriexec; 412*060f0a17SEmmanuel Vadot.for i in ${LSUBSUBDIRS} 413*060f0a17SEmmanuel Vadot cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 414*060f0a17SEmmanuel Vadot $$(printf '../../../../../%s ' sys/$i/*.h) ${SDESTDIR}${INCLUDEDIR}/$i 415*060f0a17SEmmanuel Vadot.endfor 416*060f0a17SEmmanuel Vadot.if ${MK_IPFILTER} != "no" 417*060f0a17SEmmanuel Vadot cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 418*060f0a17SEmmanuel Vadot $$(printf '../../../%s ' sys/contrib/ipfilter/netinet/*.h) \ 419*060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/netinet; 420*060f0a17SEmmanuel Vadot.endif 421*060f0a17SEmmanuel Vadot.if ${MK_PF} != "no" 422*060f0a17SEmmanuel Vadot cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 423*060f0a17SEmmanuel Vadot $$(printf '../../../../%s ' sys/netpfil/pf/*.h) \ 424*060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/netpfil/pf; 425*060f0a17SEmmanuel Vadot.endif 426*060f0a17SEmmanuel Vadot ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../sys/crypto/rijndael/rijndael.h \ 427*060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/crypto; \ 428*060f0a17SEmmanuel Vadot cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 429*060f0a17SEmmanuel Vadot $$(printf '../../../%s ' sys/opencrypto/*.h) \ 430*060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/crypto; \ 431*060f0a17SEmmanuel Vadot cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 432*060f0a17SEmmanuel Vadot $$(printf '../../../%s ' sys/${MACHINE}/include/*.h) \ 433*060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/machine; 434*060f0a17SEmmanuel Vadot.if exists(${SRCTOP}/sys/${MACHINE}/include/pc) 435*060f0a17SEmmanuel Vadot cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 436*060f0a17SEmmanuel Vadot $$(printf '../../../../%s ' sys/${MACHINE}/include/pc/*.h) \ 437*060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/machine/pc; 438*060f0a17SEmmanuel Vadot.endif 439*060f0a17SEmmanuel Vadot.for _MARCH in ${_MARCHS} 440*060f0a17SEmmanuel Vadot.if exists(${SRCTOP}/sys/${_MARCH}/include) 441*060f0a17SEmmanuel Vadot ${INSTALL} -d ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 755 \ 442*060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/${_MARCH}; \ 443*060f0a17SEmmanuel Vadot cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 444*060f0a17SEmmanuel Vadot $$(printf '../../../%s ' sys/${_MARCH}/include/*.h) \ 445*060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/${_MARCH}; 446*060f0a17SEmmanuel Vadot.if exists(${SRCTOP}/sys/${_MARCH}/include/pc) 447*060f0a17SEmmanuel Vadot ${INSTALL} -d ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 755 \ 448*060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \ 449*060f0a17SEmmanuel Vadot cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 450*060f0a17SEmmanuel Vadot $$(printf '../../../../%s ' sys/${_MARCH}/include/pc/*.h) \ 451*060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc; 452*060f0a17SEmmanuel Vadot.endif 453*060f0a17SEmmanuel Vadot.endif 454*060f0a17SEmmanuel Vadot.endfor 455*060f0a17SEmmanuel Vadot cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 456*060f0a17SEmmanuel Vadot $$(printf '../../../../%s ' sys/fs/cd9660/*.h) \ 457*060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/isofs/cd9660; \ 458*060f0a17SEmmanuel Vadot cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 459*060f0a17SEmmanuel Vadot $$(printf '../../../sys/rpc/%s ' rpcsec_tls.h types.h) \ 460*060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/rpc; 461*060f0a17SEmmanuel Vadot cd ${SRCTOP}/sys/rpc; 462*060f0a17SEmmanuel Vadot.if ${MK_CDDL} != "no" 463*060f0a17SEmmanuel Vadot ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ 464*060f0a17SEmmanuel Vadot ../../../sys/contrib/openzfs/include/sys/nvpair.h \ 465*060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/sys 466*060f0a17SEmmanuel Vadot.endif 467*060f0a17SEmmanuel Vadot.if ${MK_MLX5TOOL} != "no" 468*060f0a17SEmmanuel Vadot ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/mlx5/mlx5io.h \ 469*060f0a17SEmmanuel Vadot ${SDESTDIR}${INCLUDEDIR}/dev/mlx5 470*060f0a17SEmmanuel Vadot.endif 471*060f0a17SEmmanuel Vadot 47294086ceaSBryan Drewery.include <bsd.prog.mk> 47394086ceaSBryan Drewery 474*060f0a17SEmmanuel Vadotinstallincludes: ${SHARED} 475*060f0a17SEmmanuel Vadot${SHARED}: compat 47694086ceaSBryan Drewery 477dbf5bd50SBryan Drewery.if ${MACHINE} == "host" && !defined(_SKIP_BUILD) 4781a682d2cSSimon J. Gerraty# we're here because we are building a sysroot... 4791a682d2cSSimon J. Gerraty# we need MACHINE et al set correctly 4801a682d2cSSimon J. GerratyHOST_MACHINE!= uname -m 4811a682d2cSSimon J. GerratyHOST_MACHINE_ARCH!= uname -p 4821a682d2cSSimon J. GerratyMACHINE:= ${HOST_MACHINE} 4831a682d2cSSimon J. GerratyMACHINE_ARCH:= ${HOST_MACHINE_ARCH} 4841a682d2cSSimon J. Gerraty.endif 485