Makefile revision 1.22
1# $OpenBSD: Makefile,v 1.22 1996/09/05 11:01:32 pefo Exp $ 2# $NetBSD: Makefile,v 1.59 1996/05/15 21:36:43 jtc Exp $ 3 4# @(#)Makefile 5.45.1.1 (Berkeley) 5/6/91 5 6# The ``rm -rf''s used below are safe because rm doesn't follow symbolic 7# links. 8 9# Missing: mp.h 10 11FILES= a.out.h ar.h assert.h bitstring.h bm.h cpio.h ctype.h db.h dirent.h \ 12 disktab.h elf_abi.h err.h fnmatch.h fstab.h fts.h glob.h \ 13 grp.h ieeefp.h iso646.h kvm.h langinfo.h limits.h locale.h \ 14 malloc.h math.h md2.h md4.h md5.h memory.h mpool.h ndbm.h netdb.h \ 15 netgroup.h nlist.h nl_types.h paths.h poll.h pwd.h ranlib.h re_comp.h \ 16 regex.h resolv.h \ 17 search.h setjmp.h sgtty.h signal.h stab.h stddef.h stdio.h stdlib.h \ 18 string.h strings.h struct.h sysexits.h tar.h time.h ttyent.h tzfile.h \ 19 unistd.h utime.h utmp.h vis.h 20 21.if (${MACHINE_ARCH} != "alpha") && (${MACHINE_ARCH} != "mips") 22FILES+= dlfcn.h link.h 23.endif 24 25MFILES= float.h frame.h stdarg.h varargs.h 26LFILES= errno.h fcntl.h syslog.h termios.h 27 28DIRS= arpa protocols rpc rpcsvc 29LDIRS= dev net netinet netccitt netiso netns netipx nfs sys ufs vm ddb scsi 30 31RDIRS= ../lib/libcompat ../lib/libcurses ../lib/libform ../lib/libmenu \ 32 ../lib/libocurses ../lib/libpanel ../lib/librpcsvc ../lib/libtermlib \ 33 ../lib/libedit ../lib/libpcap ../lib/libutil ../lib/libz \ 34 ../sys/arch/${MACHINE} 35 36NOOBJ= noobj 37 38# Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies 39.include <bsd.own.mk> 40SYS_INCLUDE?= copies 41.if defined(KERBEROS) 42RDIRS+= ../kerberosIV/include ../kerberosIV/kadm ../kerberosIV/krb ../kerberosIV/ss 43.endif 44 45includes: 46 @echo installing ${FILES} 47 @-for i in ${FILES}; do \ 48 cmp -s $$i ${DESTDIR}/usr/include/$$i || \ 49 install -c -m 444 $$i ${DESTDIR}/usr/include/$$i; \ 50 done 51 @echo installing ${DIRS} 52 @-for i in ${DIRS}; do \ 53 install -d -o ${BINOWN} -g ${BINGRP} -m 755 \ 54 ${DESTDIR}/usr/include/$$i; \ 55 (cd $$i; for j in *.[ih]; do \ 56 cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \ 57 install -c -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \ 58 done); \ 59 done 60 @echo installing ${LFILES} 61 @-for i in ${LFILES}; do \ 62 rm -f ${DESTDIR}/usr/include/$$i; \ 63 ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \ 64 done 65 @echo installing ${MFILES} 66 @-for i in ${MFILES}; do \ 67 rm -f ${DESTDIR}/usr/include/$$i; \ 68 ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \ 69 done 70 chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include 71 find ${DESTDIR}/usr/include -type f | \ 72 xargs chmod a=r 73 find ${DESTDIR}/usr/include -type d | \ 74 xargs chmod u=rwx,go=rx 75 @-for i in ${RDIRS}; do \ 76 echo installing in ${.CURDIR}/$$i; \ 77 (cd ${.CURDIR}/$$i; ${MAKE} includes) \ 78 done 79 80copies: 81 @echo copies: ${LDIRS} 82 @-for i in ${LDIRS}; do \ 83 rm -rf ${DESTDIR}/usr/include/$$i; \ 84 install -d -o ${BINOWN} -g ${BINGRP} -m 755 \ 85 ${DESTDIR}/usr/include/$$i ; \ 86 done 87 cd ../sys; \ 88 pax -rw -pa -L \ 89 `find ${LDIRS} -follow -type f -name '*.h' '!' -path \ 90 'netiso/xebec/*' -print` ${DESTDIR}/usr/include 91 rm -rf ${DESTDIR}/usr/include/machine 92 install -d -o ${BINOWN} -g ${BINGRP} -m 755 \ 93 ${DESTDIR}/usr/include/machine 94 pax -rw -pa -s "|../sys/arch/${MACHINE}/include||" \ 95 ../sys/arch/${MACHINE}/include/*.h \ 96 ${DESTDIR}/usr/include/machine 97 rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH} 98 if test ${MACHINE} != ${MACHINE_ARCH} -a \ 99 -d ../sys/arch/${MACHINE_ARCH}/include; then \ 100 install -d -o ${BINOWN} -g ${BINGRP} -m 755 \ 101 ${DESTDIR}/usr/include/${MACHINE_ARCH}; \ 102 pax -rw -pa -s "|../sys/arch/${MACHINE_ARCH}/include||" \ 103 ../sys/arch/${MACHINE_ARCH}/include/*.h \ 104 ${DESTDIR}/usr/include/${MACHINE_ARCH}; \ 105 else \ 106 ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH}; \ 107 fi 108 109symlinks: 110 @echo symlinks: ${LDIRS} 111 @for i in ${LDIRS}; do \ 112 rm -rf ${DESTDIR}/usr/include/$$i; \ 113 ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \ 114 done 115 rm -rf ${DESTDIR}/usr/include/machine 116 ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/machine 117 rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH} 118 if test ${MACHINE} != ${MACHINE_ARCH} -a \ 119 -d ../sys/arch/${MACHINE_ARCH}/include ; then \ 120 ln -s /sys/arch/${MACHINE_ARCH}/include \ 121 ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \ 122 else \ 123 ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \ 124 fi 125 126includes: ${SYS_INCLUDE} 127 128.include <bsd.prog.mk> 129