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

Annotation of src/include/Makefile, Revision 1.183

1.183   ! naddy       1: #      $OpenBSD: Makefile,v 1.182 2014/03/13 10:09:43 florian 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.157     mikeb      12: FILES= a.out.h ar.h assert.h bitstring.h blf.h bm.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.179     deraadt    41: RDIRS= ../lib/librthread ../lib/libcurses ../lib/libform ../lib/libssl \
                     42:        ../lib/libmenu ../lib/libocurses ../lib/libossaudio ../lib/libpanel \
                     43:        ../lib/librpcsvc ../lib/libskey ../lib/libedit ../lib/libexpat \
                     44:        ../lib/libfuse ../lib/libpcap ../lib/libsqlite3 ../lib/libutil \
                     45:        ../lib/libusbhid ../lib/libwrap ../lib/libz ../lib/libkeynote \
                     46:        ../lib/libevent ../usr.bin/lex ../gnu/lib/libreadline \
1.182     florian    47:        ../gnu/usr.sbin/sendmail/libmilter \
1.179     deraadt    48:        ../sys/arch/${MACHINE}
1.123     espie      49:
1.171     robert     50: .if ${COMPILER_VERSION:L} == "gcc3"
1.163     espie      51: RDIRS+= ../gnu/usr.bin/gcc ../gnu/lib/libobjc
                     52: PRDIRS+= ../gnu/lib/libstdc++
1.172     miod       53: .else
1.163     espie      54: RDIRS+= ../gnu/usr.bin/cc/libobjc
1.154     drahn      55: PRDIRS+= ../gnu/lib/libstdc++-v3
                     56: RDIRS+= ../gnu/usr.bin/cc/include
1.123     espie      57: .endif
1.61      niklas     58:
1.163     espie      59: # prereq implies includes
                     60: RDIRS += ${PRDIRS}
                     61:
1.1       deraadt    62: NOOBJ= noobj
                     63:
                     64: # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
                     65: SYS_INCLUDE?=  copies
1.170     robert     66:
1.94      hin        67: .if ${KERBEROS5:L} == "yes"
1.170     robert     68: RDIRS+=../kerberosV/lib/libasn1
                     69: RDIRS+=../kerberosV/lib/libgssapi
                     70: RDIRS+=../kerberosV/lib/libhdb
                     71: RDIRS+=../kerberosV/lib/libkadm5clnt
1.173     ajacouto   72: RDIRS+=../kerberosV/lib/libkafs
1.170     robert     73: RDIRS+=../kerberosV/lib/libkrb5
                     74: RDIRS+=../kerberosV/lib/libroken
                     75: RDIRS+=../kerberosV/lib/libkdc
                     76: RDIRS+=../kerberosV/lib/libwind
                     77: RDIRS+=../kerberosV/lib/libheimbase
                     78: RDIRS+=../kerberosV/lib/libcom_err
1.9       tholo      79: .endif
1.61      niklas     80:
1.163     espie      81: RUN_MAKE = if test -f Makefile.bsd-wrapper; then ${MAKE} -f Makefile.bsd-wrapper $@; else ${MAKE} $@; fi
                     82:
1.61      niklas     83: prereq:
1.91      espie      84:        @for i in ${PRDIRS}; do \
1.62      niklas     85:                echo preparing in ${.CURDIR}/$$i; \
1.163     espie      86:                cd ${.CURDIR}/$$i && ${RUN_MAKE}; \
1.61      niklas     87:        done
1.1       deraadt    88:
1.6       deraadt    89: includes:
1.1       deraadt    90:        @echo installing ${FILES}
1.91      espie      91:        @for i in ${FILES}; do \
1.1       deraadt    92:                cmp -s $$i ${DESTDIR}/usr/include/$$i || \
1.40      millert    93:                    ${INSTALL} ${INSTALL_COPY} -m 444 $$i ${DESTDIR}/usr/include/$$i; \
1.1       deraadt    94:        done
                     95:        @echo installing ${DIRS}
1.91      espie      96:        @for i in ${DIRS}; do \
1.32      downsj     97:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt    98:                        ${DESTDIR}/usr/include/$$i; \
1.91      espie      99:                cd ${.CURDIR}/$$i && for j in *.[ih]; do \
1.1       deraadt   100:                        cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
1.40      millert   101:                        ${INSTALL} ${INSTALL_COPY} -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
1.91      espie     102:                done; \
1.1       deraadt   103:        done
1.118     markus    104:        @rm -rf ${DESTDIR}/usr/include/openssl ${DESTDIR}/usr/include/ssl \
1.153     miod      105:                ${DESTDIR}/usr/libdata/perl5/site_perl/${MACHINE_CPU}-openbsd/ssl \
                    106:                ${DESTDIR}/usr/libdata/perl5/site_perl/${MACHINE_CPU}-openbsd/openssl
1.118     markus    107:        @mkdir ${DESTDIR}/usr/include/openssl
                    108:        @ln -sf openssl ${DESTDIR}/usr/include/ssl
1.1       deraadt   109:        @echo installing ${LFILES}
1.91      espie     110:        @for i in ${LFILES}; do \
                    111:                rm -f ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   112:                ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
                    113:        done
                    114:        @echo installing ${MFILES}
1.91      espie     115:        @for i in ${MFILES}; do \
                    116:                rm -f ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   117:                ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2       deraadt   118:        done
1.1       deraadt   119:        chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
1.136     deraadt   120:        find ${DESTDIR}/usr/include -type f -print0 | \
                    121:                xargs -0r chmod a=r
                    122:        find ${DESTDIR}/usr/include -type d -print0 | \
                    123:                xargs -0r chmod u=rwx,go=rx
1.91      espie     124:        @for i in ${RDIRS}; do \
1.7       deraadt   125:                echo installing in ${.CURDIR}/$$i; \
1.163     espie     126:                cd ${.CURDIR}/$$i && ${RUN_MAKE}; \
1.7       deraadt   127:        done
1.1       deraadt   128:
                    129: copies:
                    130:        @echo copies: ${LDIRS}
1.91      espie     131:        @for i in ${LDIRS}; do \
                    132:                rm -rf ${DESTDIR}/usr/include/$$i && \
1.32      downsj    133:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt   134:                        ${DESTDIR}/usr/include/$$i ; \
                    135:        done
                    136:        cd ../sys; \
                    137:        pax -rw -pa -L \
1.169     deraadt   138:            `find ${LDIRS} -follow -type f -name '*.h' '!' \
1.174     kettenis  139:            '(' -path 'dev/microcode/*' -or -path 'dev/pci/drm/*/*' ')' \
1.169     deraadt   140:            -print` ${DESTDIR}/usr/include
1.153     miod      141:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_CPU} machine
1.32      downsj    142:        ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.65      espie     143:                ${DESTDIR}/usr/include/${MACHINE}
1.111     itojun    144:        pax -rw -pa -s "|\.\./sys/arch/${MACHINE}/include||" \
                    145:            ../sys/arch/${MACHINE}/include/*.h \
                    146:            ${DESTDIR}/usr/include/${MACHINE}
1.153     miod      147:        if test ${MACHINE} != ${MACHINE_CPU} -a \
                    148:            -d ../sys/arch/${MACHINE_CPU}/include; then \
1.32      downsj    149:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.153     miod      150:                    ${DESTDIR}/usr/include/${MACHINE_CPU}; \
                    151:                pax -rw -pa -s "|\.\./sys/arch/${MACHINE_CPU}/include||" \
                    152:                    ../sys/arch/${MACHINE_CPU}/include/*.h \
                    153:                    ${DESTDIR}/usr/include/${MACHINE_CPU}; \
1.1       deraadt   154:        fi
1.65      espie     155:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine; \
1.1       deraadt   156:
                    157: symlinks:
                    158:        @echo symlinks: ${LDIRS}
                    159:        @for i in ${LDIRS}; do \
1.91      espie     160:                rm -rf ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   161:                ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
                    162:        done
1.153     miod      163:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_CPU} machine
1.65      espie     164:        ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/${MACHINE}
1.153     miod      165:        if test ${MACHINE} != ${MACHINE_CPU} -a \
                    166:            -d ../sys/arch/${MACHINE_CPU}/include ; then \
                    167:                ln -s /sys/arch/${MACHINE_CPU}/include \
                    168:                    ${DESTDIR}/usr/include/${MACHINE_CPU} ; \
1.1       deraadt   169:        fi
1.91      espie     170:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine
1.1       deraadt   171:
1.6       deraadt   172: includes: ${SYS_INCLUDE}
                    173:
1.91      espie     174: .PHONY: prereq includes copies symlink
1.1       deraadt   175: .include <bsd.prog.mk>