Makefile revision 50476
140496Sbde# @(#)Makefile 8.2 (Berkeley) 1/4/94 250473Speter# $FreeBSD: head/include/Makefile 50473 1999-08-27 23:45:13Z peter $ 31539Srgrimes# 41539Srgrimes# Doing a make install builds /usr/include 51539Srgrimes# 61539Srgrimes# The ``rm -rf''s used below are safe because rm doesn't follow symbolic 71539Srgrimes# links. 81539Srgrimes 918420SbdeCLEANFILES= osreldate.h version vers.c 101833SwollmanSUBDIR= rpcsvc 111539SrgrimesFILES= a.out.h ar.h assert.h bitstring.h ctype.h db.h dirent.h disktab.h \ 1233236Sjdp dlfcn.h elf.h err.h fnmatch.h fstab.h \ 1342029Sdfr fts.h glob.h grp.h strhash.h histedit.h ieeefp.h iso646.h \ 1442663Sjdp kvm.h limits.h link.h locale.h malloc.h memory.h mpool.h \ 1538960Sjdp ndbm.h netdb.h nl_types.h nlist.h objformat.h \ 1634030Sdufault paths.h pthread.h pthread_np.h pwd.h \ 1734326Sjb ranlib.h regex.h regexp.h resolv.h rune.h runetype.h setjmp.h sgtty.h \ 1826924Smsmith signal.h stab.h stddef.h stdio.h stdlib.h string.h stringlist.h \ 1944667Sphk strings.h struct.h sysexits.h tar.h time.h timers.h \ 2036739Sphk ttyent.h unistd.h utime.h utmp.h vis.h 217242Sphk.if defined(WANT_CSRG_LIBM) 222573SbdeFILES+= math.h 232573Sbde.endif 241539Srgrimes 2536890SpeterARPAFILES= ftp.h inet.h nameser.h nameser_compat.h telnet.h tftp.h 2617900Speter 2717900SpeterPROTOFILES= dumprestore.h routed.h rwhod.h talkd.h timed.h 2817900Speter 2917900SpeterRPCFILES= auth.h auth_unix.h clnt.h pmap_clnt.h pmap_prot.h pmap_rmt.h \ 3026212Swpaul rpc.h rpc_com.h rpc_msg.h svc.h svc_auth.h types.h xdr.h \ 3133298Sbde auth_des.h des.h des_crypt.h 3217900Speter 333329SbdeMFILES= float.h floatingpoint.h stdarg.h varargs.h 3434030Sdufault 3534030Sdufault# posix4/aio.h conflicts with dysons and isn't installed: 3634925SdufaultPFILES= mqueue.h sched.h semaphore.h \ 3734030Sdufault # aio.h 3834030Sdufault 3942774SdtLFILES= aio.h errno.h fcntl.h inttypes.h linker_set.h poll.h syslog.h termios.h 401539Srgrimes 4140496SbdeLDIRS= cam msdosfs net netatalk netatm netinet netipx netkey netns nfs \ 4240496Sbde pccard posix4 sys vm 4317900Speter 4423263SbdeLNOHEADERDIRS= isofs ufs 4539250SgibbsLSUBDIRS= isofs/cd9660 ufs/ffs ufs/mfs ufs/ufs cam/scsi 461539Srgrimes 471539Srgrimes# Define SHARED to indicate whether you want symbolic links to the system 4826457Sjkh# source (``symlinks''), or a separate copy (``copies''). ``symlinks'' is 4926457Sjkh# probably only useful for developers and should be avoided if you do not 5026457Sjkh# wish to tie your /usr/include and /usr/src together. 5126457Sjkh#SHARED= symlinks 5226457SjkhSHARED?= copies 531539Srgrimes 5425734Speterall: osreldate.h 5525734Speter 5636283Seivindosreldate.h: ${.CURDIR}/../sys/conf/newvers.sh \ 5736283Seivind ${.CURDIR}/../sys/sys/param.h 5825734Speter @${ECHO} creating osreldate.h from newvers.sh 5936283Seivind setvar PARAMFILE ${.CURDIR}/../sys/sys/param.h; \ 6025734Speter . ${.CURDIR}/../sys/conf/newvers.sh; \ 6125734Speter echo "$$COPYRIGHT" > osreldate.h; \ 6225734Speter echo \#'undef __FreeBSD_version' >> osreldate.h; \ 6325734Speter echo \#'define __FreeBSD_version' $$RELDATE >> osreldate.h 6425734Speter 6529504Sbdebeforeinstall: ${SHARED} 6644937Sphk @rm -f ${DESTDIR}/usr/include/timepps.h 6717900Speter cd ${.CURDIR}; \ 6817900Speter ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 6917900Speter ${FILES} ${DESTDIR}/usr/include 7017900Speter cd ${.CURDIR}/arpa; \ 7117900Speter ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 7217900Speter ${ARPAFILES} ${DESTDIR}/usr/include/arpa 7317900Speter cd ${.CURDIR}/protocols; \ 7417900Speter ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 7517900Speter ${PROTOFILES} ${DESTDIR}/usr/include/protocols 7617992Sadam cd ${.CURDIR}/rpc; \ 7717992Sadam ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 7817992Sadam ${RPCFILES} ${DESTDIR}/usr/include/rpc 7932170Ssteve ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 8032181Sjkh ${.OBJDIR}/osreldate.h \ 8117900Speter ${DESTDIR}/usr/include 8217900Speter.for i in ${LFILES} 8317900Speter ln -sf sys/$i ${DESTDIR}/usr/include/$i 8417900Speter.endfor 8517900Speter.for i in ${MFILES} 8617900Speter ln -sf machine/$i ${DESTDIR}/usr/include/$i 8717900Speter.endfor 8834030Sdufault.for i in ${PFILES} 8934030Sdufault ln -sf posix4/$i ${DESTDIR}/usr/include/$i 9034030Sdufault.endfor 911539Srgrimes 921539Srgrimescopies: 9323263Sbde.for i in ${LDIRS} ${LNOHEADERDIRS} machine 9417900Speter if [ -h ${DESTDIR}/usr/include/$i ]; then \ 9517900Speter rm -f ${DESTDIR}/usr/include/$i; \ 9617900Speter fi 9717900Speter.endfor 9823566Sbde mtree -deU -f ${.CURDIR}/../etc/mtree/BSD.include.dist \ 9923566Sbde -p ${DESTDIR}/usr/include 10023263Sbde.for i in ${LDIRS} ${LSUBDIRS} 10117900Speter cd ${.CURDIR}/../sys; \ 10217900Speter ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \ 10317900Speter ${DESTDIR}/usr/include/$i 10417900Speter.endfor 10538994Skato.if exists(${.CURDIR}/../sys/${MACHINE_ARCH}/include) 10638994Skato cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include; \ 10717900Speter ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 10817900Speter ${DESTDIR}/usr/include/machine 10917900Speter.endif 1101539Srgrimes 1111539Srgrimessymlinks: 11217954Speter @${ECHO} "Setting up symlinks to kernel source tree..." 11323263Sbde.for i in ${LDIRS} ${LNOHEADERDIRS} 11417954Speter rm -rf ${DESTDIR}/usr/include/$i 11527803Sasami ln -s ../../sys/$i ${DESTDIR}/usr/include/$i 11617900Speter.endfor 11717954Speter rm -rf ${DESTDIR}/usr/include/machine 11838994Skato ln -s ../../sys/${MACHINE_ARCH}/include ${DESTDIR}/usr/include/machine 1191539Srgrimes 1201539Srgrimes.include <bsd.prog.mk> 121