Makefile revision 33236
1# From: @(#)Makefile 8.2 (Berkeley) 1/4/94 2# $Id: Makefile,v 1.70 1998/01/31 05:54:54 imp Exp $ 3# 4# Doing a make install builds /usr/include 5# 6# The ``rm -rf''s used below are safe because rm doesn't follow symbolic 7# links. 8# 9depend lint tags: 10 11CLEANFILES= osreldate.h version vers.c 12SUBDIR= rpcsvc 13FILES= a.out.h ar.h assert.h bitstring.h ctype.h db.h dirent.h disktab.h \ 14 dlfcn.h elf.h err.h fnmatch.h fstab.h \ 15 fts.h glob.h grp.h strhash.h histedit.h \ 16 kvm.h limits.h link.h locale.h malloc.h memory.h mpool.h \ 17 ndbm.h netdb.h nl_types.h nlist.h paths.h pthread.h pthread_np.h pwd.h \ 18 ranlib.h regex.h regexp.h resolv.h rune.h runetype.h setjmp.h sgtty.h \ 19 signal.h stab.h stddef.h stdio.h stdlib.h string.h stringlist.h \ 20 strings.h struct.h sysexits.h tar.h time.h timers.h ttyent.h unistd.h \ 21 utime.h utmp.h vis.h 22.if defined(WANT_CSRG_LIBM) 23FILES+= math.h 24.endif 25 26ARPAFILES= ftp.h inet.h nameser.h telnet.h tftp.h 27 28PROTOFILES= dumprestore.h routed.h rwhod.h talkd.h timed.h 29 30RPCFILES= auth.h auth_unix.h clnt.h pmap_clnt.h pmap_prot.h pmap_rmt.h \ 31 rpc.h rpc_com.h rpc_msg.h svc.h svc_auth.h types.h xdr.h \ 32 auth_des.h des.h des_crypt.h key_prot.h 33 34MFILES= float.h floatingpoint.h stdarg.h varargs.h 35LFILES= errno.h fcntl.h poll.h syslog.h termios.h 36 37LDIRS= msdosfs net netns netatalk netinet netipx netkey nfs pccard sys vm \ 38 # netccitt netiso 39 40LNOHEADERDIRS= isofs ufs 41LSUBDIRS= isofs/cd9660 ufs/ffs ufs/mfs ufs/ufs 42 43# Define SHARED to indicate whether you want symbolic links to the system 44# source (``symlinks''), or a separate copy (``copies''). ``symlinks'' is 45# probably only useful for developers and should be avoided if you do not 46# wish to tie your /usr/include and /usr/src together. 47#SHARED= symlinks 48SHARED?= copies 49 50 51.if exists (${.CURDIR}/../sys/conf/newvers.sh) 52all: osreldate.h 53 54osreldate.h: ${.CURDIR}/../sys/conf/newvers.sh 55 @${ECHO} creating osreldate.h from newvers.sh 56 . ${.CURDIR}/../sys/conf/newvers.sh; \ 57 echo "$$COPYRIGHT" > osreldate.h; \ 58 echo \#'undef __FreeBSD_version' >> osreldate.h; \ 59 echo \#'define __FreeBSD_version' $$RELDATE >> osreldate.h 60.else 61all: 62 @${ECHO} creating osreldate.h from sysctl info 63 echo \#'undef __FreeBSD_version' > osreldate.h 64 echo \#'define __FreeBSD_version '`sysctl -n kern.osreldate` \ 65 >> osreldate.h 66.endif 67 68beforeinstall: ${SHARED} 69 cd ${.CURDIR}; \ 70 ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 71 ${FILES} ${DESTDIR}/usr/include 72 cd ${.CURDIR}/arpa; \ 73 ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 74 ${ARPAFILES} ${DESTDIR}/usr/include/arpa 75 cd ${.CURDIR}/protocols; \ 76 ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 77 ${PROTOFILES} ${DESTDIR}/usr/include/protocols 78 cd ${.CURDIR}/rpc; \ 79 ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 80 ${RPCFILES} ${DESTDIR}/usr/include/rpc 81 ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 82 ${.OBJDIR}/osreldate.h \ 83 ${DESTDIR}/usr/include 84.for i in ${LFILES} 85 ln -sf sys/$i ${DESTDIR}/usr/include/$i 86.endfor 87.for i in ${MFILES} 88 ln -sf machine/$i ${DESTDIR}/usr/include/$i 89.endfor 90 91copies: 92.for i in ${LDIRS} ${LNOHEADERDIRS} machine 93 if [ -h ${DESTDIR}/usr/include/$i ]; then \ 94 rm -f ${DESTDIR}/usr/include/$i; \ 95 fi 96.endfor 97 mtree -deU -f ${.CURDIR}/../etc/mtree/BSD.include.dist \ 98 -p ${DESTDIR}/usr/include 99.for i in ${LDIRS} ${LSUBDIRS} 100 cd ${.CURDIR}/../sys; \ 101 ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \ 102 ${DESTDIR}/usr/include/$i 103.endfor 104.if exists(${.CURDIR}/../sys/${MACHINE}/include) 105 cd ${.CURDIR}/../sys/${MACHINE}/include; \ 106 ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ 107 ${DESTDIR}/usr/include/machine 108.endif 109 110symlinks: 111 @${ECHO} "Setting up symlinks to kernel source tree..." 112.for i in ${LDIRS} ${LNOHEADERDIRS} 113 rm -rf ${DESTDIR}/usr/include/$i 114 ln -s ../../sys/$i ${DESTDIR}/usr/include/$i 115.endfor 116 rm -rf ${DESTDIR}/usr/include/machine 117 ln -s ../../sys/${MACHINE}/include ${DESTDIR}/usr/include/machine 118 119.include <bsd.prog.mk> 120