Home | History | Annotate | Line # | Download | only in libc
Makefile revision 1.130
      1 #	$NetBSD: Makefile,v 1.130 2007/03/19 12:27:22 tnozaki Exp $
      2 #	@(#)Makefile	8.2 (Berkeley) 2/3/94
      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
      7 # from CPPFLAGS below.  To remove these strings from just the system call
      8 # stubs, remove just -DSYSLIBC_SCCS from CPPFLAGS.
      9 #
     10 # The NLS (message catalog) functions are always in libc.  To choose that
     11 # strerror(), perror(), strsignal(), psignal(), etc. actually call the NLS
     12 # functions, put -DNLS on the CPPFLAGS line below.
     13 #
     14 # The YP functions are always in libc. To choose that getpwent() and friends
     15 # actually call the YP functions, put -DYP on the CPPFLAGS line below.
     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.
     19 
     20 .include "Makefile.inc"
     21 
     22 LIB=		c
     23 CPPFLAGS+=	-I${.CURDIR}/include -I${.CURDIR}
     24 
     25 .if exists (${ARCHDIR}/Makefile.inc)
     26 .PATH:	${ARCHDIR}
     27 .include "${ARCHDIR}/Makefile.inc"
     28 .endif
     29 
     30 .if exists (${ARCHDIR}/genassym.cf)
     31 DPSRCS+=	assym.h
     32 CLEANFILES+=	assym.h assym.h.tmp
     33 
     34 assym.h: ${ARCHDIR}/genassym.cf
     35 	${_MKTARGET_CREATE}
     36 	${TOOL_GENASSYM} -- ${CC} ${CFLAGS} \
     37 		${CPPFLAGS} ${CPPFLAGS.assym.h} ${PROF} \
     38 		< ${ARCHDIR}/genassym.cf > assym.h.tmp && \
     39 	mv -f assym.h.tmp assym.h
     40 .endif
     41 
     42 # The following controls how to build compatibility code for old NetBSD
     43 # binaries. If BUILDCOLD is yes, then we build a separate library; otherwise
     44 # we include the code in libc.
     45 BUILDCOLD?= no
     46 .if "${BUILDCOLD}" == "yes"
     47 SUBDIR=compat
     48 .include <bsd.subdir.mk>
     49 .else
     50 COMPATDIR=${.CURDIR}/compat
     51 .include "${.CURDIR}/compat/Makefile.inc"
     52 .endif
     53 
     54 .include "${.CURDIR}/../../common/lib/libc/Makefile.inc"
     55 .include "${.CURDIR}/db/Makefile.inc"
     56 .include "${.CURDIR}/citrus/Makefile.inc"
     57 .include "${.CURDIR}/compat-43/Makefile.inc"
     58 .include "${.CURDIR}/dlfcn/Makefile.inc"
     59 .include "${.CURDIR}/gdtoa/Makefile.inc"
     60 .include "${.CURDIR}/gen/Makefile.inc"
     61 .include "${.CURDIR}/gmon/Makefile.inc"
     62 .include "${.CURDIR}/hash/Makefile.inc"
     63 .include "${.CURDIR}/iconv/Makefile.inc"
     64 .include "${.CURDIR}/inet/Makefile.inc"
     65 .include "${.CURDIR}/isc/Makefile.inc"
     66 .include "${.CURDIR}/locale/Makefile.inc"
     67 .include "${.CURDIR}/md/Makefile.inc"
     68 .include "${.CURDIR}/net/Makefile.inc"
     69 .include "${.CURDIR}/nameser/Makefile.inc"
     70 .include "${.CURDIR}/nls/Makefile.inc"
     71 .if (${MACHINE_ARCH} != "alpha") && (${MACHINE_ARCH} != "sparc64")
     72 .include "${.CURDIR}/quad/Makefile.inc"
     73 .endif
     74 .include "${.CURDIR}/regex/Makefile.inc"
     75 .include "${.CURDIR}/resolv/Makefile.inc"
     76 .include "${.CURDIR}/rpc/Makefile.inc"
     77 .include "${.CURDIR}/stdio/Makefile.inc"
     78 .include "${.CURDIR}/stdlib/Makefile.inc"
     79 .include "${.CURDIR}/string/Makefile.inc"
     80 .include "${.CURDIR}/termios/Makefile.inc"
     81 .include "${.CURDIR}/thread-stub/Makefile.inc"
     82 .include "${.CURDIR}/time/Makefile.inc"
     83 .include "${.CURDIR}/sys/Makefile.inc"
     84 .include "${.CURDIR}/uuid/Makefile.inc"
     85 .if (${MKYP} != "no")
     86 .include "${.CURDIR}/yp/Makefile.inc"
     87 .endif
     88 
     89 NLS=	C.msg Pig.msg ca.msg cs.msg de.msg es.msg fi.msg fr.msg nl.msg \
     90 	no.msg pl.msg sk.msg sv.msg
     91 
     92 realall: tags
     93 tags: ${SRCS}
     94 	${_MKTARGET_CREATE}
     95 	-${TOOL_CTAGS} -w ${.ALLSRC:M*.c}
     96 	-egrep "^ENTRY(.*)|^FUNC(.*)|^SYSCALL(.*)" /dev/null ${.ALLSRC:M*.S} | \
     97 	    sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
     98 	    >> ${.TARGET}; sort -o ${.TARGET} ${.TARGET}
     99 
    100 FILES=		tags
    101 FILESNAME=	libc.tags
    102 FILESDIR=	/var/db
    103 
    104 
    105 # workaround for I18N stuffs: build singlebyte setlocale() for libc.a,
    106 # multibyte for libc.so.  the quirk should be removed when we support
    107 # dlopen() from within statically linked binaries.
    108 CSHLIBFLAGS+=	-D_I18N_DYNAMIC
    109 
    110 .include <bsd.lib.mk>
    111