Home | History | Annotate | Line # | Download | only in libkern
Makefile revision 1.87.8.1
      1  1.87.8.1      yamt #	$NetBSD: Makefile,v 1.87.8.1 2008/06/17 09:15:12 yamt Exp $
      2       1.1       cgd 
      3      1.68     perry LIB=		kern
      4      1.68     perry NOPIC=		# defined
      5      1.68     perry LLIBS=		# defined
      6       1.9   deraadt 
      7      1.59     bjh21 .include <bsd.own.mk>
      8      1.59     bjh21 
      9      1.69      fvdl .if defined(LIBKERN_ARCH) && !empty(LIBKERN_ARCH) && \
     10      1.69      fvdl     exists(${KERNDIR}/arch/${LIBKERN_ARCH})
     11      1.69      fvdl ARCHSUBDIR=     ${LIBKERN_ARCH}
     12      1.69      fvdl .elif defined(MACHINE_ARCH) && !empty(MACHINE_ARCH) && \
     13      1.60     enami     exists(${KERNDIR}/arch/${MACHINE_ARCH})
     14      1.59     bjh21 ARCHSUBDIR=     ${MACHINE_ARCH}
     15      1.60     enami .elif defined(MACHINE_CPU) && !empty(MACHINE_CPU) && \
     16      1.72     perry     exists(${KERNDIR}/arch/${MACHINE_CPU})
     17      1.59     bjh21 ARCHSUBDIR=     ${MACHINE_CPU}
     18      1.59     bjh21 .else
     19      1.59     bjh21 .BEGIN:
     20      1.60     enami 	@echo no ARCHSUBDIR for ${MACHINE_ARCH} nor ${MACHINE_CPU}
     21      1.60     enami 	@false
     22      1.59     bjh21 .endif
     23      1.59     bjh21 
     24      1.52  drochner M= ${KERNDIR}/arch/${ARCHSUBDIR}
     25      1.20  christos 
     26      1.32       cgd CPPFLAGS=	-I$M ${KERNCPPFLAGS} ${KERNMISCCPPFLAGS}
     27      1.29   mycroft 
     28      1.77  christos .include "${.PARSEDIR}/../../../common/lib/libc/Makefile.inc"
     29      1.80   thorpej .include "${.PARSEDIR}/../../../common/lib/libprop/Makefile.inc"
     30      1.77  christos 
     31      1.81   tsutsui CPPFLAGS+=	-I${KERNDIR}/../../../common/include
     32      1.81   tsutsui 
     33      1.52  drochner .PATH.c: ${KERNDIR}
     34      1.29   mycroft .if exists ($M/Makefile.inc)
     35      1.52  drochner .PATH.c: $M
     36      1.52  drochner .PATH.S: $M
     37      1.29   mycroft .include "$M/Makefile.inc"
     38       1.1       cgd .endif
     39       1.5       cgd 
     40      1.19       cgd .if (${MACHINE_ARCH} != "alpha")
     41       1.5       cgd # Quad support
     42       1.5       cgd SRCS+=	adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
     43       1.5       cgd 	lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \
     44       1.5       cgd 	subdi3.c  ucmpdi2.c udivdi3.c umoddi3.c xordi3.c
     45      1.19       cgd .endif
     46       1.8       cgd 
     47       1.8       cgd # Other stuff
     48  1.87.8.1      yamt SRCS+=	__cmsg_alignbytes.c cpuset.c inet_addr.c intoa.c
     49      1.83  christos SRCS+=	md4c.c md5c.c rmd160.c sha1.c sha2.c
     50      1.87      matt SRCS+=	pmatch.c arc4random.c bcd.c mcount.c mertwist.c
     51      1.66  junyoung 
     52      1.84    dyoung SRCS+=	strsep.c strstr.c strlcpy.c strlcat.c
     53      1.71       dsl 
     54      1.82   thorpej SRCS+=	strtoll.c strtoull.c strtoumax.c
     55      1.79   thorpej 
     56      1.71       dsl SRCS+=	xlat_mbr_fstype.c
     57      1.27    scottr 
     58      1.85      yamt SRCS+=	rb.c
     59      1.85      yamt COPTS.rb.c+=	-Wno-missing-field-initializers
     60      1.85      yamt 
     61      1.27    scottr # Files to clean up
     62      1.27    scottr CLEANFILES+= lib${LIB}.o lib${LIB}.po
     63       1.5       cgd 
     64      1.46     perry # XXX these stub builds should be cleaned up even further.
     65      1.46     perry 
     66      1.46     perry # if no machine specific memcpy(3), build one out of bcopy(3) based stub.
     67      1.40   mycroft .if empty(SRCS:Mmemcpy.S)
     68      1.46     perry SRCS+=	memcpy.c
     69      1.44     perry .endif
     70      1.44     perry 
     71      1.46     perry # if no machine specific memmove(3), build one out of bcopy(3) based stub.
     72      1.44     perry .if empty(SRCS:Mmemmove.S)
     73      1.46     perry SRCS+=	memmove.c
     74      1.40   mycroft .endif
     75      1.38       cgd 
     76      1.46     perry # if no machine specific strchr(3), build one out of index(3) based stub.
     77      1.38       cgd .if empty(SRCS:Mstrchr.S)
     78      1.46     perry SRCS+=	strchr.c
     79      1.38       cgd .endif
     80      1.38       cgd 
     81      1.46     perry # if no machine specific strrchr(3), build one out of rindex(3) based stub.
     82      1.38       cgd .if empty(SRCS:Mstrrchr.S)
     83      1.46     perry SRCS+=	strrchr.c
     84      1.38       cgd .endif
     85      1.36       cjs 
     86      1.36       cjs # only needed during build
     87      1.36       cjs libinstall::
     88       1.1       cgd 
     89      1.62        tv .undef DESTDIR
     90       1.1       cgd .include <bsd.lib.mk>
     91      1.23   mycroft 
     92      1.23   mycroft lib${LIB}.o:: ${OBJS}
     93      1.23   mycroft 	@echo building standard ${LIB} library
     94      1.23   mycroft 	@rm -f lib${LIB}.o
     95      1.37       gwr 	@${LD} -r -o lib${LIB}.o `NM=${NM} ${LORDER} ${OBJS} | ${TSORT}`
     96      1.23   mycroft 
     97      1.23   mycroft lib${LIB}.po:: ${POBJS}
     98      1.23   mycroft 	@echo building profiled ${LIB} library
     99      1.23   mycroft 	@rm -f lib${LIB}.po
    100      1.37       gwr 	@${LD} -r -o lib${LIB}.po `NM=${NM} ${LORDER} ${POBJS} | ${TSORT}`
    101      1.65  wrstuden 
    102      1.65  wrstuden showsources: ${SRCS}
    103      1.65  wrstuden 	@echo ${.ALLSRC}
    104