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-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 # $FreeBSD: releng/6.4/sys/conf/kern.pre.mk 172569 2007-10-12 07:49:33Z jfv $
    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 .if ${CC} == "icc"
   20 COPTFLAGS?=     -O
   21 .else
   22 . if defined(DEBUG)
   23 _MINUS_O=       -O
   24 . else
   25 _MINUS_O=       -O2
   26 . endif
   27 . if ${MACHINE_ARCH} == "amd64"
   28 COPTFLAGS?=-O2 -frename-registers -pipe
   29 . else
   30 COPTFLAGS?=${_MINUS_O} -pipe
   31 . endif
   32 . if !empty(COPTFLAGS:M-O[23s]) && empty(COPTFLAGS:M-fno-strict-aliasing)
   33 COPTFLAGS+= -fno-strict-aliasing
   34 . endif
   35 .endif
   36 .if !defined(NO_CPU_COPTFLAGS)
   37 . if ${CC} == "icc"
   38 COPTFLAGS+= ${_ICC_CPUCFLAGS:C/(-x[^M^K^W]+)[MKW]+|-x[MKW]+/\1/}
   39 . else
   40 COPTFLAGS+= ${_CPUCFLAGS}
   41 . endif
   42 .endif
   43 .if ${CC} == "icc"
   44 NOSTDINC= -X
   45 .else
   46 NOSTDINC= -nostdinc
   47 .endif
   48 
   49 INCLUDES= ${NOSTDINC} -I- ${INCLMAGIC} -I. -I$S
   50 
   51 # This hack lets us use the OpenBSD altq code without spamming a new
   52 # include path into contrib'ed source files.
   53 INCLUDES+= -I$S/contrib/altq
   54 
   55 # ... and the same for ipfilter
   56 INCLUDES+= -I$S/contrib/ipfilter
   57 
   58 # ... and the same for pf
   59 INCLUDES+= -I$S/contrib/pf
   60 
   61 # ... and the same for Atheros HAL
   62 INCLUDES+= -I$S/dev/ath
   63 
   64 # ... and the same for the NgATM stuff
   65 INCLUDES+= -I$S/contrib/ngatm
   66 
   67 # .. and the same for twa
   68 INCLUDES+= -I$S/dev/twa
   69 
   70 # .. and the same for em
   71 INCLUDES+= -I$S/dev/em
   72 
   73 CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG}
   74 CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h
   75 .if ${CC} != "icc"
   76 CFLAGS+= -fno-common -finline-limit=${INLINE_LIMIT}
   77 CFLAGS+= --param inline-unit-growth=100
   78 CFLAGS+= --param large-function-growth=1000
   79 WERROR?= -Werror
   80 .endif
   81 
   82 # XXX LOCORE means "don't declare C stuff" not "for locore.s".
   83 ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS}
   84 
   85 .if defined(PROFLEVEL) && ${PROFLEVEL} >= 1
   86 .if ${CC} == "icc"
   87 .error "Profiling doesn't work with icc yet"
   88 .endif
   89 CFLAGS+=        -DGPROF -falign-functions=16
   90 .if ${PROFLEVEL} >= 2
   91 CFLAGS+=        -DGPROF4 -DGUPROF
   92 PROF=   -pg -mprofiler-epilogue
   93 .else
   94 PROF=   -pg
   95 .endif
   96 .endif
   97 DEFINED_PROF=   ${PROF}
   98 
   99 # Put configuration-specific C flags last (except for ${PROF}) so that they
  100 # can override the others.
  101 CFLAGS+=        ${CONF_CFLAGS}
  102 
  103 # Optional linting. This can be overridden in /etc/make.conf.
  104 LINTFLAGS=      ${LINTOBJKERNFLAGS}
  105 
  106 NORMAL_C= ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.IMPSRC}
  107 NORMAL_S= ${CC} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC}
  108 PROFILE_C= ${CC} -c ${CFLAGS} ${WERROR} ${.IMPSRC}
  109 NORMAL_C_NOWERROR= ${CC} -c ${CFLAGS} ${PROF} ${.IMPSRC}
  110 
  111 NORMAL_M= ${AWK} -f $S/tools/makeobjops.awk ${.IMPSRC} -c ; \
  112           ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.PREFIX}.c
  113 
  114 NORMAL_LINT=    ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC}
  115 
  116 GEN_CFILES= $S/$M/$M/genassym.c ${MFILES:T:S/.m$/.c/}
  117 SYSTEM_CFILES= config.c env.c hints.c vnode_if.c
  118 SYSTEM_DEP= Makefile ${SYSTEM_OBJS}
  119 SYSTEM_OBJS= locore.o ${MDOBJS} ${OBJS}
  120 SYSTEM_OBJS+= ${SYSTEM_CFILES:.c=.o}
  121 SYSTEM_OBJS+= hack.So
  122 SYSTEM_LD= @${LD} -Bdynamic -T $S/conf/ldscript.$M \
  123         -warn-common -export-dynamic -dynamic-linker /red/herring \
  124         -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
  125 SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \
  126         ${SIZE} ${.TARGET} ; chmod 755 ${.TARGET}
  127 SYSTEM_DEP+= $S/conf/ldscript.$M
  128 
  129 # MKMODULESENV is set here so that port makefiles can augment
  130 # them.
  131 
  132 MKMODULESENV=   MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR}
  133 .if (${KERN_IDENT} == LINT)
  134 MKMODULESENV+=  ALL_MODULES=LINT
  135 .endif
  136 .if defined(MODULES_OVERRIDE)
  137 MKMODULESENV+=  MODULES_OVERRIDE="${MODULES_OVERRIDE}"
  138 .endif
  139 .if defined(DEBUG)
  140 MKMODULESENV+=  DEBUG_FLAGS="${DEBUG}"
  141 .endif

Cache object: 7ba52a118809ad77f16b99e9b0527fe3


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