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