158f0484fSRodney W. Grimes# @(#)Makefile 8.2 (Berkeley) 2/3/94 27f3dea24SPeter Wemm# $FreeBSD$ 3e1fe3dbaSRuslan Ermilov 4e1fe3dbaSRuslan Ermilov.include <bsd.own.mk> 5e1fe3dbaSRuslan Ermilov 6ecaaecd7SDavid E. O'Brien# All library objects contain FreeBSD revision strings by default; they may be 758f0484fSRodney W. Grimes# excluded as a space-saving measure. To produce a library that does 854a5fb6cSDavid E. O'Brien# not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to CFLAGS 9e481bf77SBruce Evans# below. Note: there are no IDs for syscall stubs whose sources are generated. 10e481bf77SBruce Evans# To include legacy CSRG sccsid strings, add -DLIBC_SCCS and -DSYSLIBC_SCCS 11e481bf77SBruce Evans# to CFLAGS below. -DSYSLIBC_SCCS affects just the system call stubs. 1258f0484fSRodney W. GrimesLIB=c 13e481bf77SBruce Evans# If you bump SHLIB_MAJOR, remove the kluge from gen/gethostname.c. 14e481bf77SBruce Evans# If you bump SHLIB_MAJOR, see standards/55112. 156bc2b4b7STim J. RobbinsSHLIB_MAJOR= 6 1641d8423fSGordon TetlowSHLIBDIR?= /lib 178e1b0bc6SJacques VidrineWARNS?= 2 180b3cbc5cSRuslan ErmilovCFLAGS+=-I${.CURDIR}/include -I${.CURDIR}/../../include 190b3cbc5cSRuslan ErmilovCFLAGS+=-I${.CURDIR}/${MACHINE_ARCH} 2058f0484fSRodney W. GrimesCLEANFILES+=tags 21a35d8893SRuslan ErmilovINSTALL_PIC_ARCHIVE= 22a35d8893SRuslan ErmilovPRECIOUSLIB= 2358f0484fSRodney W. Grimes 24c51d717fSRuslan Ermilov# Define (empty) variables so that make doesn't give substitution 25c51d717fSRuslan Ermilov# errors if the included makefiles don't change these: 26c51d717fSRuslan ErmilovMDSRCS= 27c51d717fSRuslan ErmilovMISRCS= 28c51d717fSRuslan ErmilovMDASM= 29c51d717fSRuslan ErmilovMIASM= 30c51d717fSRuslan ErmilovNOASM= 31c51d717fSRuslan Ermilov 32c51d717fSRuslan Ermilov.include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc" 33c51d717fSRuslan Ermilov.include "${.CURDIR}/db/Makefile.inc" 34c51d717fSRuslan Ermilov.include "${.CURDIR}/compat-43/Makefile.inc" 35120a95cbSDavid E. O'Brien.include "${.CURDIR}/gdtoa/Makefile.inc" 36c51d717fSRuslan Ermilov.include "${.CURDIR}/gen/Makefile.inc" 37c51d717fSRuslan Ermilov.include "${.CURDIR}/gmon/Makefile.inc" 38c51d717fSRuslan Ermilov.include "${.CURDIR}/locale/Makefile.inc" 39c51d717fSRuslan Ermilov.include "${.CURDIR}/net/Makefile.inc" 40c51d717fSRuslan Ermilov.include "${.CURDIR}/nls/Makefile.inc" 41c51d717fSRuslan Ermilov.include "${.CURDIR}/posix1e/Makefile.inc" 423029eff7SRuslan Ermilov.if ${MACHINE_ARCH} != "alpha" && \ 433029eff7SRuslan Ermilov ${MACHINE_ARCH} != "amd64" && \ 443029eff7SRuslan Ermilov ${MACHINE_ARCH} != "ia64" && \ 453029eff7SRuslan Ermilov ${MACHINE_ARCH} != "sparc64" 46c51d717fSRuslan Ermilov.include "${.CURDIR}/quad/Makefile.inc" 47c51d717fSRuslan Ermilov.endif 48c51d717fSRuslan Ermilov.include "${.CURDIR}/regex/Makefile.inc" 49c51d717fSRuslan Ermilov.include "${.CURDIR}/stdio/Makefile.inc" 50c51d717fSRuslan Ermilov.include "${.CURDIR}/stdlib/Makefile.inc" 51c51d717fSRuslan Ermilov.include "${.CURDIR}/stdtime/Makefile.inc" 52c51d717fSRuslan Ermilov.include "${.CURDIR}/string/Makefile.inc" 53c51d717fSRuslan Ermilov.include "${.CURDIR}/sys/Makefile.inc" 54c51d717fSRuslan Ermilov.include "${.CURDIR}/rpc/Makefile.inc" 55c51d717fSRuslan Ermilov.include "${.CURDIR}/uuid/Makefile.inc" 56c51d717fSRuslan Ermilov.include "${.CURDIR}/xdr/Makefile.inc" 572357939bSOlivier Houchard.if ${MACHINE_ARCH} == "arm" 582357939bSOlivier Houchard.include "${.CURDIR}/softfloat/Makefile.inc" 592357939bSOlivier Houchard.endif 60e1fe3dbaSRuslan Ermilov.if ${MK_NIS} != "no" 61c51d717fSRuslan ErmilovCFLAGS+= -DYP 62c51d717fSRuslan Ermilov.include "${.CURDIR}/yp/Makefile.inc" 63c51d717fSRuslan Ermilov.endif 64e1fe3dbaSRuslan Ermilov.if ${MK_HESIOD} != "no" 65c51d717fSRuslan ErmilovCFLAGS+= -DHESIOD 66c51d717fSRuslan Ermilov.endif 67e1fe3dbaSRuslan Ermilov.if ${MK_FP_LIBC} == "no" 68757edc65SDavid SchultzCFLAGS+= -DNO_FLOATING_POINT 69757edc65SDavid Schultz.endif 70c51d717fSRuslan Ermilov 7196e022f7SDaniel Eischen.if defined(SYMVER_ENABLED) 7296e022f7SDaniel EischenVERSION_DEF=${.CURDIR}/Versions.def 7396e022f7SDaniel EischenSYMBOL_MAPS=${SYM_MAPS} 7496e022f7SDaniel EischenCFLAGS+= -DSYMBOL_VERSIONING 7596e022f7SDaniel Eischen.endif 7696e022f7SDaniel Eischen 77c51d717fSRuslan Ermilov# If there are no machine dependent sources, append all the 78c51d717fSRuslan Ermilov# machine-independent sources: 79c51d717fSRuslan Ermilov.if empty(MDSRCS) 80c51d717fSRuslan ErmilovSRCS+= ${MISRCS} 81c51d717fSRuslan Ermilov.else 82c51d717fSRuslan Ermilov# Append machine-dependent sources, then append machine-independent sources 83c51d717fSRuslan Ermilov# for which there is no machine-dependent variant. 84c51d717fSRuslan ErmilovSRCS+= ${MDSRCS} 85c51d717fSRuslan Ermilov.for _src in ${MISRCS} 86c51d717fSRuslan Ermilov.if ${MDSRCS:R:M${_src:R}} == "" 87c51d717fSRuslan ErmilovSRCS+= ${_src} 88c51d717fSRuslan Ermilov.endif 89c51d717fSRuslan Ermilov.endfor 90c51d717fSRuslan Ermilov.endif 9158f0484fSRodney W. Grimes 9258f0484fSRodney W. GrimesKQSRCS= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \ 9358f0484fSRodney W. Grimes lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \ 9458f0484fSRodney W. Grimes subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c 95f434fe12SDag-Erling SmørgravKSRCS= bcmp.c ffs.c ffsl.c fls.c flsl.c index.c mcount.c rindex.c \ 96f434fe12SDag-Erling Smørgrav strcat.c strcmp.c strcpy.c strlen.c strncpy.c 9758f0484fSRodney W. Grimes 98d22114bfSKATO Takenorilibkern: libkern.gen libkern.${MACHINE_ARCH} 9958f0484fSRodney W. Grimes 10058f0484fSRodney W. Grimeslibkern.gen: ${KQSRCS} ${KSRCS} 1016ded366aSSatoshi Asami cp -p ${.CURDIR}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern 10258f0484fSRodney W. Grimes 103d22114bfSKATO Takenorilibkern.${MACHINE_ARCH}:: ${KMSRCS} 10458f0484fSRodney W. Grimes.if defined(KMSRCS) && !empty(KMSRCS) 105d22114bfSKATO Takenori cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${MACHINE_ARCH} 10658f0484fSRodney W. Grimes.endif 10758f0484fSRodney W. Grimes 10858f0484fSRodney W. Grimes.include <bsd.lib.mk> 109042a0b7eSRuslan Ermilov 110042a0b7eSRuslan Ermilov# Disable warnings in contributed sources. 111042a0b7eSRuslan ErmilovCWARNFLAGS:= ${.IMPSRC:Ngdtoa_*.c:C/^.+$/${CWARNFLAGS}/} 112