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

Annotation of src/include/Makefile, Revision 1.162

1.162   ! espie       1: #      $OpenBSD: Makefile,v 1.161 2012/03/21 23:20:35 matthew 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.158     martynas   15:        dlfcn.h elf_abi.h err.h errno.h fenv.h fnmatch.h fstab.h fts.h ftw.h \
                     16:        getopt.h glob.h grp.h ifaddrs.h inttypes.h iso646.h kvm.h langinfo.h \
1.121     millert    17:        libgen.h limits.h locale.h login_cap.h malloc.h math.h md4.h \
                     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.122     espie      33: MFILES=        float.h 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.152     millert    38:        netmpls netnatm net80211 netbt nfs nnpfs ntfs scsi sys ufs uvm
1.1       deraadt    39:
1.61      niklas     40: # Directories with an includes target
1.120     deraadt    41: RDIRS= ../lib/libpthread ../lib/libcompat ../lib/libcurses \
1.131     millert    42:        ../lib/libform ../lib/libssl ../lib/libmenu \
1.104     deraadt    43:        ../lib/libocurses ../lib/libossaudio ../lib/libpanel ../lib/librpcsvc \
1.156     djm        44:        ../lib/libskey ../lib/libedit ../lib/libexpat \
1.162   ! espie      45:        ../lib/libpcap ../lib/libsqlite3 ../lib/libutil ../lib/libusbhid \
        !            46:        ../lib/libwrap \
1.141     deraadt    47:        ../lib/libz ../lib/libkeynote ../lib/libevent ../usr.bin/lex \
1.127     millert    48:        ../gnu/lib/libreadline ../gnu/usr.sbin/sendmail/libmilter \
1.104     deraadt    49:        ../sys/arch/${MACHINE}
1.7       deraadt    50:
1.62      niklas     51: # Places using Makefile that needs a prerequisite target met before includes
1.113     markus     52: PRDIRS=
1.62      niklas     53:
1.61      niklas     54: # Directories with an includes target that use Makefile.bsd-wrapper
1.145     kettenis   55: WDIRS= ../usr.sbin/httpd
1.47      niklas     56:
1.61      niklas     57: # Places using Makefile.bsd-wrapper that needs a prerequisite target met
                     58: # before includes
1.145     kettenis   59: PWDIRS=
1.123     espie      60:
1.154     drahn      61: .if ${COMPILER_VERSION:L} == "gcc3"
1.155     espie      62: WDIRS+= ../gnu/lib/libstdc++ ../gnu/usr.bin/gcc ../gnu/lib/libobjc
                     63: PWDIRS+= ../gnu/lib/libstdc++
1.154     drahn      64: .elif ${COMPILER_VERSION:L} == "gcc4"
                     65: RDIRS+= ../gnu/lib/libstdc++-v3 ../gnu/usr.bin/cc/libobjc
                     66: PRDIRS+= ../gnu/lib/libstdc++-v3
                     67: RDIRS+= ../gnu/usr.bin/cc/include
1.123     espie      68: .else
                     69: WDIRS+= ../gnu/egcs/libio ../gnu/egcs/libstdc++ \
1.155     espie      70:        ../gnu/lib/libobjc ../gnu/egcs/gcc
1.123     espie      71: .endif
1.61      niklas     72:
1.1       deraadt    73: NOOBJ= noobj
                     74:
                     75: # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
                     76: SYS_INCLUDE?=  copies
1.94      hin        77: .if ${KERBEROS5:L} == "yes"
1.119     mho        78: RDIRS+= ../lib/libkrb5 ../lib/libgssapi ../lib/libkadm5srv
1.9       tholo      79: .endif
1.61      niklas     80:
                     81: prereq:
1.91      espie      82:        @for i in ${PRDIRS}; do \
1.62      niklas     83:                echo preparing in ${.CURDIR}/$$i; \
1.91      espie      84:                cd ${.CURDIR}/$$i && ${MAKE} prereq; \
1.62      niklas     85:        done
1.91      espie      86:        @for i in ${PWDIRS}; do \
1.61      niklas     87:                echo preparing in ${.CURDIR}/$$i; \
1.91      espie      88:                cd ${.CURDIR}/$$i && ${MAKE} -f Makefile.bsd-wrapper prereq; \
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.91      espie     128:                cd ${.CURDIR}/$$i && ${MAKE} includes; \
1.47      niklas    129:        done
1.91      espie     130:        @for i in ${WDIRS}; do \
1.47      niklas    131:                echo installing in ${.CURDIR}/$$i; \
1.91      espie     132:                cd ${.CURDIR}/$$i && ${MAKE} -f Makefile.bsd-wrapper includes; \
1.7       deraadt   133:        done
1.1       deraadt   134:
                    135: copies:
                    136:        @echo copies: ${LDIRS}
1.91      espie     137:        @for i in ${LDIRS}; do \
                    138:                rm -rf ${DESTDIR}/usr/include/$$i && \
1.32      downsj    139:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt   140:                        ${DESTDIR}/usr/include/$$i ; \
                    141:        done
                    142:        cd ../sys; \
                    143:        pax -rw -pa -L \
1.101     mickey    144:            `find ${LDIRS} -follow -type f -name '*.h' \
                    145:            '!' -path 'dev/microcode/*' -print` ${DESTDIR}/usr/include
1.153     miod      146:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_CPU} machine
1.32      downsj    147:        ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.65      espie     148:                ${DESTDIR}/usr/include/${MACHINE}
1.111     itojun    149:        pax -rw -pa -s "|\.\./sys/arch/${MACHINE}/include||" \
                    150:            ../sys/arch/${MACHINE}/include/*.h \
                    151:            ${DESTDIR}/usr/include/${MACHINE}
1.153     miod      152:        if test ${MACHINE} != ${MACHINE_CPU} -a \
                    153:            -d ../sys/arch/${MACHINE_CPU}/include; then \
1.32      downsj    154:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.153     miod      155:                    ${DESTDIR}/usr/include/${MACHINE_CPU}; \
                    156:                pax -rw -pa -s "|\.\./sys/arch/${MACHINE_CPU}/include||" \
                    157:                    ../sys/arch/${MACHINE_CPU}/include/*.h \
                    158:                    ${DESTDIR}/usr/include/${MACHINE_CPU}; \
1.1       deraadt   159:        fi
1.65      espie     160:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine; \
1.1       deraadt   161:
                    162: symlinks:
                    163:        @echo symlinks: ${LDIRS}
                    164:        @for i in ${LDIRS}; do \
1.91      espie     165:                rm -rf ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   166:                ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
                    167:        done
1.153     miod      168:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_CPU} machine
1.65      espie     169:        ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/${MACHINE}
1.153     miod      170:        if test ${MACHINE} != ${MACHINE_CPU} -a \
                    171:            -d ../sys/arch/${MACHINE_CPU}/include ; then \
                    172:                ln -s /sys/arch/${MACHINE_CPU}/include \
                    173:                    ${DESTDIR}/usr/include/${MACHINE_CPU} ; \
1.1       deraadt   174:        fi
1.91      espie     175:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine
1.1       deraadt   176:
1.6       deraadt   177: includes: ${SYS_INCLUDE}
                    178:
1.91      espie     179: .PHONY: prereq includes copies symlink
1.1       deraadt   180: .include <bsd.prog.mk>