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

Annotation of src/include/Makefile, Revision 1.229

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