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

Annotation of src/include/Makefile, Revision 1.210

1.210   ! deraadt     1: #      $OpenBSD: Makefile,v 1.209 2016/01/20 19:09:52 jasper 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.198     tedu       13:        complex.h cpio.h ctype.h curses.h db.h dbm.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 \
1.210   ! deraadt    15:        ftw.h getopt.h glob.h grp.h icdb.h ieeefp.h ifaddrs.h inttypes.h \
        !            16:        iso646.h kvm.h langinfo.h libgen.h limits.h link.h link_elf.h \
        !            17:        locale.h login_cap.h math.h md5.h memory.h ndbm.h netdb.h netgroup.h \
        !            18:        nlist.h nl_types.h paths.h poll.h pwd.h ranlib.h readpassphrase.h \
        !            19:        regex.h resolv.h rmd160.h search.h setjmp.h sha1.h sha2.h signal.h \
        !            20:        siphash.h sndio.h spawn.h stdbool.h stddef.h stdio.h stdlib.h \
        !            21:        string.h strings.h struct.h sysexits.h tar.h tgmath.h time.h \
        !            22:        ttyent.h unistd.h utime.h utmp.h uuid.h vis.h wchar.h wctype.h
1.1       deraadt    23:
1.164     deraadt    24: MFILES=        frame.h
1.192     guenther   25: LFILES=        endian.h fcntl.h syslog.h termios.h stdarg.h stdint.h varargs.h
1.1       deraadt    26:
                     27: DIRS=  arpa protocols rpc rpcsvc
1.188     henning    28: LDIRS= crypto ddb dev isofs miscfs msdosfs net netinet netinet6 \
1.191     tedu       29:        netmpls net80211 nfs ntfs scsi sys ufs uvm
1.1       deraadt    30:
1.163     espie      31: # Places that need a prerequisite target met before includes
                     32: PRDIRS=
                     33:
1.61      niklas     34: # Directories with an includes target
1.193     deraadt    35: RDIRS= ../lib/libcrypto ../lib/libcurses ../lib/libedit \
                     36:        ../lib/libevent ../lib/libexpat ../lib/libform \
                     37:        ../lib/libfuse ../lib/libkeynote ../lib/libmenu \
1.207     deraadt    38:        ../lib/libossaudio ../lib/libpanel \
1.202     yasuoka    39:        ../lib/libpcap ../lib/libradius ../lib/librpcsvc ../lib/librthread \
                     40:        ../lib/libskey ../lib/libsqlite3 ../lib/libssl  ../lib/libtls \
1.196     jsing      41:        ../lib/libusbhid ../lib/libutil ../lib/libz \
1.187     miod       42:        ../usr.bin/lex ../gnu/lib/libreadline \
1.179     deraadt    43:        ../sys/arch/${MACHINE}
1.123     espie      44:
1.171     robert     45: .if ${COMPILER_VERSION:L} == "gcc3"
1.163     espie      46: RDIRS+= ../gnu/usr.bin/gcc ../gnu/lib/libobjc
                     47: PRDIRS+= ../gnu/lib/libstdc++
1.172     miod       48: .else
1.163     espie      49: RDIRS+= ../gnu/usr.bin/cc/libobjc
1.154     drahn      50: PRDIRS+= ../gnu/lib/libstdc++-v3
                     51: RDIRS+= ../gnu/usr.bin/cc/include
1.123     espie      52: .endif
1.61      niklas     53:
1.163     espie      54: # prereq implies includes
                     55: RDIRS += ${PRDIRS}
                     56:
1.1       deraadt    57: NOOBJ= noobj
                     58:
                     59: # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
                     60: SYS_INCLUDE?=  copies
1.61      niklas     61:
1.163     espie      62: RUN_MAKE = if test -f Makefile.bsd-wrapper; then ${MAKE} -f Makefile.bsd-wrapper $@; else ${MAKE} $@; fi
                     63:
1.61      niklas     64: prereq:
1.91      espie      65:        @for i in ${PRDIRS}; do \
1.62      niklas     66:                echo preparing in ${.CURDIR}/$$i; \
1.163     espie      67:                cd ${.CURDIR}/$$i && ${RUN_MAKE}; \
1.61      niklas     68:        done
1.1       deraadt    69:
1.6       deraadt    70: includes:
1.1       deraadt    71:        @echo installing ${FILES}
1.91      espie      72:        @for i in ${FILES}; do \
1.1       deraadt    73:                cmp -s $$i ${DESTDIR}/usr/include/$$i || \
1.40      millert    74:                    ${INSTALL} ${INSTALL_COPY} -m 444 $$i ${DESTDIR}/usr/include/$$i; \
1.1       deraadt    75:        done
                     76:        @echo installing ${DIRS}
1.91      espie      77:        @for i in ${DIRS}; do \
1.32      downsj     78:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt    79:                        ${DESTDIR}/usr/include/$$i; \
1.91      espie      80:                cd ${.CURDIR}/$$i && for j in *.[ih]; do \
1.1       deraadt    81:                        cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
1.40      millert    82:                        ${INSTALL} ${INSTALL_COPY} -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
1.91      espie      83:                done; \
1.1       deraadt    84:        done
1.200     sthen      85:        @ln -sfh openssl ${DESTDIR}/usr/include/ssl
1.1       deraadt    86:        @echo installing ${LFILES}
1.91      espie      87:        @for i in ${LFILES}; do \
                     88:                rm -f ${DESTDIR}/usr/include/$$i && \
1.1       deraadt    89:                ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
                     90:        done
                     91:        @echo installing ${MFILES}
1.91      espie      92:        @for i in ${MFILES}; do \
                     93:                rm -f ${DESTDIR}/usr/include/$$i && \
1.1       deraadt    94:                ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2       deraadt    95:        done
1.1       deraadt    96:        chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
1.136     deraadt    97:        find ${DESTDIR}/usr/include -type f -print0 | \
                     98:                xargs -0r chmod a=r
                     99:        find ${DESTDIR}/usr/include -type d -print0 | \
                    100:                xargs -0r chmod u=rwx,go=rx
1.91      espie     101:        @for i in ${RDIRS}; do \
1.7       deraadt   102:                echo installing in ${.CURDIR}/$$i; \
1.163     espie     103:                cd ${.CURDIR}/$$i && ${RUN_MAKE}; \
1.7       deraadt   104:        done
1.1       deraadt   105:
                    106: copies:
                    107:        @echo copies: ${LDIRS}
1.91      espie     108:        @for i in ${LDIRS}; do \
                    109:                rm -rf ${DESTDIR}/usr/include/$$i && \
1.32      downsj    110:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt   111:                        ${DESTDIR}/usr/include/$$i ; \
                    112:        done
                    113:        cd ../sys; \
                    114:        pax -rw -pa -L \
1.169     deraadt   115:            `find ${LDIRS} -follow -type f -name '*.h' '!' \
1.206     kettenis  116:            '(' -path 'dev/microcode/*' -or -path 'dev/pci/drm/*' ')' \
1.169     deraadt   117:            -print` ${DESTDIR}/usr/include
1.153     miod      118:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_CPU} machine
1.32      downsj    119:        ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.65      espie     120:                ${DESTDIR}/usr/include/${MACHINE}
1.111     itojun    121:        pax -rw -pa -s "|\.\./sys/arch/${MACHINE}/include||" \
                    122:            ../sys/arch/${MACHINE}/include/*.h \
                    123:            ${DESTDIR}/usr/include/${MACHINE}
1.153     miod      124:        if test ${MACHINE} != ${MACHINE_CPU} -a \
                    125:            -d ../sys/arch/${MACHINE_CPU}/include; then \
1.32      downsj    126:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.153     miod      127:                    ${DESTDIR}/usr/include/${MACHINE_CPU}; \
                    128:                pax -rw -pa -s "|\.\./sys/arch/${MACHINE_CPU}/include||" \
                    129:                    ../sys/arch/${MACHINE_CPU}/include/*.h \
                    130:                    ${DESTDIR}/usr/include/${MACHINE_CPU}; \
1.1       deraadt   131:        fi
1.65      espie     132:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine; \
1.1       deraadt   133:
                    134: symlinks:
                    135:        @echo symlinks: ${LDIRS}
                    136:        @for i in ${LDIRS}; do \
1.91      espie     137:                rm -rf ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   138:                ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
                    139:        done
1.153     miod      140:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_CPU} machine
1.65      espie     141:        ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/${MACHINE}
1.153     miod      142:        if test ${MACHINE} != ${MACHINE_CPU} -a \
                    143:            -d ../sys/arch/${MACHINE_CPU}/include ; then \
                    144:                ln -s /sys/arch/${MACHINE_CPU}/include \
                    145:                    ${DESTDIR}/usr/include/${MACHINE_CPU} ; \
1.1       deraadt   146:        fi
1.91      espie     147:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine
1.1       deraadt   148:
1.6       deraadt   149: includes: ${SYS_INCLUDE}
                    150:
1.91      espie     151: .PHONY: prereq includes copies symlink
1.1       deraadt   152: .include <bsd.prog.mk>