Makefile revision 1.59
1# $OpenBSD: Makefile,v 1.59 1999/02/12 04:46:27 millert 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 blf.h bm.h cast.h cpio.h ctype.h \ 12 curses.h db.h dbm.h des.h dirent.h disktab.h elf_abi.h err.h fnmatch.h \ 13 fstab.h fts.h glob.h grp.h ieeefp.h inttypes.h iso646.h kvm.h \ 14 langinfo.h libgen.h limits.h locale.h malloc.h math.h md4.h md5.h \ 15 memory.h mpool.h ndbm.h netdb.h netgroup.h nlist.h nl_types.h \ 16 olf_abi.h paths.h poll.h pwd.h ranlib.h re_comp.h regex.h resolv.h \ 17 rmd160.h search.h setjmp.h sgtty.h sha1.h signal.h stab.h stddef.h \ 18 stdio.h stdlib.h string.h strings.h struct.h sysexits.h tar.h time.h \ 19 ttyent.h tzfile.h 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 28.if (${MACHINE_ARCH} == "mips") 29MFILES+= link.h dlfcn.h 30.endif 31 32DIRS= arpa protocols rpc rpcsvc 33LDIRS= dev net netinet netinet6 netccitt netiso netns netipx nfs sys ufs vm ddb \ 34 scsi netatalk isofs xfs 35 36RDIRS= ../lib/libc_r ../lib/libcom_err ../lib/libcompat ../lib/libcurses \ 37 ../lib/libform ../lib/libmenu ../lib/libocurses ../lib/libossaudio \ 38 ../lib/libpanel ../lib/librpcsvc ../lib/libskey ../lib/libedit \ 39 ../lib/libpcap ../lib/libutil ../lib/libwrap ../lib/libz \ 40 ../sys/arch/${MACHINE} 41 42WDIRS= ../lib/libssl ../gnu/lib/libg++/libg++ ../gnu/lib/libg++/libio \ 43 ../gnu/lib/libg++/librx ../gnu/lib/libg++/libstdc++ \ 44 ../gnu/usr.bin/gcc ../gnu/lib/libgmp 45 46NOOBJ= noobj 47 48# Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies 49.include <bsd.own.mk> 50SYS_INCLUDE?= copies 51.if (${KERBEROS} == "yes") 52RDIRS+= ../kerberosIV/include ../kerberosIV/kadm ../kerberosIV/krb 53.endif 54 55includes: 56 @echo installing ${FILES} 57 @-for i in ${FILES}; do \ 58 cmp -s $$i ${DESTDIR}/usr/include/$$i || \ 59 ${INSTALL} ${INSTALL_COPY} -m 444 $$i ${DESTDIR}/usr/include/$$i; \ 60 done 61 @echo installing ${DIRS} 62 @-for i in ${DIRS}; do \ 63 ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \ 64 ${DESTDIR}/usr/include/$$i; \ 65 (cd $$i; for j in *.[ih]; do \ 66 cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \ 67 ${INSTALL} ${INSTALL_COPY} -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \ 68 done); \ 69 done 70 @echo installing ${LFILES} 71 @-for i in ${LFILES}; do \ 72 rm -f ${DESTDIR}/usr/include/$$i; \ 73 ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \ 74 done 75 @echo installing ${MFILES} 76 @-for i in ${MFILES}; do \ 77 rm -f ${DESTDIR}/usr/include/$$i; \ 78 ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \ 79 done 80 chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include 81 find ${DESTDIR}/usr/include -type f | \ 82 xargs chmod a=r 83 find ${DESTDIR}/usr/include -type d | \ 84 xargs chmod u=rwx,go=rx 85 @-for i in ${RDIRS}; do \ 86 echo installing in ${.CURDIR}/$$i; \ 87 (cd ${.CURDIR}/$$i; ${MAKE} includes) \ 88 done 89 @-for i in ${WDIRS}; do \ 90 echo installing in ${.CURDIR}/$$i; \ 91 (cd ${.CURDIR}/$$i; ${MAKE} -f Makefile.bsd-wrapper includes) \ 92 done 93 94copies: 95 @echo copies: ${LDIRS} 96 @-for i in ${LDIRS}; do \ 97 rm -rf ${DESTDIR}/usr/include/$$i; \ 98 ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \ 99 ${DESTDIR}/usr/include/$$i ; \ 100 done 101 cd ../sys; \ 102 pax -rw -pa -L \ 103 `find ${LDIRS} -follow -type f -name '*.h' '!' -path \ 104 'netiso/xebec/*' -print` ${DESTDIR}/usr/include 105 rm -rf ${DESTDIR}/usr/include/machine 106 ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \ 107 ${DESTDIR}/usr/include/machine 108 pax -rw -pa -s "|\.\./sys/arch/${MACHINE}/include||" \ 109 ../sys/arch/${MACHINE}/include/*.h \ 110 ${DESTDIR}/usr/include/machine 111 rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH} 112 if test ${MACHINE} != ${MACHINE_ARCH} -a \ 113 -d ../sys/arch/${MACHINE_ARCH}/include; then \ 114 ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \ 115 ${DESTDIR}/usr/include/${MACHINE_ARCH}; \ 116 pax -rw -pa -s "|\.\./sys/arch/${MACHINE_ARCH}/include||" \ 117 ../sys/arch/${MACHINE_ARCH}/include/*.h \ 118 ${DESTDIR}/usr/include/${MACHINE_ARCH}; \ 119 else \ 120 ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH}; \ 121 fi 122 123symlinks: 124 @echo symlinks: ${LDIRS} 125 @for i in ${LDIRS}; do \ 126 rm -rf ${DESTDIR}/usr/include/$$i; \ 127 ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \ 128 done 129 rm -rf ${DESTDIR}/usr/include/machine 130 ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/machine 131 rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH} 132 if test ${MACHINE} != ${MACHINE_ARCH} -a \ 133 -d ../sys/arch/${MACHINE_ARCH}/include ; then \ 134 ln -s /sys/arch/${MACHINE_ARCH}/include \ 135 ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \ 136 else \ 137 ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \ 138 fi 139 140includes: ${SYS_INCLUDE} 141 142.include <bsd.prog.mk> 143