[BACK]Return to Makefile CVS log [TXT][DIR] Up to [local] / src / include

Annotation of src/include/Makefile, Revision 1.175

1.175   ! jsg         1: #      $OpenBSD: Makefile,v 1.174 2013/08/12 11:48:22 kettenis 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.175   ! jsg        38:        netmpls 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.172     miod       57: .else
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: .endif
1.61      niklas     62:
1.163     espie      63: # prereq implies includes
                     64: RDIRS += ${PRDIRS}
                     65:
1.1       deraadt    66: NOOBJ= noobj
                     67:
                     68: # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
                     69: SYS_INCLUDE?=  copies
1.170     robert     70:
1.94      hin        71: .if ${KERBEROS5:L} == "yes"
1.170     robert     72: RDIRS+=../kerberosV/lib/libasn1
                     73: RDIRS+=../kerberosV/lib/libgssapi
                     74: RDIRS+=../kerberosV/lib/libhdb
                     75: RDIRS+=../kerberosV/lib/libkadm5clnt
1.173     ajacouto   76: RDIRS+=../kerberosV/lib/libkafs
1.170     robert     77: RDIRS+=../kerberosV/lib/libkrb5
                     78: RDIRS+=../kerberosV/lib/libroken
                     79: RDIRS+=../kerberosV/lib/libkdc
                     80: RDIRS+=../kerberosV/lib/libwind
                     81: RDIRS+=../kerberosV/lib/libheimbase
                     82: RDIRS+=../kerberosV/lib/libcom_err
1.9       tholo      83: .endif
1.61      niklas     84:
1.163     espie      85: RUN_MAKE = if test -f Makefile.bsd-wrapper; then ${MAKE} -f Makefile.bsd-wrapper $@; else ${MAKE} $@; fi
                     86:
1.61      niklas     87: prereq:
1.91      espie      88:        @for i in ${PRDIRS}; do \
1.62      niklas     89:                echo preparing in ${.CURDIR}/$$i; \
1.163     espie      90:                cd ${.CURDIR}/$$i && ${RUN_MAKE}; \
1.61      niklas     91:        done
1.1       deraadt    92:
1.6       deraadt    93: includes:
1.1       deraadt    94:        @echo installing ${FILES}
1.91      espie      95:        @for i in ${FILES}; do \
1.1       deraadt    96:                cmp -s $$i ${DESTDIR}/usr/include/$$i || \
1.40      millert    97:                    ${INSTALL} ${INSTALL_COPY} -m 444 $$i ${DESTDIR}/usr/include/$$i; \
1.1       deraadt    98:        done
                     99:        @echo installing ${DIRS}
1.91      espie     100:        @for i in ${DIRS}; do \
1.32      downsj    101:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt   102:                        ${DESTDIR}/usr/include/$$i; \
1.91      espie     103:                cd ${.CURDIR}/$$i && for j in *.[ih]; do \
1.1       deraadt   104:                        cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
1.40      millert   105:                        ${INSTALL} ${INSTALL_COPY} -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
1.91      espie     106:                done; \
1.1       deraadt   107:        done
1.118     markus    108:        @rm -rf ${DESTDIR}/usr/include/openssl ${DESTDIR}/usr/include/ssl \
1.153     miod      109:                ${DESTDIR}/usr/libdata/perl5/site_perl/${MACHINE_CPU}-openbsd/ssl \
                    110:                ${DESTDIR}/usr/libdata/perl5/site_perl/${MACHINE_CPU}-openbsd/openssl
1.118     markus    111:        @mkdir ${DESTDIR}/usr/include/openssl
                    112:        @ln -sf openssl ${DESTDIR}/usr/include/ssl
1.1       deraadt   113:        @echo installing ${LFILES}
1.91      espie     114:        @for i in ${LFILES}; do \
                    115:                rm -f ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   116:                ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
                    117:        done
                    118:        @echo installing ${MFILES}
1.91      espie     119:        @for i in ${MFILES}; do \
                    120:                rm -f ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   121:                ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2       deraadt   122:        done
1.1       deraadt   123:        chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
1.136     deraadt   124:        find ${DESTDIR}/usr/include -type f -print0 | \
                    125:                xargs -0r chmod a=r
                    126:        find ${DESTDIR}/usr/include -type d -print0 | \
                    127:                xargs -0r chmod u=rwx,go=rx
1.91      espie     128:        @for i in ${RDIRS}; do \
1.7       deraadt   129:                echo installing in ${.CURDIR}/$$i; \
1.163     espie     130:                cd ${.CURDIR}/$$i && ${RUN_MAKE}; \
1.7       deraadt   131:        done
1.1       deraadt   132:
                    133: copies:
                    134:        @echo copies: ${LDIRS}
1.91      espie     135:        @for i in ${LDIRS}; do \
                    136:                rm -rf ${DESTDIR}/usr/include/$$i && \
1.32      downsj    137:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt   138:                        ${DESTDIR}/usr/include/$$i ; \
                    139:        done
                    140:        cd ../sys; \
                    141:        pax -rw -pa -L \
1.169     deraadt   142:            `find ${LDIRS} -follow -type f -name '*.h' '!' \
1.174     kettenis  143:            '(' -path 'dev/microcode/*' -or -path 'dev/pci/drm/*/*' ')' \
1.169     deraadt   144:            -print` ${DESTDIR}/usr/include
1.153     miod      145:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_CPU} machine
1.32      downsj    146:        ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.65      espie     147:                ${DESTDIR}/usr/include/${MACHINE}
1.111     itojun    148:        pax -rw -pa -s "|\.\./sys/arch/${MACHINE}/include||" \
                    149:            ../sys/arch/${MACHINE}/include/*.h \
                    150:            ${DESTDIR}/usr/include/${MACHINE}
1.153     miod      151:        if test ${MACHINE} != ${MACHINE_CPU} -a \
                    152:            -d ../sys/arch/${MACHINE_CPU}/include; then \
1.32      downsj    153:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.153     miod      154:                    ${DESTDIR}/usr/include/${MACHINE_CPU}; \
                    155:                pax -rw -pa -s "|\.\./sys/arch/${MACHINE_CPU}/include||" \
                    156:                    ../sys/arch/${MACHINE_CPU}/include/*.h \
                    157:                    ${DESTDIR}/usr/include/${MACHINE_CPU}; \
1.1       deraadt   158:        fi
1.65      espie     159:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine; \
1.1       deraadt   160:
                    161: symlinks:
                    162:        @echo symlinks: ${LDIRS}
                    163:        @for i in ${LDIRS}; do \
1.91      espie     164:                rm -rf ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   165:                ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
                    166:        done
1.153     miod      167:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_CPU} machine
1.65      espie     168:        ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/${MACHINE}
1.153     miod      169:        if test ${MACHINE} != ${MACHINE_CPU} -a \
                    170:            -d ../sys/arch/${MACHINE_CPU}/include ; then \
                    171:                ln -s /sys/arch/${MACHINE_CPU}/include \
                    172:                    ${DESTDIR}/usr/include/${MACHINE_CPU} ; \
1.1       deraadt   173:        fi
1.91      espie     174:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine
1.1       deraadt   175:
1.6       deraadt   176: includes: ${SYS_INCLUDE}
                    177:
1.91      espie     178: .PHONY: prereq includes copies symlink
1.1       deraadt   179: .include <bsd.prog.mk>