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 9bf24694cSGlen BarberTAGS+= development 108e8319a6SBryan DreweryCLEANFILES= osreldate.h version 11dd987372STijl CoosemansSUBDIR= arpa protocols rpcsvc rpc xlocale 12aa92269eSBryan DrewerySUBDIR_PARALLEL= 138bdfc6bfSTim J. RobbinsINCS= a.out.h ar.h assert.h bitstring.h complex.h cpio.h _ctype.h ctype.h \ 1416133e15STim J. Robbins db.h \ 15c544e42bSMarcel Moolenaar dirent.h dlfcn.h elf.h elf-hints.h err.h fmtmsg.h fnmatch.h fstab.h \ 16dd987372STijl Coosemans fts.h ftw.h getopt.h glob.h grp.h \ 171e3f1446SDavid E. O'Brien ieeefp.h ifaddrs.h \ 18c544e42bSMarcel Moolenaar inttypes.h iso646.h kenv.h langinfo.h libgen.h limits.h link.h \ 196b2c15daSJason Evans locale.h malloc.h malloc_np.h memory.h monetary.h mpool.h mqueue.h \ 201332b4bdSRuslan Ermilov ndbm.h netconfig.h \ 21401a7f6fSPeter Wemm netdb.h nl_types.h nlist.h nss.h nsswitch.h paths.h \ 2275067f4fSPoul-Henning Kamp printf.h proc_service.h pthread.h \ 23763ed733SEd Schouten pthread_np.h pwd.h ranlib.h readpassphrase.h regex.h \ 249b0f1823SDavid Xu res_update.h resolv.h runetype.h 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 379b0f1823SDavid XuPHDRS= sched.h _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 4245c203fcSGleb SmirnoffLDIRS= bsm cam geom net net80211 netgraph netinet netinet6 \ 43a7dc3128SBrooks Davis netipsec netsmb nfs nfsclient nfsserver sys vm 4415f3c66cSMarcel Moolenaar 45a94a63f0SWarner LoshLSUBDIRS= cam/ata cam/mmc cam/nvme cam/scsi \ 460895e9c7SJohn Baldwin dev/acpica dev/agp dev/an dev/bktr dev/ciss dev/filemon dev/firewire \ 47168fce73SSepherosa Ziehau dev/hwpmc dev/hyperv \ 48e6a376d1SEd Maste dev/ic dev/iicbus dev/io dev/mfi dev/mmc dev/nvme \ 49*187f36e9SIan Lepore dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/pwm \ 50*187f36e9SIan Lepore dev/smbus dev/speaker dev/tcp_log dev/veriexec dev/vkbd dev/wi \ 51a42ac676SAttilio Rao fs/devfs fs/fdescfs fs/msdosfs fs/nandfs fs/nfs fs/nullfs \ 52237abf0cSDavide Italiano fs/procfs fs/smbfs fs/udf fs/unionfs \ 53f348204cSPawel Jakub Dawidek geom/cache geom/concat geom/eli geom/gate geom/journal geom/label \ 54b3f9d8c8SEdward Tomasz Napierala geom/mirror geom/mountver geom/multipath geom/nop \ 5589b17223SAlexander Motin geom/raid geom/raid3 geom/shsec geom/stripe geom/virstor \ 56772e66a6SGleb Smirnoff net/altq \ 57fdbe44b0SGleb Smirnoff netgraph/atm netgraph/netflow \ 58d519cedbSGleb Smirnoff netinet/cc \ 59e5054602SMark Johnston netinet/netdump \ 60013f1b34SRobert Watson security/audit \ 61fdbe44b0SGleb Smirnoff security/mac_biba security/mac_bsdextended security/mac_lomac \ 62fdbe44b0SGleb Smirnoff security/mac_mls security/mac_partition \ 63ae8c08e7SSimon J. Gerraty security/mac_veriexec \ 6450875ed2SMarcel Moolenaar sys/disk \ 6551be47e4SMark Murray ufs/ffs ufs/ufs 6615f3c66cSMarcel Moolenaar 6711c63edeSAndrew ThompsonLSUBSUBDIRS= dev/mpt/mpilib 68c16e2101SJohn Baldwin 697e4a2c28SEnji Cooper.if ${MK_BLUETOOTH} != "no" 707e4a2c28SEnji CooperLSUBSUBDIRS+= netgraph/bluetooth/include 717e4a2c28SEnji Cooper.endif 727e4a2c28SEnji Cooper 738b77741eSEnji Cooper.if ${MK_CUSE} != "no" 748b77741eSEnji CooperLSUBDIRS+= fs/cuse 758b77741eSEnji Cooper.endif 768b77741eSEnji Cooper 77dd987372STijl Coosemans.if ${MK_GSSAPI} != "no" 78dd987372STijl CoosemansSUBDIR+= gssapi 79dd987372STijl CoosemansINCS+= gssapi.h 80dd987372STijl Coosemans.endif 81dd987372STijl Coosemans 82e1fe3dbaSRuslan Ermilov.if ${MK_HESIOD} != "no" 833d86554cSPoul-Henning KampINCS+= hesiod.h 843d86554cSPoul-Henning Kamp.endif 853d86554cSPoul-Henning Kamp 860ff204bbSPeter Wemm# Handle the #define aliases for libiconv 870ff204bbSPeter Wemm.if ${MK_ICONV} == "yes" 88912ce912SPeter WemmINCS+= iconv.h 890ff204bbSPeter Wemm.endif 900ff204bbSPeter Wemm 917e4a2c28SEnji Cooper.if ${MK_USB} != "no" 927e4a2c28SEnji CooperLSUBDIRS+= dev/usb 937e4a2c28SEnji Cooper.endif 947e4a2c28SEnji Cooper 957e4a2c28SEnji Cooper.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" 967e4a2c28SEnji Cooper_dev_powermac_nvram= dev/powermac_nvram 977e4a2c28SEnji Cooper.endif 980ff204bbSPeter Wemm 9915f3c66cSMarcel Moolenaar# Define SHARED to indicate whether you want symbolic links to the system 10015f3c66cSMarcel Moolenaar# source (``symlinks''), or a separate copy (``copies''). ``symlinks'' is 10115f3c66cSMarcel Moolenaar# probably only useful for developers and should be avoided if you do not 10215f3c66cSMarcel Moolenaar# wish to tie your /usr/include and /usr/src together. 10315f3c66cSMarcel Moolenaar#SHARED= symlinks 10415f3c66cSMarcel MoolenaarSHARED?= copies 10559deaec5SRodney W. Grimes 106c7b111cbSRuslan ErmilovINCS+= osreldate.h 1073672faeaSPeter Wemm 10828d60d6aSWarner LoshSYSDIR= ${SRCTOP}/sys 1090210509aSIan LeporeNEWVERS_SH= ${SYSDIR}/conf/newvers.sh 1100210509aSIan LeporePARAM_H= ${SYSDIR}/sys/param.h 111bfe5c479SIan LeporeMK_OSRELDATE_SH= ${.CURDIR}/mk-osreldate.sh 112bfe5c479SIan Lepore 11334ecf418SBryan DrewerySYMLINKS+= ${LIBDIR:C,[^/]+,..,g:C,^/,,}${INCLUDEDIR} ${LIBDIR}/include 114d32e83c2SBryan Drewery 1158e8319a6SBryan Dreweryosreldate.h: ${NEWVERS_SH} ${PARAM_H} ${MK_OSRELDATE_SH} 1168e8319a6SBryan Drewery env NEWVERS_SH=${NEWVERS_SH} PARAMFILE=${PARAM_H} SYSDIR=${SYSDIR} \ 117dd5f1297SIan Lepore sh ${MK_OSRELDATE_SH} 1183672faeaSPeter Wemm 119a7aaf57eSRuslan Ermilov.for i in ${LHDRS} 120c7b111cbSRuslan ErmilovINCSLINKS+= sys/$i ${INCLUDEDIR}/$i 12102cca882SMarcel Moolenaar.endfor 122a7aaf57eSRuslan Ermilov.for i in ${MHDRS} 123c7b111cbSRuslan ErmilovINCSLINKS+= machine/$i ${INCLUDEDIR}/$i 12402cca882SMarcel Moolenaar.endfor 125a7aaf57eSRuslan Ermilov.for i in ${PHDRS} 1266aeb05d7STom RhodesINCSLINKS+= sys/$i ${INCLUDEDIR}/$i 12702cca882SMarcel Moolenaar.endfor 12815f3c66cSMarcel Moolenaar 12925faff34SWarner Losh.if ${MACHINE} != ${MACHINE_CPUARCH} 130544de89dSJohn Baldwin_MARCHS= ${MACHINE_CPUARCH} 131544de89dSJohn Baldwin.endif 132544de89dSJohn Baldwin.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" 133544de89dSJohn Baldwin_MARCHS+= x86 1348f3e5dd0SWarner Losh.endif 1358f3e5dd0SWarner Losh 1369ea89f32SBryan DreweryMETA_TARGETS+= compat 137f883c0adSBryan Drewerystage_includes: ${SHARED} 138c99b67a7SBryan DrewerySDESTDIR= ${SYSROOT:U${DESTDIR}} 1397750ad47SMarcel Moolenaar 140a270eca5SBruce Evans# Take care of stale directory-level symlinks. 14194086ceaSBryan Drewerycompat: 142544de89dSJohn Baldwin.for i in ${LDIRS} ${LSUBDIRS} machine ${_MARCHS} crypto 143c99b67a7SBryan Drewery if [ -L ${SDESTDIR}${INCLUDEDIR}/$i ]; then \ 144c99b67a7SBryan Drewery rm -f ${SDESTDIR}${INCLUDEDIR}/$i; \ 14515f3c66cSMarcel Moolenaar fi 14615f3c66cSMarcel Moolenaar.endfor 147a52fd948SAlex Richardson mtree -deU ${NO_ROOT:D-W} ${MTREE_FOLLOWS_SYMLINKS} \ 14828d60d6aSWarner Losh -f ${SRCTOP}/etc/mtree/BSD.include.dist \ 149c99b67a7SBryan Drewery -p ${SDESTDIR}${INCLUDEDIR} > /dev/null 150a270eca5SBruce Evans 1519ea89f32SBryan Drewerycopies: .PHONY .META 152772e66a6SGleb Smirnoff.for i in ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} crypto machine machine/pc \ 153544de89dSJohn Baldwin ${_MARCHS} 154c99b67a7SBryan Drewery if [ -d ${SDESTDIR}${INCLUDEDIR}/$i ]; then \ 155c99b67a7SBryan Drewery cd ${SDESTDIR}${INCLUDEDIR}/$i; \ 156a270eca5SBruce Evans for h in *.h; do \ 157a270eca5SBruce Evans if [ -L $$h ]; then rm -f $$h; fi; \ 158df884b5cSBryan Drewery done; \ 159df884b5cSBryan Drewery fi 160a270eca5SBruce Evans.endfor 161ae8c08e7SSimon J. Gerraty.for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/hyperv:Ndev/nand:Ndev/pci:Ndev/veriexec} ${LSUBSUBDIRS} 16228d60d6aSWarner Losh cd ${SRCTOP}/sys; \ 163bf24694cSGlen Barber ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \ 164c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/$i 16515f3c66cSMarcel Moolenaar.endfor 16628d60d6aSWarner Losh cd ${SRCTOP}/sys/dev/acpica; \ 167bf24694cSGlen Barber ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 acpiio.h \ 168c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/dev/acpica; \ 169bf24694cSGlen Barber ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 acpi_hpet.h \ 170c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/dev/acpica 17128d60d6aSWarner Losh cd ${SRCTOP}/sys/dev/agp; \ 172bf24694cSGlen Barber ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 agpreg.h \ 173c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/dev/agp 17428d60d6aSWarner Losh cd ${SRCTOP}/sys/dev/bktr; \ 175bf24694cSGlen Barber ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 ioctl_*.h \ 176c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/dev/bktr 1777f725bcdSGrzegorz Bernacki.if ${MK_NAND} != "no" 17828d60d6aSWarner Losh cd ${SRCTOP}/sys/dev/nand; \ 179bf24694cSGlen Barber ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 nandsim.h \ 180c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/dev/nand; \ 181bf24694cSGlen Barber ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 nand_dev.h \ 182c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/dev/nand 1837f725bcdSGrzegorz Bernacki.endif 18428d60d6aSWarner Losh cd ${SRCTOP}/sys/dev/evdev; \ 1852b3f6d66SOleksandr Tymoshenko ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 input.h \ 186c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/dev/evdev; \ 1872b3f6d66SOleksandr Tymoshenko ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 input-event-codes.h \ 188c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/dev/evdev; \ 1892b3f6d66SOleksandr Tymoshenko ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 uinput.h \ 190c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/dev/evdev 19128d60d6aSWarner Losh cd ${SRCTOP}/sys/dev/hyperv/include; \ 1929622c93aSSepherosa Ziehau ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 hyperv.h \ 193c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/dev/hyperv 19428d60d6aSWarner Losh cd ${SRCTOP}/sys/dev/hyperv/utilities; \ 195168fce73SSepherosa Ziehau ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 hv_snapshot.h \ 196c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/dev/hyperv 19728d60d6aSWarner Losh cd ${SRCTOP}/sys/dev/pci; \ 198bf24694cSGlen Barber ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 pcireg.h \ 199c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/dev/pci 200ae8c08e7SSimon J. Gerraty cd ${SRCTOP}/sys/dev/veriexec; \ 201ae8c08e7SSimon J. Gerraty ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 veriexec_ioctl.h \ 202ae8c08e7SSimon J. Gerraty ${SDESTDIR}${INCLUDEDIR}/dev/veriexec 20328d60d6aSWarner Losh cd ${SRCTOP}/sys/fs/cd9660/; \ 204bf24694cSGlen Barber ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 205c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/isofs/cd9660 206e1fe3dbaSRuslan Ermilov.if ${MK_IPFILTER} != "no" 20728d60d6aSWarner Losh cd ${SRCTOP}/sys/contrib/ipfilter/netinet; \ 208bf24694cSGlen Barber ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 209c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/netinet 210f98a656cSScott Long.endif 211b6883113SSean Bruno.if ${MK_PF} != "no" 21228d60d6aSWarner Losh cd ${SRCTOP}/sys/netpfil/pf; \ 213bf24694cSGlen Barber ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 214c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/netpfil/pf 215b6883113SSean Bruno.endif 21628d60d6aSWarner Losh cd ${SRCTOP}/sys/crypto; \ 217bf24694cSGlen Barber ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 rijndael/rijndael.h \ 218c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/crypto 21928d60d6aSWarner Losh cd ${SRCTOP}/sys/opencrypto; \ 220bf24694cSGlen Barber ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 221c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/crypto 22228d60d6aSWarner Losh cd ${SRCTOP}/sys/${MACHINE}/include; \ 223bf24694cSGlen Barber ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 224c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/machine 22528d60d6aSWarner Losh.if exists(${SRCTOP}/sys/${MACHINE}/include/pc) 22628d60d6aSWarner Losh cd ${SRCTOP}/sys/${MACHINE}/include/pc; \ 227bf24694cSGlen Barber ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 228c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/machine/pc 2299f1207d5SRuslan Ermilov.endif 230544de89dSJohn Baldwin.for _MARCH in ${_MARCHS} 23128d60d6aSWarner Losh.if exists(${SRCTOP}/sys/${_MARCH}/include) 232bf24694cSGlen Barber ${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \ 233c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/${_MARCH}; \ 23428d60d6aSWarner Losh cd ${SRCTOP}/sys/${_MARCH}/include; \ 235bf24694cSGlen Barber ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 236c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/${_MARCH} 23728d60d6aSWarner Losh.if exists(${SRCTOP}/sys/${_MARCH}/include/pc) 238bf24694cSGlen Barber ${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \ 239c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \ 24028d60d6aSWarner Losh cd ${SRCTOP}/sys/${_MARCH}/include/pc; \ 241bf24694cSGlen Barber ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 242c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc 2438f3e5dd0SWarner Losh.endif 2448f3e5dd0SWarner Losh.endif 245544de89dSJohn Baldwin.endfor 24628d60d6aSWarner Losh cd ${SRCTOP}/sys/rpc; \ 247bf24694cSGlen Barber ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 types.h \ 248c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/rpc 24928d60d6aSWarner Losh cd ${SRCTOP}/sys/teken; \ 250bf24694cSGlen Barber ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 teken.h \ 251c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/teken 252dca5dd68SAndriy Gapon.if ${MK_CDDL} != "no" 25328d60d6aSWarner Losh cd ${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys; \ 254dca5dd68SAndriy Gapon ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 nvpair.h \ 255c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/sys 256dca5dd68SAndriy Gapon.endif 257e808190aSHans Petter Selasky.if ${MK_MLX5TOOL} != "no" 258e808190aSHans Petter Selasky cd ${SRCTOP}/sys/dev/mlx5; \ 259e808190aSHans Petter Selasky ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 mlx5io.h \ 260e808190aSHans Petter Selasky ${SDESTDIR}${INCLUDEDIR}/dev/mlx5 261e808190aSHans Petter Selasky.endif 26259deaec5SRodney W. Grimes 2639ea89f32SBryan Drewerysymlinks: .PHONY .META 26415f3c66cSMarcel Moolenaar @${ECHO} "Setting up symlinks to kernel source tree..." 265400dc950SPeter Wemm.for i in ${LDIRS} 26628d60d6aSWarner Losh cd ${SRCTOP}/sys/$i; \ 267a270eca5SBruce Evans for h in *.h; do \ 268c99b67a7SBryan Drewery ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/$i/$$h ${SDESTDIR}${INCLUDEDIR}/$i; \ 269a270eca5SBruce Evans done 27015f3c66cSMarcel Moolenaar.endfor 271ae8c08e7SSimon J. Gerraty.for i in ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/hyperv:Ndev/nand:Ndev/pci:Ndev/veriexec} 27228d60d6aSWarner Losh cd ${SRCTOP}/sys/$i; \ 273a270eca5SBruce Evans for h in *.h; do \ 274c99b67a7SBryan Drewery ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/$i/$$h ${SDESTDIR}${INCLUDEDIR}/$i; \ 275a270eca5SBruce Evans done 276400dc950SPeter Wemm.endfor 27728d60d6aSWarner Losh cd ${SRCTOP}/sys/dev/acpica; \ 2783149cc9dSRui Paulo for h in acpiio.h acpi_hpet.h; do \ 279bf24694cSGlen Barber ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/acpica/$$h \ 280c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/dev/acpica; \ 2819f97a43bSNate Lawson done 28228d60d6aSWarner Losh cd ${SRCTOP}/sys/dev/agp; \ 2830895e9c7SJohn Baldwin for h in agpreg.h; do \ 284bf24694cSGlen Barber ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/agp/$$h \ 285c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/dev/agp; \ 2860895e9c7SJohn Baldwin done 28728d60d6aSWarner Losh cd ${SRCTOP}/sys/dev/bktr; \ 288829ba4deSRuslan Ermilov for h in ioctl_*.h; do \ 289bf24694cSGlen Barber ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/bktr/$$h \ 290c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/dev/bktr; \ 291829ba4deSRuslan Ermilov done 2927f725bcdSGrzegorz Bernacki.if ${MK_NAND} != "no" 29328d60d6aSWarner Losh cd ${SRCTOP}/sys/dev/nand; \ 2947f725bcdSGrzegorz Bernacki for h in nandsim.h nand_dev.h; do \ 295bf24694cSGlen Barber ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/nand/$$h \ 296c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/dev/nand; \ 2977f725bcdSGrzegorz Bernacki done 2987f725bcdSGrzegorz Bernacki.endif 29928d60d6aSWarner Losh cd ${SRCTOP}/sys/dev/evdev; \ 3002b3f6d66SOleksandr Tymoshenko for h in input.h input-event-codes.h uinput.h; do \ 3012b3f6d66SOleksandr Tymoshenko ln -fs ../../../../sys/dev/evdev/$$h \ 302c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/dev/evdev; \ 3032b3f6d66SOleksandr Tymoshenko done 30428d60d6aSWarner Losh cd ${SRCTOP}/sys/dev/hyperv/include; \ 3059622c93aSSepherosa Ziehau for h in hyperv.h; do \ 3069622c93aSSepherosa Ziehau ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/hyperv/include/$$h \ 307c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/dev/hyperv; \ 3089622c93aSSepherosa Ziehau done 30928d60d6aSWarner Losh cd ${SRCTOP}/sys/dev/hyperv/utilities; \ 310168fce73SSepherosa Ziehau for h in hv_snapshot.h; do \ 311168fce73SSepherosa Ziehau ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/hyperv/utilities/$$h \ 312c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/dev/hyperv; \ 313168fce73SSepherosa Ziehau done 31428d60d6aSWarner Losh cd ${SRCTOP}/sys/dev/pci; \ 3150895e9c7SJohn Baldwin for h in pcireg.h; do \ 316bf24694cSGlen Barber ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/pci/$$h \ 317c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/dev/pci; \ 3180895e9c7SJohn Baldwin done 319ae8c08e7SSimon J. Gerraty cd ${SRCTOP}/sys/dev/veriexec; \ 320ae8c08e7SSimon J. Gerraty for h in veriexec_ioctl.h; do \ 321ae8c08e7SSimon J. Gerraty ln -fs ../../../../sys/dev/veriexec/$$h \ 322ae8c08e7SSimon J. Gerraty ${SDESTDIR}${INCLUDEDIR}/dev/veriexec; \ 323ae8c08e7SSimon J. Gerraty done 324a270eca5SBruce Evans.for i in ${LSUBSUBDIRS} 32528d60d6aSWarner Losh cd ${SRCTOP}/sys/$i; \ 326a270eca5SBruce Evans for h in *.h; do \ 327c99b67a7SBryan Drewery ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../../sys/$i/$$h ${SDESTDIR}${INCLUDEDIR}/$i; \ 328a270eca5SBruce Evans done 329a270eca5SBruce Evans.endfor 330e1fe3dbaSRuslan Ermilov.if ${MK_IPFILTER} != "no" 33128d60d6aSWarner Losh cd ${SRCTOP}/sys/contrib/ipfilter/netinet; \ 332a97ec006SRuslan Ermilov for h in *.h; do \ 333bf24694cSGlen Barber ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/contrib/ipfilter/netinet/$$h \ 334c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/netinet; \ 335a97ec006SRuslan Ermilov done 336f98a656cSScott Long.endif 33775bf2db3SGleb Smirnoff.if ${MK_PF} != "no" 33828d60d6aSWarner Losh cd ${SRCTOP}/sys/netpfil/pf; \ 33975bf2db3SGleb Smirnoff for h in *.h; do \ 340bf24694cSGlen Barber ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/netpfil/pf/$$h \ 341c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/netpfil/pf; \ 34275bf2db3SGleb Smirnoff done 34375bf2db3SGleb Smirnoff.endif 34428d60d6aSWarner Losh cd ${SRCTOP}/sys/crypto; \ 345df3c03a7SHajimu UMEMOTO for h in rijndael/rijndael.h; do \ 346bf24694cSGlen Barber ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/crypto/$$h \ 347c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/crypto; \ 348df3c03a7SHajimu UMEMOTO done 34928d60d6aSWarner Losh cd ${SRCTOP}/sys/opencrypto; \ 350a270eca5SBruce Evans for h in *.h; do \ 351bf24694cSGlen Barber ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/opencrypto/$$h \ 352c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/crypto; \ 353a270eca5SBruce Evans done 35428d60d6aSWarner Losh cd ${SRCTOP}/sys/${MACHINE}/include; \ 355a270eca5SBruce Evans for h in *.h; do \ 356bf24694cSGlen Barber ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/${MACHINE}/include/$$h \ 357c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/machine; \ 358a270eca5SBruce Evans done 35928d60d6aSWarner Losh.if exists(${SRCTOP}/sys/${MACHINE}/include/pc) 36028d60d6aSWarner Losh cd ${SRCTOP}/sys/${MACHINE}/include/pc; \ 361a270eca5SBruce Evans for h in *.h; do \ 362bf24694cSGlen Barber ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/${MACHINE}/include/pc/$$h \ 363c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/machine/pc; \ 364a270eca5SBruce Evans done 365a270eca5SBruce Evans.endif 366544de89dSJohn Baldwin.for _MARCH in ${_MARCHS} 36728d60d6aSWarner Losh.if exists(${SRCTOP}/sys/${_MARCH}/include) 368bf24694cSGlen Barber ${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \ 369c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/${_MARCH}; \ 37028d60d6aSWarner Losh cd ${SRCTOP}/sys/${_MARCH}/include; \ 3718f3e5dd0SWarner Losh for h in *.h; do \ 372bf24694cSGlen Barber ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/${_MARCH}/include/$$h \ 373c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/${_MARCH}; \ 3748f3e5dd0SWarner Losh done 37528d60d6aSWarner Losh.if exists(${SRCTOP}/sys/${_MARCH}/include/pc) 376bf24694cSGlen Barber ${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \ 377c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \ 37828d60d6aSWarner Losh cd ${SRCTOP}/sys/${_MARCH}/include/pc; \ 3798f3e5dd0SWarner Losh for h in *.h; do \ 380bf24694cSGlen Barber ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/${_MARCH}/include/pc/$$h \ 381c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \ 3828f3e5dd0SWarner Losh done 3838f3e5dd0SWarner Losh.endif 3848f3e5dd0SWarner Losh.endif 385544de89dSJohn Baldwin.endfor 38628d60d6aSWarner Losh cd ${SRCTOP}/sys/fs/cd9660; \ 387d139ce67SCraig Rodrigues for h in *.h; do \ 388bf24694cSGlen Barber ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/fs/cd9660/$$h \ 389c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/isofs/cd9660; \ 390d139ce67SCraig Rodrigues done 39128d60d6aSWarner Losh cd ${SRCTOP}/sys/rpc; \ 3920fdce727SPawel Jakub Dawidek for h in types.h; do \ 393bf24694cSGlen Barber ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/rpc/$$h \ 394c99b67a7SBryan Drewery ${SDESTDIR}${INCLUDEDIR}/rpc; \ 3950fdce727SPawel Jakub Dawidek done 396cd87846eSKyle Evans.if ${MK_CDDL} != "no" 397cd87846eSKyle Evans ${INSTALL_SYMLINK} ${TAG_ARGS} \ 398cd87846eSKyle Evans ../../../sys/cddl/contrib/opensolaris/uts/common/sys/nvpair.h \ 399cd87846eSKyle Evans ${SDESTDIR}${INCLUDEDIR}/sys 400cd87846eSKyle Evans.endif 401e808190aSHans Petter Selasky.if ${MK_MLX5TOOL} != "no" 402e808190aSHans Petter Selasky ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/mlx5/mlx5io.h \ 403e808190aSHans Petter Selasky ${SDESTDIR}${INCLUDEDIR}/dev/mlx5 404e808190aSHans Petter Selasky.endif 4051a682d2cSSimon J. Gerraty 40694086ceaSBryan Drewery.include <bsd.prog.mk> 40794086ceaSBryan Drewery 40894086ceaSBryan Dreweryinstallincludes: ${SHARED} 40994086ceaSBryan Drewery${SHARED}: compat 41094086ceaSBryan Drewery 411dbf5bd50SBryan Drewery.if ${MACHINE} == "host" && !defined(_SKIP_BUILD) 4121a682d2cSSimon J. Gerraty# we're here because we are building a sysroot... 4131a682d2cSSimon J. Gerraty# we need MACHINE et al set correctly 4141a682d2cSSimon J. GerratyHOST_MACHINE!= uname -m 4151a682d2cSSimon J. GerratyHOST_MACHINE_ARCH!= uname -p 4161a682d2cSSimon J. GerratyMACHINE:= ${HOST_MACHINE} 4171a682d2cSSimon J. GerratyMACHINE_ARCH:= ${HOST_MACHINE_ARCH} 4181a682d2cSSimon J. Gerraty.endif 419