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

Annotation of src/include/Makefile, Revision 1.178

1.178   ! sthen       1: #      $OpenBSD: Makefile,v 1.177 2013/10/19 09:00:18 deraadt 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 \
                     16:        langinfo.h libgen.h limits.h locale.h login_cap.h malloc.h math.h md4.h \
1.121     millert    17:        md5.h memory.h mpool.h ndbm.h netdb.h netgroup.h nlist.h nl_types.h \
1.144     deraadt    18:        ohash.h paths.h poll.h pwd.h ranlib.h re_comp.h \
1.121     millert    19:        readpassphrase.h regex.h resolv.h rmd160.h search.h setjmp.h \
1.177     deraadt    20:        sgtty.h sha1.h sha2.h signal.h sndio.h spawn.h \
1.149     ratchov    21:        stdbool.h stddef.h stdio.h stdlib.h \
1.159     martynas   22:        string.h strings.h struct.h sysexits.h tar.h tgmath.h \
1.130     espie      23:        time.h ttyent.h tzfile.h unistd.h utime.h utmp.h vis.h \
                     24:        wchar.h wctype.h
1.8       deraadt    25:
1.177     deraadt    26: FILES+=        link.h link_elf.h
1.86      hugh       27:
                     28: .if (${MACHINE_ARCH} != "vax")
                     29: FILES+= ieeefp.h
1.8       deraadt    30: .endif
1.1       deraadt    31:
1.164     deraadt    32: MFILES=        frame.h
1.138     millert    33: LFILES=        fcntl.h syslog.h termios.h stdarg.h stdint.h varargs.h
1.1       deraadt    34:
                     35: DIRS=  arpa protocols rpc rpcsvc
1.160     henning    36: LDIRS= altq crypto ddb dev isofs miscfs msdosfs net netinet netinet6 \
1.175     jsg        37:        netmpls net80211 netbt nfs ntfs scsi sys ufs uvm
1.1       deraadt    38:
1.163     espie      39: # Places that need a prerequisite target met before includes
                     40: PRDIRS=
                     41:
1.61      niklas     42: # Directories with an includes target
1.165     guenther   43: RDIRS= ../lib/librthread ../lib/libcompat ../lib/libcurses \
1.131     millert    44:        ../lib/libform ../lib/libssl ../lib/libmenu \
1.104     deraadt    45:        ../lib/libocurses ../lib/libossaudio ../lib/libpanel ../lib/librpcsvc \
1.178   ! sthen      46:        ../lib/libskey ../lib/libedit ../lib/libexpat ../lib/libfuse \
1.162     espie      47:        ../lib/libpcap ../lib/libsqlite3 ../lib/libutil ../lib/libusbhid \
                     48:        ../lib/libwrap \
1.141     deraadt    49:        ../lib/libz ../lib/libkeynote ../lib/libevent ../usr.bin/lex \
1.127     millert    50:        ../gnu/lib/libreadline ../gnu/usr.sbin/sendmail/libmilter \
1.163     espie      51:        ../sys/arch/${MACHINE} ../usr.sbin/httpd
1.123     espie      52:
1.171     robert     53: .if ${COMPILER_VERSION:L} == "gcc3"
1.163     espie      54: RDIRS+= ../gnu/usr.bin/gcc ../gnu/lib/libobjc
                     55: PRDIRS+= ../gnu/lib/libstdc++
1.172     miod       56: .else
1.163     espie      57: RDIRS+= ../gnu/usr.bin/cc/libobjc
1.154     drahn      58: PRDIRS+= ../gnu/lib/libstdc++-v3
                     59: RDIRS+= ../gnu/usr.bin/cc/include
1.123     espie      60: .endif
1.61      niklas     61:
1.163     espie      62: # prereq implies includes
                     63: RDIRS += ${PRDIRS}
                     64:
1.1       deraadt    65: NOOBJ= noobj
                     66:
                     67: # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
                     68: SYS_INCLUDE?=  copies
1.170     robert     69:
1.94      hin        70: .if ${KERBEROS5:L} == "yes"
1.170     robert     71: RDIRS+=../kerberosV/lib/libasn1
                     72: RDIRS+=../kerberosV/lib/libgssapi
                     73: RDIRS+=../kerberosV/lib/libhdb
                     74: RDIRS+=../kerberosV/lib/libkadm5clnt
1.173     ajacouto   75: RDIRS+=../kerberosV/lib/libkafs
1.170     robert     76: RDIRS+=../kerberosV/lib/libkrb5
                     77: RDIRS+=../kerberosV/lib/libroken
                     78: RDIRS+=../kerberosV/lib/libkdc
                     79: RDIRS+=../kerberosV/lib/libwind
                     80: RDIRS+=../kerberosV/lib/libheimbase
                     81: RDIRS+=../kerberosV/lib/libcom_err
1.9       tholo      82: .endif
1.61      niklas     83:
1.163     espie      84: RUN_MAKE = if test -f Makefile.bsd-wrapper; then ${MAKE} -f Makefile.bsd-wrapper $@; else ${MAKE} $@; fi
                     85:
1.61      niklas     86: prereq:
1.91      espie      87:        @for i in ${PRDIRS}; do \
1.62      niklas     88:                echo preparing in ${.CURDIR}/$$i; \
1.163     espie      89:                cd ${.CURDIR}/$$i && ${RUN_MAKE}; \
1.61      niklas     90:        done
1.1       deraadt    91:
1.6       deraadt    92: includes:
1.1       deraadt    93:        @echo installing ${FILES}
1.91      espie      94:        @for i in ${FILES}; do \
1.1       deraadt    95:                cmp -s $$i ${DESTDIR}/usr/include/$$i || \
1.40      millert    96:                    ${INSTALL} ${INSTALL_COPY} -m 444 $$i ${DESTDIR}/usr/include/$$i; \
1.1       deraadt    97:        done
                     98:        @echo installing ${DIRS}
1.91      espie      99:        @for i in ${DIRS}; do \
1.32      downsj    100:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt   101:                        ${DESTDIR}/usr/include/$$i; \
1.91      espie     102:                cd ${.CURDIR}/$$i && for j in *.[ih]; do \
1.1       deraadt   103:                        cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
1.40      millert   104:                        ${INSTALL} ${INSTALL_COPY} -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
1.91      espie     105:                done; \
1.1       deraadt   106:        done
1.118     markus    107:        @rm -rf ${DESTDIR}/usr/include/openssl ${DESTDIR}/usr/include/ssl \
1.153     miod      108:                ${DESTDIR}/usr/libdata/perl5/site_perl/${MACHINE_CPU}-openbsd/ssl \
                    109:                ${DESTDIR}/usr/libdata/perl5/site_perl/${MACHINE_CPU}-openbsd/openssl
1.118     markus    110:        @mkdir ${DESTDIR}/usr/include/openssl
                    111:        @ln -sf openssl ${DESTDIR}/usr/include/ssl
1.1       deraadt   112:        @echo installing ${LFILES}
1.91      espie     113:        @for i in ${LFILES}; do \
                    114:                rm -f ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   115:                ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
                    116:        done
                    117:        @echo installing ${MFILES}
1.91      espie     118:        @for i in ${MFILES}; do \
                    119:                rm -f ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   120:                ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2       deraadt   121:        done
1.1       deraadt   122:        chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
1.136     deraadt   123:        find ${DESTDIR}/usr/include -type f -print0 | \
                    124:                xargs -0r chmod a=r
                    125:        find ${DESTDIR}/usr/include -type d -print0 | \
                    126:                xargs -0r chmod u=rwx,go=rx
1.91      espie     127:        @for i in ${RDIRS}; do \
1.7       deraadt   128:                echo installing in ${.CURDIR}/$$i; \
1.163     espie     129:                cd ${.CURDIR}/$$i && ${RUN_MAKE}; \
1.7       deraadt   130:        done
1.1       deraadt   131:
                    132: copies:
                    133:        @echo copies: ${LDIRS}
1.91      espie     134:        @for i in ${LDIRS}; do \
                    135:                rm -rf ${DESTDIR}/usr/include/$$i && \
1.32      downsj    136:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt   137:                        ${DESTDIR}/usr/include/$$i ; \
                    138:        done
                    139:        cd ../sys; \
                    140:        pax -rw -pa -L \
1.169     deraadt   141:            `find ${LDIRS} -follow -type f -name '*.h' '!' \
1.174     kettenis  142:            '(' -path 'dev/microcode/*' -or -path 'dev/pci/drm/*/*' ')' \
1.169     deraadt   143:            -print` ${DESTDIR}/usr/include
1.153     miod      144:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_CPU} machine
1.32      downsj    145:        ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.65      espie     146:                ${DESTDIR}/usr/include/${MACHINE}
1.111     itojun    147:        pax -rw -pa -s "|\.\./sys/arch/${MACHINE}/include||" \
                    148:            ../sys/arch/${MACHINE}/include/*.h \
                    149:            ${DESTDIR}/usr/include/${MACHINE}
1.153     miod      150:        if test ${MACHINE} != ${MACHINE_CPU} -a \
                    151:            -d ../sys/arch/${MACHINE_CPU}/include; then \
1.32      downsj    152:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.153     miod      153:                    ${DESTDIR}/usr/include/${MACHINE_CPU}; \
                    154:                pax -rw -pa -s "|\.\./sys/arch/${MACHINE_CPU}/include||" \
                    155:                    ../sys/arch/${MACHINE_CPU}/include/*.h \
                    156:                    ${DESTDIR}/usr/include/${MACHINE_CPU}; \
1.1       deraadt   157:        fi
1.65      espie     158:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine; \
1.1       deraadt   159:
                    160: symlinks:
                    161:        @echo symlinks: ${LDIRS}
                    162:        @for i in ${LDIRS}; do \
1.91      espie     163:                rm -rf ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   164:                ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
                    165:        done
1.153     miod      166:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_CPU} machine
1.65      espie     167:        ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/${MACHINE}
1.153     miod      168:        if test ${MACHINE} != ${MACHINE_CPU} -a \
                    169:            -d ../sys/arch/${MACHINE_CPU}/include ; then \
                    170:                ln -s /sys/arch/${MACHINE_CPU}/include \
                    171:                    ${DESTDIR}/usr/include/${MACHINE_CPU} ; \
1.1       deraadt   172:        fi
1.91      espie     173:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine
1.1       deraadt   174:
1.6       deraadt   175: includes: ${SYS_INCLUDE}
                    176:
1.91      espie     177: .PHONY: prereq includes copies symlink
1.1       deraadt   178: .include <bsd.prog.mk>