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

Cache object: e80f8ed88bfbd4b179a5213a1bf779dd


[ 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.