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

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

1.111   ! tshiozak    1: #      $NetBSD: Makefile,v 1.110 2003/04/14 05:21:50 salo 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.82      tv         24: LIB=           c
1.104     thorpej    25: CPPFLAGS+=     -D_LIBC -DLIBC_SCCS -DSYSLIBC_SCCS -D_REENTRANT
                     26: CPPFLAGS+=     -I${.CURDIR}/include
                     27:
                     28: .if (${USE_HESIOD} != "no")
                     29: CPPFLAGS+=     -DHESIOD
                     30: .endif
                     31:
1.87      itojun     32: CPPFLAGS+=     -DINET6
1.104     thorpej    33: CPPFLAGS+=     -DNLS
1.100     lukem      34:
1.104     thorpej    35: .if (${USE_YP} != "no")
                     36: CPPFLAGS+=     -DYP
                     37: .endif
1.98      christos   38:
                     39: .if ${MACHINE_ARCH} == "i386"
                     40: # Set lint to exit on warnings
                     41: LINTFLAGS+=    -w
                     42: .endif
                     43: # ignore 'empty translation unit' warnings.
                     44: LINTFLAGS+=    -X 272
1.82      tv         45:
1.95      itojun     46: .if exists(${.CURDIR}/arch/${MACHINE_ARCH})
                     47: ARCHSUBDIR=    ${MACHINE_ARCH}
                     48: .elif exists(${.CURDIR}/arch/${MACHINE_CPU})
                     49: ARCHSUBDIR=    ${MACHINE_CPU}
                     50: .else
                     51: .BEGIN:
                     52:        @echo no ARCHSUBDIR for ${MACHINE_ARCH} nor ${MACHINE_CPU}
                     53:        @false
                     54: .endif
                     55:
1.83      drochner   56: ARCHDIR=       ${.CURDIR}/arch/${ARCHSUBDIR}
1.82      tv         57: AINC=          -I${ARCHDIR}
1.27      mycroft    58: .if defined(DESTDIR)
1.82      tv         59: AINC+=         -nostdinc -idirafter ${DESTDIR}/usr/include
1.27      mycroft    60: .endif
1.102     thorpej    61: CLEANFILES+=   tags
1.51      cgd        62:
1.73      mikel      63: # Don't try to lint the C library against itself when creating llib-lc.ln
1.51      cgd        64: LLIBS=
1.89      fvdl       65:
                     66: INCSDIR=       /usr/include
1.9       deraadt    67:
1.82      tv         68: .if exists (${ARCHDIR}/Makefile.inc)
                     69: .PATH: ${ARCHDIR}
                     70: .include "${ARCHDIR}/Makefile.inc"
1.9       deraadt    71: .endif
1.1       cgd        72:
1.7       cgd        73: .include "${.CURDIR}/db/Makefile.inc"
1.111   ! tshiozak   74: .include "${.CURDIR}/citrus/Makefile.inc"
1.1       cgd        75: .include "${.CURDIR}/compat-43/Makefile.inc"
1.88      minoura    76: .include "${.CURDIR}/dlfcn/Makefile.inc"
1.1       cgd        77: .include "${.CURDIR}/gen/Makefile.inc"
1.24      cgd        78: .include "${.CURDIR}/gmon/Makefile.inc"
1.81      explorer   79: .include "${.CURDIR}/hash/Makefile.inc"
1.111   ! tshiozak   80: .include "${.CURDIR}/iconv/Makefile.inc"
1.1       cgd        81: .include "${.CURDIR}/locale/Makefile.inc"
1.52      thorpej    82: .include "${.CURDIR}/md/Makefile.inc"
1.1       cgd        83: .include "${.CURDIR}/net/Makefile.inc"
1.25      jtc        84: .include "${.CURDIR}/nls/Makefile.inc"
1.78      eeh        85: .if (${MACHINE_ARCH} != "alpha") && (${MACHINE_ARCH} != "sparc64")
1.24      cgd        86: .include "${.CURDIR}/quad/Makefile.inc"
1.34      cgd        87: .endif
1.24      cgd        88: .include "${.CURDIR}/regex/Makefile.inc"
                     89: .include "${.CURDIR}/rpc/Makefile.inc"
1.1       cgd        90: .include "${.CURDIR}/stdio/Makefile.inc"
                     91: .include "${.CURDIR}/stdlib/Makefile.inc"
                     92: .include "${.CURDIR}/string/Makefile.inc"
1.40      jtc        93: .include "${.CURDIR}/termios/Makefile.inc"
1.108     thorpej    94: .include "${.CURDIR}/thread-stub/Makefile.inc"
1.38      jtc        95: .include "${.CURDIR}/time/Makefile.inc"
1.1       cgd        96: .include "${.CURDIR}/sys/Makefile.inc"
1.104     thorpej    97: .if (${MKYP} != "no")
1.4       deraadt    98: .include "${.CURDIR}/yp/Makefile.inc"
1.104     thorpej    99: .endif
1.41      jtc       100:
1.109     jmmv      101: NLS=   C.msg Pig.msg ca.msg cs.msg de.msg es.msg fi.msg fr.msg nl.msg \
1.110     salo      102:        no.msg pl.msg sk.msg sv.msg
1.1       cgd       103:
1.106     lukem     104: LIBKERN=       ${NETBSDSRCDIR}/sys/lib/libkern
1.14      jtc       105:
1.80      bouyer    106: KSRCS= bcopy.c bcmp.c bswap16.c bswap32.c bswap64.c bzero.c ffs.c \
1.76      perry     107:        strcat.c strchr.c strcmp.c strcpy.c strlen.c \
                    108:        strncmp.c strncpy.c strrchr.c \
                    109:        htonl.c htons.c ntohl.c ntohs.c md5c.c \
                    110:        memchr.c memcmp.c memcpy.c memmove.c memset.c \
                    111:        index.c rindex.c
1.78      eeh       112: .if (${MACHINE_ARCH} != "alpha") && (${MACHINE_ARCH} != "sparc64")
1.22      cgd       113: KSRCS+=        adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
                    114:        lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \
                    115:        subdi3.c  ucmpdi2.c udivdi3.c umoddi3.c xordi3.c
                    116: KINCLUDES+=    quad/quad.h
1.35      cgd       117: .endif
1.14      jtc       118:
1.15      jtc       119: copy-to-libkern:       copy-to-libkern-machind copy-to-libkern-machdep
                    120:
                    121: copy-to-libkern-machind: ${KSRCS}
1.14      jtc       122:        cp -p ${.ALLSRC} ${LIBKERN}
1.35      cgd       123: .if defined(KINCLUDES) && !empty(KINCLUDES)
1.22      cgd       124:        (cd ${.CURDIR} ; cp -p ${KINCLUDES} ${LIBKERN})
1.35      cgd       125: .endif
1.14      jtc       126:
1.15      jtc       127: copy-to-libkern-machdep: ${KMSRCS}
                    128: .if defined(KMSRCS) && !empty(KMSRCS)
1.83      drochner  129:        cp -p ${.ALLSRC} ${LIBKERN}/arch/${ARCHSUBDIR}
1.18      cgd       130: .endif
                    131: .if defined(KMINCLUDES) && !empty(KMINCLUDES)
1.83      drochner  132:        (cd ${.CURDIR} ; cp -p ${KMINCLUDES} ${LIBKERN}/arch/${ARCHSUBDIR})
1.15      jtc       133: .endif
                    134:
1.14      jtc       135: rm-from-libkern:
                    136:        for i in ${KSRCS}; do rm -f ${LIBKERN}/$$i; done
1.15      jtc       137: .if defined(KMSRCS) && !empty(KMSRCS)
1.83      drochner  138:        for i in ${KMSRCS}; do rm -f ${LIBKERN}/arch/${ARCHSUBDIR}/$$i; done
1.15      jtc       139: .endif
1.36      cgd       140:
1.101     tv        141: CTAGS?=                ctags
                    142:
1.102     thorpej   143: realall: tags
                    144: tags: ${SRCS}
1.101     tv        145:        ${CTAGS} -w ${.ALLSRC:M*.c}
1.37      jtc       146:        egrep "^ENTRY(.*)|^FUNC(.*)|^SYSCALL(.*)" /dev/null ${.ALLSRC:M*.S} | \
1.36      cgd       147:            sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
1.64      christos  148:            >> ${.TARGET}; sort -o ${.TARGET} ${.TARGET}
1.65      christos  149:
1.102     thorpej   150: FILES=         tags
1.82      tv        151: FILESNAME=     libc.tags
                    152: FILESDIR=      /var/db
1.32      cgd       153:
1.97      itojun    154:
1.103     tshiozak  155: # workaround for I18N stuffs: build singlebyte setlocale() for libc.a,
1.97      itojun    156: # multibyte for libc.so.  the quirk should be removed when we support
                    157: # dlopen() from within statically linked binaries.
1.105     yamt      158: CSHLIBFLAGS+=  -D_I18N_DYNAMIC
                    159:
                    160: .include <bsd.lib.mk>

CVSweb <webmaster@jp.NetBSD.org>