Annotation of src/include/Makefile, Revision 1.171
1.171 ! robert 1: # $OpenBSD: Makefile,v 1.170 2013/06/17 19:16:02 robert Exp $
1.8 deraadt 2: # $NetBSD: Makefile,v 1.59 1996/05/15 21:36:43 jtc Exp $
1.1 deraadt 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:
1.123 espie 9:
10: .include <bsd.own.mk>
11:
1.1 deraadt 12: # Missing: mp.h
1.157 mikeb 13: FILES= a.out.h ar.h assert.h bitstring.h blf.h bm.h bsd_auth.h \
1.146 martynas 14: complex.h cpio.h ctype.h curses.h db.h dbm.h des.h dirent.h disktab.h \
1.164 deraadt 15: dlfcn.h elf_abi.h err.h errno.h fenv.h float.h fnmatch.h fstab.h fts.h \
16: ftw.h getopt.h glob.h grp.h ifaddrs.h inttypes.h iso646.h kvm.h \
17: langinfo.h libgen.h limits.h locale.h login_cap.h malloc.h math.h md4.h \
1.121 millert 18: md5.h memory.h mpool.h ndbm.h netdb.h netgroup.h nlist.h nl_types.h \
1.144 deraadt 19: ohash.h paths.h poll.h pwd.h ranlib.h re_comp.h \
1.121 millert 20: readpassphrase.h regex.h resolv.h rmd160.h search.h setjmp.h \
1.161 matthew 21: sgtty.h sha1.h sha2.h signal.h sndio.h spawn.h stab.h \
1.149 ratchov 22: stdbool.h stddef.h stdio.h stdlib.h \
1.159 martynas 23: string.h strings.h struct.h sysexits.h tar.h tgmath.h \
1.130 espie 24: time.h ttyent.h tzfile.h unistd.h utime.h utmp.h vis.h \
25: wchar.h wctype.h
1.8 deraadt 26:
1.108 art 27: FILES+= link.h link_aout.h link_elf.h
1.86 hugh 28:
29: .if (${MACHINE_ARCH} != "vax")
30: FILES+= ieeefp.h
1.8 deraadt 31: .endif
1.1 deraadt 32:
1.164 deraadt 33: MFILES= frame.h
1.138 millert 34: LFILES= fcntl.h syslog.h termios.h stdarg.h stdint.h varargs.h
1.1 deraadt 35:
36: DIRS= arpa protocols rpc rpcsvc
1.160 henning 37: LDIRS= altq crypto ddb dev isofs miscfs msdosfs net netinet netinet6 \
1.166 deraadt 38: netmpls netnatm net80211 netbt nfs ntfs scsi sys ufs uvm
1.1 deraadt 39:
1.163 espie 40: # Places that need a prerequisite target met before includes
41: PRDIRS=
42:
1.61 niklas 43: # Directories with an includes target
1.165 guenther 44: RDIRS= ../lib/librthread ../lib/libcompat ../lib/libcurses \
1.131 millert 45: ../lib/libform ../lib/libssl ../lib/libmenu \
1.104 deraadt 46: ../lib/libocurses ../lib/libossaudio ../lib/libpanel ../lib/librpcsvc \
1.156 djm 47: ../lib/libskey ../lib/libedit ../lib/libexpat \
1.162 espie 48: ../lib/libpcap ../lib/libsqlite3 ../lib/libutil ../lib/libusbhid \
49: ../lib/libwrap \
1.141 deraadt 50: ../lib/libz ../lib/libkeynote ../lib/libevent ../usr.bin/lex \
1.127 millert 51: ../gnu/lib/libreadline ../gnu/usr.sbin/sendmail/libmilter \
1.163 espie 52: ../sys/arch/${MACHINE} ../usr.sbin/httpd
1.123 espie 53:
1.171 ! robert 54: .if ${COMPILER_VERSION:L} == "gcc3"
1.163 espie 55: RDIRS+= ../gnu/usr.bin/gcc ../gnu/lib/libobjc
56: PRDIRS+= ../gnu/lib/libstdc++
1.154 drahn 57: .elif ${COMPILER_VERSION:L} == "gcc4"
1.163 espie 58: RDIRS+= ../gnu/usr.bin/cc/libobjc
1.154 drahn 59: PRDIRS+= ../gnu/lib/libstdc++-v3
60: RDIRS+= ../gnu/usr.bin/cc/include
1.123 espie 61: .else
1.163 espie 62: RDIRS+= ../gnu/egcs/libio ../gnu/egcs/libstdc++ \
1.155 espie 63: ../gnu/lib/libobjc ../gnu/egcs/gcc
1.123 espie 64: .endif
1.61 niklas 65:
1.163 espie 66: # prereq implies includes
67: RDIRS += ${PRDIRS}
68:
1.1 deraadt 69: NOOBJ= noobj
70:
71: # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
72: SYS_INCLUDE?= copies
1.170 robert 73:
1.94 hin 74: .if ${KERBEROS5:L} == "yes"
1.170 robert 75: RDIRS+=../kerberosV/lib/libasn1
76: RDIRS+=../kerberosV/lib/libgssapi
77: RDIRS+=../kerberosV/lib/libhdb
78: RDIRS+=../kerberosV/lib/libkadm5clnt
79: RDIRS+=../kerberosV/lib/libkafs5
80: RDIRS+=../kerberosV/lib/libkrb5
81: RDIRS+=../kerberosV/lib/libroken
82: RDIRS+=../kerberosV/lib/libkdc
83: RDIRS+=../kerberosV/lib/libwind
84: RDIRS+=../kerberosV/lib/libheimbase
85: RDIRS+=../kerberosV/lib/libcom_err
1.9 tholo 86: .endif
1.61 niklas 87:
1.163 espie 88: RUN_MAKE = if test -f Makefile.bsd-wrapper; then ${MAKE} -f Makefile.bsd-wrapper $@; else ${MAKE} $@; fi
89:
1.61 niklas 90: prereq:
1.91 espie 91: @for i in ${PRDIRS}; do \
1.62 niklas 92: echo preparing in ${.CURDIR}/$$i; \
1.163 espie 93: cd ${.CURDIR}/$$i && ${RUN_MAKE}; \
1.61 niklas 94: done
1.1 deraadt 95:
1.6 deraadt 96: includes:
1.1 deraadt 97: @echo installing ${FILES}
1.91 espie 98: @for i in ${FILES}; do \
1.1 deraadt 99: cmp -s $$i ${DESTDIR}/usr/include/$$i || \
1.40 millert 100: ${INSTALL} ${INSTALL_COPY} -m 444 $$i ${DESTDIR}/usr/include/$$i; \
1.1 deraadt 101: done
102: @echo installing ${DIRS}
1.91 espie 103: @for i in ${DIRS}; do \
1.32 downsj 104: ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1 deraadt 105: ${DESTDIR}/usr/include/$$i; \
1.91 espie 106: cd ${.CURDIR}/$$i && for j in *.[ih]; do \
1.1 deraadt 107: cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
1.40 millert 108: ${INSTALL} ${INSTALL_COPY} -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
1.91 espie 109: done; \
1.1 deraadt 110: done
1.118 markus 111: @rm -rf ${DESTDIR}/usr/include/openssl ${DESTDIR}/usr/include/ssl \
1.153 miod 112: ${DESTDIR}/usr/libdata/perl5/site_perl/${MACHINE_CPU}-openbsd/ssl \
113: ${DESTDIR}/usr/libdata/perl5/site_perl/${MACHINE_CPU}-openbsd/openssl
1.118 markus 114: @mkdir ${DESTDIR}/usr/include/openssl
115: @ln -sf openssl ${DESTDIR}/usr/include/ssl
1.1 deraadt 116: @echo installing ${LFILES}
1.91 espie 117: @for i in ${LFILES}; do \
118: rm -f ${DESTDIR}/usr/include/$$i && \
1.1 deraadt 119: ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
120: done
121: @echo installing ${MFILES}
1.91 espie 122: @for i in ${MFILES}; do \
123: rm -f ${DESTDIR}/usr/include/$$i && \
1.1 deraadt 124: ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2 deraadt 125: done
1.1 deraadt 126: chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
1.136 deraadt 127: find ${DESTDIR}/usr/include -type f -print0 | \
128: xargs -0r chmod a=r
129: find ${DESTDIR}/usr/include -type d -print0 | \
130: xargs -0r chmod u=rwx,go=rx
1.91 espie 131: @for i in ${RDIRS}; do \
1.7 deraadt 132: echo installing in ${.CURDIR}/$$i; \
1.163 espie 133: cd ${.CURDIR}/$$i && ${RUN_MAKE}; \
1.7 deraadt 134: done
1.1 deraadt 135:
136: copies:
137: @echo copies: ${LDIRS}
1.91 espie 138: @for i in ${LDIRS}; do \
139: rm -rf ${DESTDIR}/usr/include/$$i && \
1.32 downsj 140: ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1 deraadt 141: ${DESTDIR}/usr/include/$$i ; \
142: done
143: cd ../sys; \
144: pax -rw -pa -L \
1.169 deraadt 145: `find ${LDIRS} -follow -type f -name '*.h' '!' \
146: '(' -path 'dev/microcode/*' -or -path 'dev/pci/drm/i915/*' ')' \
147: -print` ${DESTDIR}/usr/include
1.153 miod 148: cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_CPU} machine
1.32 downsj 149: ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.65 espie 150: ${DESTDIR}/usr/include/${MACHINE}
1.111 itojun 151: pax -rw -pa -s "|\.\./sys/arch/${MACHINE}/include||" \
152: ../sys/arch/${MACHINE}/include/*.h \
153: ${DESTDIR}/usr/include/${MACHINE}
1.153 miod 154: if test ${MACHINE} != ${MACHINE_CPU} -a \
155: -d ../sys/arch/${MACHINE_CPU}/include; then \
1.32 downsj 156: ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.153 miod 157: ${DESTDIR}/usr/include/${MACHINE_CPU}; \
158: pax -rw -pa -s "|\.\./sys/arch/${MACHINE_CPU}/include||" \
159: ../sys/arch/${MACHINE_CPU}/include/*.h \
160: ${DESTDIR}/usr/include/${MACHINE_CPU}; \
1.1 deraadt 161: fi
1.65 espie 162: ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine; \
1.1 deraadt 163:
164: symlinks:
165: @echo symlinks: ${LDIRS}
166: @for i in ${LDIRS}; do \
1.91 espie 167: rm -rf ${DESTDIR}/usr/include/$$i && \
1.1 deraadt 168: ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
169: done
1.153 miod 170: cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_CPU} machine
1.65 espie 171: ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/${MACHINE}
1.153 miod 172: if test ${MACHINE} != ${MACHINE_CPU} -a \
173: -d ../sys/arch/${MACHINE_CPU}/include ; then \
174: ln -s /sys/arch/${MACHINE_CPU}/include \
175: ${DESTDIR}/usr/include/${MACHINE_CPU} ; \
1.1 deraadt 176: fi
1.91 espie 177: ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine
1.1 deraadt 178:
1.6 deraadt 179: includes: ${SYS_INCLUDE}
180:
1.91 espie 181: .PHONY: prereq includes copies symlink
1.1 deraadt 182: .include <bsd.prog.mk>