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

Annotation of src/include/Makefile, Revision 1.195

1.195   ! matthieu    1: #      $OpenBSD: Makefile,v 1.194 2014/08/31 09:36:36 miod 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.190     espie      18:        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 \
1.194     miod       22:        utmp.h uuid.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.192     guenther   31: LFILES=        endian.h fcntl.h syslog.h termios.h stdarg.h stdint.h varargs.h
1.1       deraadt    32:
                     33: DIRS=  arpa protocols rpc rpcsvc
1.188     henning    34: LDIRS= crypto ddb dev isofs miscfs msdosfs net netinet netinet6 \
1.191     tedu       35:        netmpls net80211 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.193     deraadt    41: RDIRS= ../lib/libcrypto ../lib/libcurses ../lib/libedit \
                     42:        ../lib/libevent ../lib/libexpat ../lib/libform \
                     43:        ../lib/libfuse ../lib/libkeynote ../lib/libmenu \
                     44:        ../lib/libocurses ../lib/libossaudio ../lib/libpanel \
                     45:        ../lib/libpcap ../lib/libressl ../lib/librpcsvc \
                     46:        ../lib/librthread ../lib/libskey ../lib/libsqlite3 \
                     47:        ../lib/libssl ../lib/libusbhid ../lib/libutil ../lib/libz \
1.187     miod       48:        ../usr.bin/lex ../gnu/lib/libreadline \
1.179     deraadt    49:        ../sys/arch/${MACHINE}
1.123     espie      50:
1.171     robert     51: .if ${COMPILER_VERSION:L} == "gcc3"
1.163     espie      52: RDIRS+= ../gnu/usr.bin/gcc ../gnu/lib/libobjc
                     53: PRDIRS+= ../gnu/lib/libstdc++
1.172     miod       54: .else
1.163     espie      55: RDIRS+= ../gnu/usr.bin/cc/libobjc
1.154     drahn      56: PRDIRS+= ../gnu/lib/libstdc++-v3
                     57: RDIRS+= ../gnu/usr.bin/cc/include
1.123     espie      58: .endif
1.61      niklas     59:
1.163     espie      60: # prereq implies includes
                     61: RDIRS += ${PRDIRS}
                     62:
1.1       deraadt    63: NOOBJ= noobj
                     64:
                     65: # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
                     66: SYS_INCLUDE?=  copies
1.61      niklas     67:
1.163     espie      68: RUN_MAKE = if test -f Makefile.bsd-wrapper; then ${MAKE} -f Makefile.bsd-wrapper $@; else ${MAKE} $@; fi
                     69:
1.61      niklas     70: prereq:
1.91      espie      71:        @for i in ${PRDIRS}; do \
1.62      niklas     72:                echo preparing in ${.CURDIR}/$$i; \
1.163     espie      73:                cd ${.CURDIR}/$$i && ${RUN_MAKE}; \
1.61      niklas     74:        done
1.1       deraadt    75:
1.6       deraadt    76: includes:
1.1       deraadt    77:        @echo installing ${FILES}
1.91      espie      78:        @for i in ${FILES}; do \
1.1       deraadt    79:                cmp -s $$i ${DESTDIR}/usr/include/$$i || \
1.40      millert    80:                    ${INSTALL} ${INSTALL_COPY} -m 444 $$i ${DESTDIR}/usr/include/$$i; \
1.1       deraadt    81:        done
                     82:        @echo installing ${DIRS}
1.91      espie      83:        @for i in ${DIRS}; do \
1.32      downsj     84:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt    85:                        ${DESTDIR}/usr/include/$$i; \
1.91      espie      86:                cd ${.CURDIR}/$$i && for j in *.[ih]; do \
1.1       deraadt    87:                        cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
1.40      millert    88:                        ${INSTALL} ${INSTALL_COPY} -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
1.91      espie      89:                done; \
1.1       deraadt    90:        done
1.118     markus     91:        @rm -rf ${DESTDIR}/usr/include/openssl ${DESTDIR}/usr/include/ssl \
1.153     miod       92:                ${DESTDIR}/usr/libdata/perl5/site_perl/${MACHINE_CPU}-openbsd/ssl \
                     93:                ${DESTDIR}/usr/libdata/perl5/site_perl/${MACHINE_CPU}-openbsd/openssl
1.118     markus     94:        @mkdir ${DESTDIR}/usr/include/openssl
                     95:        @ln -sf openssl ${DESTDIR}/usr/include/ssl
1.1       deraadt    96:        @echo installing ${LFILES}
1.91      espie      97:        @for i in ${LFILES}; do \
                     98:                rm -f ${DESTDIR}/usr/include/$$i && \
1.1       deraadt    99:                ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
                    100:        done
                    101:        @echo installing ${MFILES}
1.91      espie     102:        @for i in ${MFILES}; do \
                    103:                rm -f ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   104:                ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2       deraadt   105:        done
1.1       deraadt   106:        chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
1.136     deraadt   107:        find ${DESTDIR}/usr/include -type f -print0 | \
                    108:                xargs -0r chmod a=r
                    109:        find ${DESTDIR}/usr/include -type d -print0 | \
                    110:                xargs -0r chmod u=rwx,go=rx
1.91      espie     111:        @for i in ${RDIRS}; do \
1.7       deraadt   112:                echo installing in ${.CURDIR}/$$i; \
1.163     espie     113:                cd ${.CURDIR}/$$i && ${RUN_MAKE}; \
1.7       deraadt   114:        done
1.1       deraadt   115:
                    116: copies:
                    117:        @echo copies: ${LDIRS}
1.91      espie     118:        @for i in ${LDIRS}; do \
                    119:                rm -rf ${DESTDIR}/usr/include/$$i && \
1.32      downsj    120:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt   121:                        ${DESTDIR}/usr/include/$$i ; \
                    122:        done
                    123:        cd ../sys; \
                    124:        pax -rw -pa -L \
1.169     deraadt   125:            `find ${LDIRS} -follow -type f -name '*.h' '!' \
1.174     kettenis  126:            '(' -path 'dev/microcode/*' -or -path 'dev/pci/drm/*/*' ')' \
1.169     deraadt   127:            -print` ${DESTDIR}/usr/include
1.153     miod      128:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_CPU} machine
1.32      downsj    129:        ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.65      espie     130:                ${DESTDIR}/usr/include/${MACHINE}
1.111     itojun    131:        pax -rw -pa -s "|\.\./sys/arch/${MACHINE}/include||" \
                    132:            ../sys/arch/${MACHINE}/include/*.h \
                    133:            ${DESTDIR}/usr/include/${MACHINE}
1.153     miod      134:        if test ${MACHINE} != ${MACHINE_CPU} -a \
                    135:            -d ../sys/arch/${MACHINE_CPU}/include; then \
1.32      downsj    136:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.153     miod      137:                    ${DESTDIR}/usr/include/${MACHINE_CPU}; \
                    138:                pax -rw -pa -s "|\.\./sys/arch/${MACHINE_CPU}/include||" \
                    139:                    ../sys/arch/${MACHINE_CPU}/include/*.h \
                    140:                    ${DESTDIR}/usr/include/${MACHINE_CPU}; \
1.1       deraadt   141:        fi
1.65      espie     142:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine; \
1.1       deraadt   143:
                    144: symlinks:
                    145:        @echo symlinks: ${LDIRS}
                    146:        @for i in ${LDIRS}; do \
1.91      espie     147:                rm -rf ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   148:                ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
                    149:        done
1.153     miod      150:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_CPU} machine
1.65      espie     151:        ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/${MACHINE}
1.153     miod      152:        if test ${MACHINE} != ${MACHINE_CPU} -a \
                    153:            -d ../sys/arch/${MACHINE_CPU}/include ; then \
                    154:                ln -s /sys/arch/${MACHINE_CPU}/include \
                    155:                    ${DESTDIR}/usr/include/${MACHINE_CPU} ; \
1.1       deraadt   156:        fi
1.91      espie     157:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine
1.1       deraadt   158:
1.6       deraadt   159: includes: ${SYS_INCLUDE}
                    160:
1.91      espie     161: .PHONY: prereq includes copies symlink
1.1       deraadt   162: .include <bsd.prog.mk>