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

Annotation of src/include/Makefile, Revision 1.187

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