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

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

1.169.14.2! pgoyette    1: #      $NetBSD: Makefile,v 1.172 2018/08/03 14:01:21 kamil 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.169.14.2! pgoyette   20:
        !            21: # generated code depends on RTTI
        !            22: LIBCSANITIZERFLAGS+=   ${${ACTIVE_CC} == "clang":? -fno-sanitize=function :}
        !            23:
1.127     christos   24: .include "Makefile.inc"
1.107     lukem      25:
1.82      tv         26: LIB=           c
1.117     christos   27: CPPFLAGS+=     -I${.CURDIR}/include -I${.CURDIR}
1.104     thorpej    28:
1.136     mrg        29: LIBCDIR=       ${.CURDIR}
                     30:
1.82      tv         31: .if exists (${ARCHDIR}/Makefile.inc)
                     32: .PATH: ${ARCHDIR}
                     33: .include "${ARCHDIR}/Makefile.inc"
1.9       deraadt    34: .endif
1.127     christos   35:
1.114     matt       36: .if exists (${ARCHDIR}/genassym.cf)
                     37: DPSRCS+=       assym.h
                     38: CLEANFILES+=   assym.h assym.h.tmp
                     39:
1.122     thorpej    40: assym.h: ${ARCHDIR}/genassym.cf
1.114     matt       41:        ${_MKTARGET_CREATE}
1.165     joerg      42:        ${TOOL_GENASSYM} -- ${CC} ${CFLAGS:N-Wa,*} \
1.121     matt       43:                ${CPPFLAGS} ${CPPFLAGS.assym.h} ${PROF} \
1.165     joerg      44:                ${GENASSYM_CPPFLAGS} < ${ARCHDIR}/genassym.cf > assym.h.tmp && \
1.114     matt       45:        mv -f assym.h.tmp assym.h
                     46: .endif
1.1       cgd        47:
1.127     christos   48: # The following controls how to build compatibility code for old NetBSD
1.150     joerg      49: # binaries. If BUILD_LEGACY is yes, then we build a separate library; otherwise
1.127     christos   50: # we include the code in libc.
1.150     joerg      51: BUILD_LEGACY?= no
                     52: .if "${BUILD_LEGACY}" == "yes"
1.127     christos   53: SUBDIR=compat
                     54: .include <bsd.subdir.mk>
                     55: .else
                     56: COMPATDIR=${.CURDIR}/compat
                     57: .include "${.CURDIR}/compat/Makefile.inc"
1.150     joerg      58: # Marker for compat code that can't be easily isolated
                     59: CPPFLAGS+=     -D__BUILD_LEGACY
1.127     christos   60: .endif
                     61:
1.125     christos   62: .include "${.CURDIR}/../../common/lib/libc/Makefile.inc"
1.135     ad         63: .include "${.CURDIR}/atomic/Makefile.inc"
1.141     joerg      64: .include "${.CURDIR}/cdb/Makefile.inc"
1.7       cgd        65: .include "${.CURDIR}/db/Makefile.inc"
1.111     tshiozak   66: .include "${.CURDIR}/citrus/Makefile.inc"
1.1       cgd        67: .include "${.CURDIR}/compat-43/Makefile.inc"
1.159     joerg      68: .include "${.CURDIR}/compiler_rt/Makefile.inc"
1.88      minoura    69: .include "${.CURDIR}/dlfcn/Makefile.inc"
1.126     kleink     70: .include "${.CURDIR}/gdtoa/Makefile.inc"
1.1       cgd        71: .include "${.CURDIR}/gen/Makefile.inc"
1.24      cgd        72: .include "${.CURDIR}/gmon/Makefile.inc"
1.81      explorer   73: .include "${.CURDIR}/hash/Makefile.inc"
1.111     tshiozak   74: .include "${.CURDIR}/iconv/Makefile.inc"
1.117     christos   75: .include "${.CURDIR}/inet/Makefile.inc"
                     76: .include "${.CURDIR}/isc/Makefile.inc"
1.1       cgd        77: .include "${.CURDIR}/locale/Makefile.inc"
1.52      thorpej    78: .include "${.CURDIR}/md/Makefile.inc"
1.132     ad         79: .include "${.CURDIR}/misc/Makefile.inc"
1.1       cgd        80: .include "${.CURDIR}/net/Makefile.inc"
1.117     christos   81: .include "${.CURDIR}/nameser/Makefile.inc"
1.25      jtc        82: .include "${.CURDIR}/nls/Makefile.inc"
1.24      cgd        83: .include "${.CURDIR}/regex/Makefile.inc"
1.117     christos   84: .include "${.CURDIR}/resolv/Makefile.inc"
1.24      cgd        85: .include "${.CURDIR}/rpc/Makefile.inc"
1.131     tls        86: .include "${.CURDIR}/ssp/Makefile.inc"
1.1       cgd        87: .include "${.CURDIR}/stdio/Makefile.inc"
                     88: .include "${.CURDIR}/stdlib/Makefile.inc"
                     89: .include "${.CURDIR}/string/Makefile.inc"
1.40      jtc        90: .include "${.CURDIR}/termios/Makefile.inc"
1.108     thorpej    91: .include "${.CURDIR}/thread-stub/Makefile.inc"
1.38      jtc        92: .include "${.CURDIR}/time/Makefile.inc"
1.167     pooka      93: .if ${RUMPRUN} != "yes"
1.144     joerg      94: .include "${.CURDIR}/tls/Makefile.inc"
1.167     pooka      95: .endif
1.1       cgd        96: .include "${.CURDIR}/sys/Makefile.inc"
1.162     joerg      97: .if ${HAVE_LIBGCC_EH} == "no"
1.159     joerg      98: .include "${NETBSDSRCDIR}/sys/lib/libunwind/Makefile.inc"
                     99: .endif
1.119     thorpej   100: .include "${.CURDIR}/uuid/Makefile.inc"
1.104     thorpej   101: .if (${MKYP} != "no")
1.4       deraadt   102: .include "${.CURDIR}/yp/Makefile.inc"
1.104     thorpej   103: .endif
1.41      jtc       104:
1.138     dsl       105: # Remove from SRCS the .c files for any .S files added by the MD makefiles,
                    106: # also remove from SRCS the .c files for the .S and .c files in NO_SRCS.
                    107: # Add the .c file for .S files (in both variables) to LSRCS so that the
                    108: # 'normal' .c file for assembly files is used for the lint librray.
                    109: #
                    110: # Usage:
                    111: # Add .S files to NO_SRSC when another .S file provides the entry points.
                    112: # Add .c files to NO_SRSC when another .c file provides the entry points.
                    113: # (lint is run on all .c files in SRCS)
                    114:
                    115: .for check_file in ${SRCS:M*.S} ${NO_SRCS}
                    116: unwanted_file := ${SRCS:M${check_file:.S=.c}}
1.137     dsl       117: .if "${unwanted_file}" != ""
                    118: SRCS := ${SRCS:N${unwanted_file}}
1.138     dsl       119: .if "${unwanted_file}" != "${check_file}"
                    120: LSRCS := ${LSRCS} ${unwanted_file}
                    121: .endif
1.137     dsl       122: .endif
                    123: .endfor
                    124:
1.109     jmmv      125: NLS=   C.msg Pig.msg ca.msg cs.msg de.msg es.msg fi.msg fr.msg nl.msg \
1.110     salo      126:        no.msg pl.msg sk.msg sv.msg
1.1       cgd       127:
1.163     apb       128: .if ${MKREPRO:Uno} == "yes"
                    129: REGEX_SPECIALS=[][)(^$$.?*\\;]
                    130: MKREPRO_SED=   -e 's;${NETBSDSRCDIR:C/${REGEX_SPECIALS}/\\\\&/g};/usr/src;'
                    131: .endif
                    132:
1.169     christos  133: .if !defined(MLIBDIR) && ${RUMPRUN} != "yes"
1.140     uebayasi  134: realall: tags
1.145     drochner  135: tags: ${SRCS}
1.118     lukem     136:        ${_MKTARGET_CREATE}
1.163     apb       137:        -${TOOL_CTAGS} -f ${.TARGET}.tmp -w ${.ALLSRC:M*.c}
1.115     ross      138:        -egrep "^ENTRY(.*)|^FUNC(.*)|^SYSCALL(.*)" /dev/null ${.ALLSRC:M*.S} | \
1.36      cgd       139:            sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
1.163     apb       140:            >> ${.TARGET}.tmp
                    141: .if ${MKREPRO:Uno} == "yes"
                    142:        sed ${MKREPRO_SED} <${.TARGET}.tmp | sort -o ${.TARGET}
                    143: .else
                    144:        sort -o ${.TARGET} ${.TARGET}.tmp
                    145: .endif
                    146:        rm -f ${.TARGET}.tmp
1.65      christos  147:
1.145     drochner  148: FILES=         tags
1.82      tv        149: FILESNAME=     libc.tags
                    150: FILESDIR=      /var/db
1.167     pooka     151: .endif
1.32      cgd       152:
1.97      itojun    153:
1.103     tshiozak  154: # workaround for I18N stuffs: build singlebyte setlocale() for libc.a,
1.97      itojun    155: # multibyte for libc.so.  the quirk should be removed when we support
                    156: # dlopen() from within statically linked binaries.
1.130     tnozaki   157: CSHLIBFLAGS+=  -D_I18N_DYNAMIC
1.105     yamt      158:
                    159: .include <bsd.lib.mk>
1.133     ad        160:
                    161: # force the dynamic linker to initialize libc first
1.134     he        162: SHLIB_SHFLAGS+=        -Wl,-z,initfirst
1.160     joerg     163: .if ${HAVE_LIBGCC} == "no"
1.159     joerg     164: SHLIB_SHFLAGS+= -Wl,-z,defs
                    165: .endif

CVSweb <webmaster@jp.NetBSD.org>