The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/conf/kern.pre.mk

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 # kern.pre.mk
    2 #
    3 # Unified Makefile for building kernels.  This includes all the definitions
    4 # that need to be included before %BEFORE_DEPEND
    5 #
    6 # $FreeBSD: releng/5.0/sys/conf/kern.pre.mk 105489 2002-10-19 22:24:43Z mux $
    7 #
    8 
    9 # Can be overridden by makeoptions or /etc/make.conf
   10 KERNEL_KO?=     kernel
   11 KERNEL?=        kernel
   12 KODIR?=         /boot/${KERNEL}
   13 
   14 M=      ${MACHINE_ARCH}
   15 
   16 AWK?=           awk
   17 NM?=            nm
   18 OBJCOPY?=       objcopy
   19 SIZE?=          size
   20 
   21 COPTFLAGS?=-O -pipe
   22 .if !defined(NO_CPU_COPTFLAGS)
   23 COPTFLAGS+= ${_CPUCFLAGS}
   24 .endif
   25 INCLUDES= -nostdinc -I- ${INCLMAGIC} -I. -I$S -I$S/dev
   26 
   27 # This hack lets us use the Intel ACPICA code without spamming a new 
   28 # include path into 100+ source files.
   29 INCLUDES+= -I$S/contrib/dev/acpica
   30 
   31 # ... and the same for ipfilter
   32 INCLUDES+= -I$S/contrib/ipfilter
   33 
   34 COPTS=  ${INCLUDES} -D_KERNEL -include opt_global.h
   35 CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} -fno-common
   36 
   37 # XXX LOCORE means "don't declare C stuff" not "for locore.s".
   38 ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS}
   39 
   40 .if defined(PROFLEVEL) && ${PROFLEVEL} >= 1
   41 CFLAGS+=        -DGPROF -falign-functions=16
   42 .if ${PROFLEVEL} >= 2
   43 CFLAGS+=        -DGPROF4 -DGUPROF
   44 # XXX -Wno-inline is to break some warnings.
   45 PROF=   -finstrument-functions -Wno-inline
   46 .else
   47 PROF=   -pg
   48 .endif
   49 .endif
   50 DEFINED_PROF=   ${PROF}
   51 WERROR?=        -Werror
   52 
   53 # Put configuration-specific C flags last (except for ${PROF}) so that they
   54 # can override the others.
   55 CFLAGS+=        ${CONF_CFLAGS}
   56 
   57 NORMAL_C= ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.IMPSRC}
   58 NORMAL_S= ${CC} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC}
   59 PROFILE_C= ${CC} -c ${CFLAGS} ${WERROR} ${.IMPSRC}
   60 NORMAL_C_NOWERROR= ${CC} -c ${CFLAGS} ${PROF} ${.IMPSRC}
   61 
   62 NORMAL_M= ${AWK} -f $S/tools/makeobjops.awk ${.IMPSRC} -c ; \
   63           ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.PREFIX}.c
   64 
   65 GEN_CFILES= $S/$M/$M/genassym.c
   66 SYSTEM_CFILES= vnode_if.c hints.c env.c config.c
   67 SYSTEM_SFILES= $S/$M/$M/locore.s
   68 SYSTEM_DEP= Makefile ${SYSTEM_OBJS}
   69 SYSTEM_OBJS= locore.o vnode_if.o ${OBJS} hints.o env.o config.o hack.So
   70 SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/conf/ldscript.$M \
   71         -warn-common -export-dynamic -dynamic-linker /red/herring \
   72         -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
   73 SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \
   74         ${SIZE} ${FMT} ${.TARGET} ; chmod 755 ${.TARGET}
   75 SYSTEM_DEP+= $S/conf/ldscript.$M
   76 
   77 # MKMODULESENV is set here so that port makefiles can augment
   78 # them.
   79 
   80 MKMODULESENV=   MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR}
   81 .if (${KERN_IDENT} == LINT)
   82 MKMODULESENV+=  ALL_MODULES=LINT
   83 .endif
   84 .if defined(MODULES_OVERRIDE)
   85 MKMODULESENV+=  MODULES_OVERRIDE="${MODULES_OVERRIDE}"
   86 .endif
   87 .if defined(DEBUG)
   88 MKMODULESENV+=  DEBUG="${DEBUG}" DEBUG_FLAGS="${DEBUG}"
   89 .endif
   90 
   91 all:    ${KERNEL_KO}

Cache object: 6d48704f6cc9acedeb45f6287e2d207b


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.