[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libc

Annotation of src/lib/libc/Makefile, Revision 1.124

1.124   ! christos    1: #      $NetBSD: Makefile,v 1.123 2005/09/13 01:44:08 christos Exp $
1.36      cgd         2: #      @(#)Makefile    8.2 (Berkeley) 2/3/94
1.1       cgd         3: #
                      4: # All library objects contain sccsid strings by default; they may be
                      5: # excluded as a space-saving measure.  To produce a library that does
                      6: # not contain these strings, delete -DLIBC_SCCS and -DSYSLIBC_SCCS
1.71      lukem       7: # from CPPFLAGS below.  To remove these strings from just the system call
                      8: # stubs, remove just -DSYSLIBC_SCCS from CPPFLAGS.
1.28      jtc         9: #
                     10: # The NLS (message catalog) functions are always in libc.  To choose that
                     11: # strerror(), perror(), strsignal(), psignal(), etc. actually call the NLS
1.71      lukem      12: # functions, put -DNLS on the CPPFLAGS line below.
1.4       deraadt    13: #
1.6       deraadt    14: # The YP functions are always in libc. To choose that getpwent() and friends
1.71      lukem      15: # actually call the YP functions, put -DYP on the CPPFLAGS line below.
1.79      lukem      16: #
                     17: # The Hesiod functions are always in libc. To choose that getpwent() and friends
                     18: # actually call the Hesiod functions, put -DHESIOD on the CPPFLAGS line below.
1.4       deraadt    19:
1.107     lukem      20: USE_SHLIBDIR=  yes
                     21:
1.104     thorpej    22: .include <bsd.own.mk>
                     23:
1.124   ! christos   24: WARNS=4
1.82      tv         25: LIB=           c
1.104     thorpej    26: CPPFLAGS+=     -D_LIBC -DLIBC_SCCS -DSYSLIBC_SCCS -D_REENTRANT
1.117     christos   27: CPPFLAGS+=     -I${.CURDIR}/include -I${.CURDIR}
1.104     thorpej    28:
                     29: .if (${USE_HESIOD} != "no")
                     30: CPPFLAGS+=     -DHESIOD
                     31: .endif
                     32:
1.113     matt       33: .if (${USE_INET6} != "no")
1.87      itojun     34: CPPFLAGS+=     -DINET6
1.113     matt       35: .endif
1.120     lukem      36:
1.104     thorpej    37: CPPFLAGS+=     -DNLS
1.100     lukem      38:
1.104     thorpej    39: .if (${USE_YP} != "no")
                     40: CPPFLAGS+=     -DYP
                     41: .endif
1.98      christos   42:
                     43: .if ${MACHINE_ARCH} == "i386"
                     44: # Set lint to exit on warnings
                     45: LINTFLAGS+=    -w
                     46: .endif
                     47: # ignore 'empty translation unit' warnings.
                     48: LINTFLAGS+=    -X 272
1.82      tv         49:
1.95      itojun     50: .if exists(${.CURDIR}/arch/${MACHINE_ARCH})
                     51: ARCHSUBDIR=    ${MACHINE_ARCH}
                     52: .elif exists(${.CURDIR}/arch/${MACHINE_CPU})
                     53: ARCHSUBDIR=    ${MACHINE_CPU}
                     54: .else
                     55: .BEGIN:
                     56:        @echo no ARCHSUBDIR for ${MACHINE_ARCH} nor ${MACHINE_CPU}
                     57:        @false
                     58: .endif
                     59:
1.83      drochner   60: ARCHDIR=       ${.CURDIR}/arch/${ARCHSUBDIR}
1.116     lukem      61: AFLAGS+=       -I${ARCHDIR}
1.27      mycroft    62: .if defined(DESTDIR)
1.116     lukem      63: AFLAGS+=       -nostdinc -idirafter ${DESTDIR}/usr/include
1.27      mycroft    64: .endif
1.102     thorpej    65: CLEANFILES+=   tags
1.51      cgd        66:
1.73      mikel      67: # Don't try to lint the C library against itself when creating llib-lc.ln
1.51      cgd        68: LLIBS=
1.89      fvdl       69:
                     70: INCSDIR=       /usr/include
1.9       deraadt    71:
1.82      tv         72: .if exists (${ARCHDIR}/Makefile.inc)
                     73: .PATH: ${ARCHDIR}
                     74: .include "${ARCHDIR}/Makefile.inc"
1.9       deraadt    75: .endif
1.114     matt       76: .if exists (${ARCHDIR}/genassym.cf)
                     77: DPSRCS+=       assym.h
                     78: CLEANFILES+=   assym.h assym.h.tmp
                     79:
1.122     thorpej    80: assym.h: ${ARCHDIR}/genassym.cf
1.114     matt       81:        ${_MKTARGET_CREATE}
1.122     thorpej    82:        ${TOOL_GENASSYM} -- ${CC} ${CFLAGS} \
1.121     matt       83:                ${CPPFLAGS} ${CPPFLAGS.assym.h} ${PROF} \
1.114     matt       84:                < ${ARCHDIR}/genassym.cf > assym.h.tmp && \
                     85:        mv -f assym.h.tmp assym.h
                     86: .endif
1.1       cgd        87:
1.7       cgd        88: .include "${.CURDIR}/db/Makefile.inc"
1.111     tshiozak   89: .include "${.CURDIR}/citrus/Makefile.inc"
1.1       cgd        90: .include "${.CURDIR}/compat-43/Makefile.inc"
1.123     christos   91: .include "${.CURDIR}/compat/Makefile.inc"
1.88      minoura    92: .include "${.CURDIR}/dlfcn/Makefile.inc"
1.1       cgd        93: .include "${.CURDIR}/gen/Makefile.inc"
1.24      cgd        94: .include "${.CURDIR}/gmon/Makefile.inc"
1.81      explorer   95: .include "${.CURDIR}/hash/Makefile.inc"
1.111     tshiozak   96: .include "${.CURDIR}/iconv/Makefile.inc"
1.117     christos   97: .include "${.CURDIR}/inet/Makefile.inc"
                     98: .include "${.CURDIR}/isc/Makefile.inc"
1.1       cgd        99: .include "${.CURDIR}/locale/Makefile.inc"
1.52      thorpej   100: .include "${.CURDIR}/md/Makefile.inc"
1.1       cgd       101: .include "${.CURDIR}/net/Makefile.inc"
1.117     christos  102: .include "${.CURDIR}/nameser/Makefile.inc"
1.25      jtc       103: .include "${.CURDIR}/nls/Makefile.inc"
1.78      eeh       104: .if (${MACHINE_ARCH} != "alpha") && (${MACHINE_ARCH} != "sparc64")
1.24      cgd       105: .include "${.CURDIR}/quad/Makefile.inc"
1.34      cgd       106: .endif
1.24      cgd       107: .include "${.CURDIR}/regex/Makefile.inc"
1.117     christos  108: .include "${.CURDIR}/resolv/Makefile.inc"
1.24      cgd       109: .include "${.CURDIR}/rpc/Makefile.inc"
1.1       cgd       110: .include "${.CURDIR}/stdio/Makefile.inc"
                    111: .include "${.CURDIR}/stdlib/Makefile.inc"
                    112: .include "${.CURDIR}/string/Makefile.inc"
1.40      jtc       113: .include "${.CURDIR}/termios/Makefile.inc"
1.108     thorpej   114: .include "${.CURDIR}/thread-stub/Makefile.inc"
1.38      jtc       115: .include "${.CURDIR}/time/Makefile.inc"
1.1       cgd       116: .include "${.CURDIR}/sys/Makefile.inc"
1.119     thorpej   117: .include "${.CURDIR}/uuid/Makefile.inc"
1.104     thorpej   118: .if (${MKYP} != "no")
1.4       deraadt   119: .include "${.CURDIR}/yp/Makefile.inc"
1.104     thorpej   120: .endif
1.41      jtc       121:
1.109     jmmv      122: NLS=   C.msg Pig.msg ca.msg cs.msg de.msg es.msg fi.msg fr.msg nl.msg \
1.110     salo      123:        no.msg pl.msg sk.msg sv.msg
1.1       cgd       124:
1.106     lukem     125: LIBKERN=       ${NETBSDSRCDIR}/sys/lib/libkern
1.14      jtc       126:
1.80      bouyer    127: KSRCS= bcopy.c bcmp.c bswap16.c bswap32.c bswap64.c bzero.c ffs.c \
1.76      perry     128:        strcat.c strchr.c strcmp.c strcpy.c strlen.c \
                    129:        strncmp.c strncpy.c strrchr.c \
                    130:        htonl.c htons.c ntohl.c ntohs.c md5c.c \
                    131:        memchr.c memcmp.c memcpy.c memmove.c memset.c \
                    132:        index.c rindex.c
1.78      eeh       133: .if (${MACHINE_ARCH} != "alpha") && (${MACHINE_ARCH} != "sparc64")
1.22      cgd       134: KSRCS+=        adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
                    135:        lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \
                    136:        subdi3.c  ucmpdi2.c udivdi3.c umoddi3.c xordi3.c
                    137: KINCLUDES+=    quad/quad.h
1.35      cgd       138: .endif
1.14      jtc       139:
1.15      jtc       140: copy-to-libkern:       copy-to-libkern-machind copy-to-libkern-machdep
                    141:
                    142: copy-to-libkern-machind: ${KSRCS}
1.14      jtc       143:        cp -p ${.ALLSRC} ${LIBKERN}
1.35      cgd       144: .if defined(KINCLUDES) && !empty(KINCLUDES)
1.22      cgd       145:        (cd ${.CURDIR} ; cp -p ${KINCLUDES} ${LIBKERN})
1.35      cgd       146: .endif
1.14      jtc       147:
1.15      jtc       148: copy-to-libkern-machdep: ${KMSRCS}
                    149: .if defined(KMSRCS) && !empty(KMSRCS)
1.83      drochner  150:        cp -p ${.ALLSRC} ${LIBKERN}/arch/${ARCHSUBDIR}
1.18      cgd       151: .endif
                    152: .if defined(KMINCLUDES) && !empty(KMINCLUDES)
1.83      drochner  153:        (cd ${.CURDIR} ; cp -p ${KMINCLUDES} ${LIBKERN}/arch/${ARCHSUBDIR})
1.15      jtc       154: .endif
                    155:
1.14      jtc       156: rm-from-libkern:
                    157:        for i in ${KSRCS}; do rm -f ${LIBKERN}/$$i; done
1.15      jtc       158: .if defined(KMSRCS) && !empty(KMSRCS)
1.83      drochner  159:        for i in ${KMSRCS}; do rm -f ${LIBKERN}/arch/${ARCHSUBDIR}/$$i; done
1.15      jtc       160: .endif
1.36      cgd       161:
1.102     thorpej   162: realall: tags
                    163: tags: ${SRCS}
1.118     lukem     164:        ${_MKTARGET_CREATE}
1.115     ross      165:        -${TOOL_CTAGS} -w ${.ALLSRC:M*.c}
                    166:        -egrep "^ENTRY(.*)|^FUNC(.*)|^SYSCALL(.*)" /dev/null ${.ALLSRC:M*.S} | \
1.36      cgd       167:            sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
1.64      christos  168:            >> ${.TARGET}; sort -o ${.TARGET} ${.TARGET}
1.65      christos  169:
1.102     thorpej   170: FILES=         tags
1.82      tv        171: FILESNAME=     libc.tags
                    172: FILESDIR=      /var/db
1.32      cgd       173:
1.97      itojun    174:
1.103     tshiozak  175: # workaround for I18N stuffs: build singlebyte setlocale() for libc.a,
1.97      itojun    176: # multibyte for libc.so.  the quirk should be removed when we support
                    177: # dlopen() from within statically linked binaries.
1.105     yamt      178: CSHLIBFLAGS+=  -D_I18N_DYNAMIC
                    179:
                    180: .include <bsd.lib.mk>

CVSweb <webmaster@jp.NetBSD.org>