Makefile revision 133567
140496Sbde# @(#)Makefile 8.2 (Berkeley) 1/4/94 250473Speter# $FreeBSD: head/include/Makefile 133567 2004-08-12 12:36:04Z tjr $ 31539Srgrimes# 4114731Sbde# Doing a "make install" builds /usr/include. 51539Srgrimes 618420SbdeCLEANFILES= osreldate.h version vers.c 796462SruSUBDIR= arpa protocols rpcsvc rpc 8133567StjrINCS= a.out.h ar.h assert.h bitstring.h complex.h cpio.h _ctype.h ctype.h \ 9133559Stjr db.h \ 10107046Smarcel dirent.h dlfcn.h elf.h elf-hints.h err.h fmtmsg.h fnmatch.h fstab.h \ 11131661Sdas fts.h ftw.h getopt.h glob.h grp.h \ 12131661Sdas hesiod.h histedit.h ieeefp.h ifaddrs.h \ 13107046Smarcel inttypes.h iso646.h kenv.h langinfo.h libgen.h limits.h link.h \ 14107046Smarcel locale.h malloc.h memory.h monetary.h mpool.h ndbm.h netconfig.h \ 15113595Snectar netdb.h nl_types.h nlist.h nss.h nsswitch.h objformat.h paths.h \ 16132173Sdavidxu proc_service.h pthread.h \ 17107046Smarcel pthread_np.h pwd.h ranlib.h readpassphrase.h regex.h regexp.h \ 18107046Smarcel resolv.h rune.h runetype.h search.h setjmp.h sgtty.h signal.h stab.h \ 19121640Speter stdbool.h stddef.h stdio.h stdlib.h string.h stringlist.h \ 20133333Sstefanf strings.h sysexits.h tar.h tgmath.h \ 21133333Sstefanf time.h timeconv.h timers.h ttyent.h \ 22119630Skan ulimit.h unistd.h utime.h utmp.h uuid.h varargs.h vis.h wchar.h \ 23119630Skan wctype.h wordexp.h 241539Srgrimes 25119630SkanMHDRS= float.h floatingpoint.h stdarg.h 2634030Sdufault 27104219Smike# posix4/mqueue.h is useless without an implementation and isn't installed: 28104634SmikePHDRS= sched.h semaphore.h _semaphore.h # mqueue.h 2934030Sdufault 3088055SruLHDRS= aio.h errno.h fcntl.h linker_set.h poll.h stdint.h syslog.h \ 3164767Sjhb termios.h ucontext.h 321539Srgrimes 33116948SsamLDIRS= cam geom net net80211 netatalk netatm netgraph netinet netinet6 \ 34116948Ssam netipsec netipx netkey netnatm netncp netsmb nfs nfsclient nfsserver \ 3583653Speter pccard posix4 sys vm 3617900Speter 37123288SobrienLSUBDIRS= cam/scsi dev/an dev/bktr dev/firewire dev/ic dev/iicbus \ 38123288Sobrien dev/ofw dev/ppbus dev/smbus dev/usb dev/wi dev/utopia fs/devfs \ 3977223Sru fs/fdescfs fs/fifofs fs/msdosfs fs/ntfs fs/nullfs fs/nwfs fs/portalfs \ 40128769Spjd fs/procfs fs/smbfs fs/udf fs/umapfs fs/unionfs \ 41132905Spjd geom/concat geom/gate geom/label geom/mirror geom/nop geom/stripe \ 42128769Spjd isofs/cd9660 netatm/ipatm netatm/sigpvc netatm/spans netatm/uni \ 43116811Sharti netgraph/atm security/mac_biba security/mac_bsdextended \ 44116811Sharti security/mac_lomac security/mac_mls security/mac_partition \ 45116811Sharti ufs/ffs ufs/ufs 4677031Sru 47125123Semax.if !defined(NO_BLUETOOTH) 48114731SbdeLSUBSUBDIRS= netgraph/bluetooth/include 49125123Semax.endif 50107139Sjulian 5154351Smarcel# Define SHARED to indicate whether you want symbolic links to the system 5254351Smarcel# source (``symlinks''), or a separate copy (``copies''). ``symlinks'' is 5354351Smarcel# probably only useful for developers and should be avoided if you do not 5454351Smarcel# wish to tie your /usr/include and /usr/src together. 5554351Smarcel#SHARED= symlinks 5654351SmarcelSHARED?= copies 5754351Smarcel 5896462SruINCS+= osreldate.h 5925734Speter 6036283Seivindosreldate.h: ${.CURDIR}/../sys/conf/newvers.sh \ 6178376Speter ${.CURDIR}/../sys/sys/param.h \ 6278376Speter ${.CURDIR}/Makefile 6325734Speter @${ECHO} creating osreldate.h from newvers.sh 64117236Sru @setvar PARAMFILE ${.CURDIR}/../sys/sys/param.h; \ 6525734Speter . ${.CURDIR}/../sys/conf/newvers.sh; \ 6625734Speter echo "$$COPYRIGHT" > osreldate.h; \ 6772673Speter echo "#ifdef _KERNEL" >> osreldate.h; \ 68114731Sbde echo '#error "<osreldate.h> cannot be used in the kernel, use <sys/param.h>"' >> osreldate.h; \ 6972673Speter echo "#else" >> osreldate.h; \ 7025734Speter echo \#'undef __FreeBSD_version' >> osreldate.h; \ 7172673Speter echo \#'define __FreeBSD_version' $$RELDATE >> osreldate.h; \ 7272673Speter echo "#endif" >> osreldate.h 7325734Speter 7488055Sru.for i in ${LHDRS} 7596462SruINCSLINKS+= sys/$i ${INCLUDEDIR}/$i 7617900Speter.endfor 7788055Sru.for i in ${MHDRS} 7896462SruINCSLINKS+= machine/$i ${INCLUDEDIR}/$i 7917900Speter.endfor 8088055Sru.for i in ${PHDRS} 8196462SruINCSLINKS+= posix4/$i ${INCLUDEDIR}/$i 8234030Sdufault.endfor 8354351Smarcel 84114731Sbde.include <bsd.prog.mk> 85114731Sbde 86114731Sbdeinstallincludes: ${SHARED} 87114731Sbde${SHARED}: compat 88114731Sbde 89114731Sbde# Take care of stale directory-level symlinks. 90114731Sbdecompat: 91114731Sbde.for i in ${LDIRS} ${LSUBDIRS} machine crypto 92114731Sbde if [ -L ${DESTDIR}${INCLUDEDIR}/$i ]; then \ 93114731Sbde rm -f ${DESTDIR}${INCLUDEDIR}/$i; \ 9454351Smarcel fi 9554351Smarcel.endfor 96114731Sbde mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \ 97114731Sbde -f ${.CURDIR}/../etc/mtree/BSD.include.dist \ 98114731Sbde -p ${DESTDIR}${INCLUDEDIR} 99114731Sbde 100114731Sbdecopies: 101114731Sbde.for i in ${LDIRS} ${LSUBDIRS} crypto machine machine/pc 102114731Sbde.if exists(${DESTDIR}${INCLUDEDIR}/$i) 103114731Sbde cd ${DESTDIR}${INCLUDEDIR}/$i; \ 104114731Sbde for h in *.h; do \ 105114731Sbde if [ -L $$h ]; then rm -f $$h; fi; \ 106114731Sbde done 107114731Sbde.endif 108114731Sbde.endfor 109123288Sobrien.for i in ${LDIRS} ${LSUBDIRS:Ndev/bktr} ${LSUBSUBDIRS} 11054351Smarcel cd ${.CURDIR}/../sys; \ 111114731Sbde ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \ 112114731Sbde ${DESTDIR}${INCLUDEDIR}/$i 11354351Smarcel.endfor 114123288Sobrien cd ${.CURDIR}/../sys/dev/bktr; \ 115123288Sobrien ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ioctl_*.h \ 116123288Sobrien ${DESTDIR}${INCLUDEDIR}/dev/bktr 117130416Smlaier cd ${.CURDIR}/../sys/contrib/altq/altq; \ 118130416Smlaier ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 119130416Smlaier ${DESTDIR}${INCLUDEDIR}/altq 120116734Sru cd ${.CURDIR}/../sys/contrib/ipfilter/netinet; \ 121116734Sru ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 122116734Sru ${DESTDIR}${INCLUDEDIR}/netinet 123126385Smlaier cd ${.CURDIR}/../sys/contrib/pf/net; \ 124126385Smlaier ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 125126385Smlaier ${DESTDIR}${INCLUDEDIR}/net 126116734Sru cd ${.CURDIR}/../sys/opencrypto; \ 127116734Sru ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 128114731Sbde ${DESTDIR}${INCLUDEDIR}/crypto 12977857Sjlemon cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include; \ 130114731Sbde ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 131114731Sbde ${DESTDIR}${INCLUDEDIR}/machine 13293229Sru.if exists(${.CURDIR}/../sys/${MACHINE_ARCH}/include/pc) 13393229Sru cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include/pc; \ 134114731Sbde ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 135114731Sbde ${DESTDIR}${INCLUDEDIR}/machine/pc 13677857Sjlemon.endif 1371539Srgrimes 13854351Smarcelsymlinks: 13954351Smarcel @${ECHO} "Setting up symlinks to kernel source tree..." 14056645Speter.for i in ${LDIRS} 141114731Sbde cd ${.CURDIR}/../sys/$i; \ 142114731Sbde for h in *.h; do \ 143114731Sbde ln -fs ../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ 144114731Sbde done 14554351Smarcel.endfor 146114731Sbde.for i in ${LSUBDIRS} 147114731Sbde cd ${.CURDIR}/../sys/$i; \ 148114731Sbde for h in *.h; do \ 149114731Sbde ln -fs ../../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ 150114731Sbde done 15177046Sru.endfor 152114731Sbde.for i in ${LSUBSUBDIRS} 153114731Sbde cd ${.CURDIR}/../sys/$i; \ 154114731Sbde for h in *.h; do \ 155114731Sbde ln -fs ../../../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ 156114731Sbde done 157114731Sbde.endfor 158130416Smlaier cd ${.CURDIR}/../sys/contrib/altq/altq; \ 159130416Smlaier for h in *.h; do \ 160130416Smlaier ln -fs ../../../sys/contrib/altq/altq/$$h \ 161130416Smlaier ${DESTDIR}${INCLUDEDIR}/altq; \ 162130416Smlaier done 163116734Sru cd ${.CURDIR}/../sys/contrib/ipfilter/netinet; \ 164116734Sru for h in *.h; do \ 165116734Sru ln -fs ../../../sys/contrib/ipfilter/netinet/$$h \ 166116734Sru ${DESTDIR}${INCLUDEDIR}/netinet; \ 167116734Sru done 168126385Smlaier cd ${.CURDIR}/../sys/contrib/pf/net; \ 169126385Smlaier for h in *.h; do \ 170126385Smlaier ln -fs ../../../sys/contrib/pf/net/$$h \ 171126385Smlaier ${DESTDIR}${INCLUDEDIR}/net; \ 172126385Smlaier done 173114731Sbde cd ${.CURDIR}/../sys/opencrypto; \ 174114731Sbde for h in *.h; do \ 175114731Sbde ln -fs ../../../sys/opencrypto/$$h \ 176114731Sbde ${DESTDIR}${INCLUDEDIR}/crypto; \ 177114731Sbde done 178114731Sbde cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include; \ 179114731Sbde for h in *.h; do \ 180114731Sbde ln -fs ../../../sys/${MACHINE_ARCH}/include/$$h \ 181114731Sbde ${DESTDIR}${INCLUDEDIR}/machine; \ 182114731Sbde done 183114731Sbde.if exists(${.CURDIR}/../sys/${MACHINE_ARCH}/include/pc) 184114731Sbde cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include/pc; \ 185114731Sbde for h in *.h; do \ 186114731Sbde ln -fs ../../../../sys/${MACHINE_ARCH}/include/pc/$$h \ 187114731Sbde ${DESTDIR}${INCLUDEDIR}/machine/pc; \ 188114731Sbde done 189114731Sbde.endif 190