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