Loading...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | # $FreeBSD: src/lMakefile.inc,v 1.7 2001/04/04 18:17:25 tmm Exp $ # # This file contains make rules that are shared by libc and libc_r. # # Define (empty) variables so that make doesn't give substitution # errors if the included makefiles don't change these: MDSRCS= MISRCS= MDASM= MIASM= NOASM= # SUPPRESSSRCS is used to prevent machine-independent files from being # built, when a machine-dependent file defines multiple symbols. # Use MDSRCS to block one file, and SUPPRESSSRCS to block the others. SUPPRESSSRCS= # Auto-patching variables AUTOPATCHHDRS= AUTOPATCHMAN= AUTOPATCHSRCS= # Auto-patch into OBJROOT _AUTOPATCH: .USE @if [ -f ${.ALLSRC}.patch ]; then \ echo cp ${.ALLSRC} ${.TARGET}; \ cp ${.ALLSRC} ${.TARGET}; \ echo patch ${.TARGET} ${.ALLSRC}.patch; \ patch ${.TARGET} ${.ALLSRC}.patch; \ else \ echo ln -s ${.ALLSRC} ${.TARGET}; \ ln -s ${.ALLSRC} ${.TARGET}; \ fi # Auto-patch into current directory _AUTOPATCHCUR: .USE @echo cp ${.ALLSRC} ${.TARGET}; \ cp ${.ALLSRC} ${.TARGET}; \ if [ -f ${.ALLSRC}.patch ]; then \ echo patch ${.TARGET} ${.ALLSRC}.patch; \ patch ${.TARGET} ${.ALLSRC}.patch; \ fi # Standard compilation for the various forms _STANDARD_STATIC: .USE ${CC} -static \ ${PRECFLAGS} ${PRECFLAGS-${.IMPSRC:T}} \ ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \ ${VARIANTCFLAGS} ${LIBCFLAGS} \ -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET} _STANDARD_PROFILE: .USE ${CC} -pg -DPROFILE \ ${PRECFLAGS} ${PRECFLAGS-${.IMPSRC:T}} \ ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \ ${VARIANTCFLAGS} ${LIBCFLAGS} \ -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET} _STANDARD_DYNAMIC: .USE ${CC} \ ${PRECFLAGS} ${PRECFLAGS-${.IMPSRC:T}} \ ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \ ${VARIANTCFLAGS} ${LIBCFLAGS} \ -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET} _STANDARD_DEBUG: .USE ${CC} -g -DDEBUG \ ${PRECFLAGS} ${PRECFLAGS-${.IMPSRC:T}} \ ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \ ${VARIANTCFLAGS} ${LIBCFLAGS} \ -c ${.IMPSRC} -o ${.TARGET} # set object file suffix .if make(lib${LIB}_static.a) OBJSUFFIX = o .endif .if make(lib${LIB}_profile.a) OBJSUFFIX = po .endif .if make(lib${LIB}_debug.a) OBJSUFFIX = do .endif .if make(lib${LIB}.a) OBJSUFFIX = So .endif .ifnmake autopatch # # If there is a machine dependent makefile, use it: # .if exists(${.CURDIR}/${MACHINE_ARCH}/Makefile.inc) .include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc" .endif .include "${.CURDIR}/darwin/Makefile.inc" .include "${.CURDIR}/db/Makefile.inc" .include "${.CURDIR}/compat-43/Makefile.inc" .include "${.CURDIR}/emulated/Makefile.inc" .include "${.CURDIR}/gdtoa/Makefile.inc" .include "${.CURDIR}/gen/Makefile.inc" .include "${.CURDIR}/gmon/Makefile.inc" .include "${.CURDIR}/include/Makefile.inc" .include "${.CURDIR}/internat/Makefile.inc" .include "${.CURDIR}/locale/Makefile.inc" .include "${.CURDIR}/man/Makefile.inc" .include "${.CURDIR}/net/Makefile.inc" .include "${.CURDIR}/nls/Makefile.inc" .include "${.CURDIR}/posix1e/Makefile.inc" .include "${.CURDIR}/pthreads/Makefile.inc" .include "${.CURDIR}/regex/Makefile.inc" .include "${.CURDIR}/secure/Makefile.inc" .include "${.CURDIR}/stdio/Makefile.inc" .include "${.CURDIR}/stdlib/Makefile.inc" .include "${.CURDIR}/stdtime/Makefile.inc" .include "${.CURDIR}/string/Makefile.inc" .include "${.CURDIR}/sys/Makefile.inc" .include "${.CURDIR}/threads/Makefile.inc" .include "${.CURDIR}/util/Makefile.inc" .include "${.CURDIR}/uuid/Makefile.inc" # If there are no machine dependent sources, append all the # machine-independent sources: .if empty(MDSRCS) SRCS+= ${MISRCS} .else # Append machine-dependent sources, then append machine-independent sources # for which there is no machine-dependent variant, and not being suppressed. SRCS+= ${MDSRCS} _SUPPRESS= ${MDSRCS} ${SUPPRESSSRCS} .for _src in ${MISRCS} .if ${_SUPPRESS:R:M${_src:R}} == "" SRCS+= ${_src} .endif .endfor .endif .endif # !autopatch |