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/makedefs/MakeInc.def

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 export SOURCE=$(shell /bin/pwd)
    2 
    3 #
    4 # gnumake 3.77 support
    5 #
    6 export USE_APPLE_PB_SUPPORT = all
    7 
    8 #
    9 # Incremental Build option
   10 #
   11 ifndef INCR_EXPORTHDRS
   12 ifeq ($(shell test -d $$OBJROOT/EXPORT_HDRS;echo $$?),0)
   13 export INCR_EXPORTHDRS  = TRUE
   14 else
   15 export INCR_EXPORTHDRS  = FALSE
   16 endif
   17 endif
   18 
   19 ifndef INCR_INSTALLHDRS
   20 ifeq ($(shell test -d $$DSTROOT/$INCDIR;echo $$?),0)
   21 export INCR_INSTALLHDRS = TRUE
   22 else
   23 export INCR_INSTALLHDRS = FALSE
   24 endif
   25 endif
   26 
   27 #
   28 # Component List
   29 #
   30 ifndef COMPONENT_LIST 
   31 export COMPONENT_LIST   = osfmk bsd iokit pexpert libkern libsa
   32 export COMPONENT_LIST_UC := $(shell echo -n $(COMPONENT_LIST) | $(TR) a-z A-Z)
   33 endif
   34 ifndef  COMPONENT
   35 export COMPONENT        := $(firstword $(subst /, ,$(shell $(RELPATH) $(SRCROOT) $(SOURCE))))
   36 export COMPONENT_IMPORT_LIST := $(filter-out $(COMPONENT),$(COMPONENT_LIST)) 
   37 else
   38 ifeq    ($(COMPONENT), .)
   39 export COMPONENT        := $(firstword $(subst /, ,$(shell $(RELPATH) $(SRCROOT) $(SOURCE))))
   40 export COMPONENT_IMPORT_LIST := $(filter-out $(COMPONENT),$(COMPONENT_LIST)) 
   41 endif
   42 endif
   43 
   44 # Architecture options
   45 #
   46 #  supported configurations : PPC I386
   47 #
   48 ifndef ARCH_CONFIGS
   49 ifdef RC_ARCHS
   50 export ARCH_CONFIGS     := $(shell echo -n $(RC_ARCHS) | $(TR) a-z A-Z)
   51 else
   52 export ARCH_CONFIGS     := $(shell arch | $(TR) a-z A-Z)
   53 endif
   54 endif
   55 ifdef   ARCH_CONFIG
   56 ifndef ARCH_CONFIG_LC
   57 export ARCH_CONFIG_LC   := $(shell echo -n $(ARCH_CONFIG) | $(TR) A-Z a-z)
   58 endif
   59 endif
   60 
   61 
   62 # Kernel Configuration options  
   63 #
   64 # supported configurations : RELEASE DEBUG PROFILE
   65 #
   66 ifndef KERNEL_CONFIGS
   67 export KERNEL_CONFIGS   = RELEASE
   68 endif
   69 ifndef KERNEL_CONFIG
   70 export KERNEL_CONFIG    = $(firstword $(KERNEL_CONFIGS))
   71 endif
   72 
   73 #
   74 # Kernel Configuration to install
   75 #
   76 #  supported install architecture : PPC I386
   77 #
   78 export INSTALL_TYPE     = RELEASE
   79 ifndef INSTALL_ARCHS
   80 ifdef RC_ARCHS
   81 export INSTALL_ARCHS    = $(ARCH_CONFIGS)
   82 else
   83 export INSTALL_ARCHS    = $(ARCH_CONFIGS)
   84 endif
   85 export INSTALL_ARCHS_LC := $(shell echo -n $(ARCH_CONFIGS) | $(TR) A-Z a-z)
   86 endif
   87 
   88 export INSTALL_ARCH_DEFAULT     = PPC
   89 
   90 #
   91 # Standard defines list
   92 #
   93 export DEFINES = -DAPPLE -DNeXT -DKERNEL_PRIVATE -D__MACHO__=1 -Dvolatile=__volatile $(IDENT)
   94 
   95 #
   96 # Compiler command
   97 #
   98 KCC  = /usr/bin/cc
   99 KC++ = /usr/bin/c++
  100 CC   = $(KCC)
  101 
  102 
  103 #
  104 # Setup for parallel sub-makes when doing an RC build
  105 #
  106 ifndef MAKEJOBS
  107 ifeq "YES" "$(RC_XBS)"
  108 export MAKEJOBS = --jobs=3
  109 endif
  110 endif
  111 
  112 #
  113 # Default CFLAGS
  114 #
  115 ifdef RC_CFLAGS
  116 export OTHER_CFLAGS     = $(subst $(addprefix -arch ,$(RC_ARCHS)),,$(RC_CFLAGS))
  117 endif
  118 
  119 export CFLAGS_GEN = -static -g -nostdinc -nostdlib -no-cpp-precomp \
  120         -fno-builtin -finline -fno-keep-inline-functions -msoft-float \
  121         -fsigned-bitfields -Wpointer-arith $(OTHER_CFLAGS)
  122 
  123 export CFLAGS_RELEASE   = 
  124 export CFLAGS_DEBUG     = 
  125 export CFLAGS_PROFILE   =  -pg
  126 
  127 export CFLAGS_PPC       = -arch ppc -Dppc -DPPC -D__PPC__ -DPAGE_SIZE_FIXED
  128 export CFLAGS_I386      = -arch i386 -Di386 -DI386 -D__I386__ \
  129         -march=i686 -mpreferred-stack-boundary=2 -falign-functions=4 -mcpu=pentium4
  130 
  131 export CFLAGS_RELEASEPPC = -O2 -mcpu=750 -mmultiple -fschedule-insns
  132 export CFLAGS_RELEASE_TRACEPPC = -O2 -mcpu=750 -mmultiple -fschedule-insns
  133 export CFLAGS_DEBUGPPC = -O2 -mcpu=750 -mmultiple -fschedule-insns
  134 export CFLAGS_PROFILEPPC = -O2 -mcpu=750 -mmultiple -fschedule-insns
  135 export CFLAGS_RELEASEI386 = -O2
  136 export CFLAGS_DEBUGI386 = -O2
  137 export CFLAGS_PROFILEI386 = -O2
  138 
  139 export CFLAGS   = $(CFLAGS_GEN) \
  140                   $($(addsuffix $(ARCH_CONFIG),CFLAGS_)) \
  141                   $($(addsuffix $(KERNEL_CONFIG),CFLAGS_)) \
  142                   $($(addsuffix $(ARCH_CONFIG), $(addsuffix $(KERNEL_CONFIG),CFLAGS_))) \
  143                   $(DEFINES)
  144 
  145 # Default C++ flags
  146 #
  147 CXXFLAGS_GEN  = -fno-rtti -fno-exceptions -fcheck-new -fapple-kext -fpermissive
  148 
  149 CXXFLAGS      = $(CXXFLAGS_GEN) \
  150                   $($(addsuffix $(ARCH_CONFIG),CXXFLAGS_)) \
  151                   $($(addsuffix $(KERNEL_CONFIG),CXXFLAGS_))
  152 
  153 #
  154 # Assembler command
  155 #
  156 AS      = /usr/bin/cc
  157 S_KCC   = /usr/bin/cc
  158 
  159 #
  160 # Default SFLAGS
  161 #
  162 export SFLAGS_GEN = -static -D__ASSEMBLER__ -force_cpusubtype_ALL $(OTHER_CFLAGS)
  163 
  164 export SFLAGS_RELEASE   = 
  165 export SFLAGS_DEBUG     = 
  166 export SFLAGS_PROFILE   = 
  167 
  168 export SFLAGS_PPC       = $(CFLAGS_PPC)
  169 export SFLAGS_I386      = $(CFLAGS_I386)
  170 
  171 export SFLAGS   = $(SFLAGS_GEN) \
  172                   $($(addsuffix $(ARCH_CONFIG),SFLAGS_)) \
  173                   $($(addsuffix $(KERNEL_CONFIG),SFLAGS_)) \
  174                   $(DEFINES)
  175 
  176 #
  177 # Linker command
  178 #
  179 LD      = /usr/bin/ld
  180 
  181 #
  182 # Default LDFLAGS
  183 #
  184 export LDFLAGS_COMPONENT_GEN = -static -r $(COMP_LDFLAGS_COMPONENT_GEN)
  185 
  186 export LDFLAGS_COMPONENT_RELEASE =  $(COMP_LDFLAGS_COMPONENT_RELEASE)
  187 export LDFLAGS_COMPONENT_DEBUG   =  $(COMP_LDFLAGS_COMPONENT_DEBUG)
  188 export LDFLAGS_COMPONENT_PROFILE =  $(COMP_LDFLAGS_COMPONENT_PROFILE)
  189 
  190 export LDFLAGS_COMPONENT_PPC    = -arch ppc $(COMP_LDFLAGS_COMPONENT_PPC)
  191 export LDFLAGS_COMPONENT_I386   = -arch i386 $(COMP_LDFLAGS_COMPONENT_i386)
  192 
  193 export LDFLAGS_COMPONENT        = $(LDFLAGS_COMPONENT_GEN) \
  194                   $($(addsuffix $(ARCH_CONFIG),LDFLAGS_COMPONENT_)) \
  195                   $($(addsuffix $(KERNEL_CONFIG),LDFLAGS_COMPONENT_))
  196 
  197 export LDFLAGS_KERNEL_GEN = -static -force_cpusubtype_ALL -segalign 0x1000
  198 
  199 export LDFLAGS_KERNEL_RELEASE   =
  200 #  -noseglinkedit
  201 export LDFLAGS_KERNEL_DEBUG     = 
  202 export LDFLAGS_KERNEL_PROFILE   = 
  203 
  204 export LDFLAGS_KERNEL_PPC      = -arch ppc -segaddr __VECTORS 0x0 -segaddr __TEXT 0x7000 -e __start -sectalign __TEXT __text 0x1000 -sectalign __DATA __common 0x1000 -sectalign __DATA __bss 0x1000 -sectcreate __PRELINK __text /dev/null -sectcreate __PRELINK __symtab /dev/null -sectcreate __PRELINK __info /dev/null
  205 export LDFLAGS_KERNEL_I386     = -arch i386 -segaddr __TEXT 0x100000 -e _pstart -sectcreate __PRELINK __text /dev/null -sectcreate __PRELINK __symtab /dev/null -sectcreate __PRELINK __info /dev/null
  206 
  207 export LDFLAGS_KERNEL   = $(LDFLAGS_KERNEL_GEN) \
  208                   $($(addsuffix $(ARCH_CONFIG),LDFLAGS_KERNEL_)) \
  209                   $($(addsuffix $(KERNEL_CONFIG),LDFLAGS_KERNEL_))
  210 
  211 
  212 #
  213 # Default runtime libraries to be linked with the kernel
  214 #
  215 export LD_KERNEL_LIBS   = -lcc_kext
  216 
  217 #
  218 # Default INCFLAGS
  219 #
  220 export INCFLAGS_IMPORT  = $(patsubst %, -I$(OBJROOT)/EXPORT_HDRS/%, $(COMPONENT_IMPORT_LIST))
  221 export INCFLAGS_EXTERN  = -I$(OBJROOT)/EXTERN_HDRS -I$(SRCROOT)/EXTERNAL_HEADERS -I$(SRCROOT)/EXTERNAL_HEADERS/bsd
  222 export INCFLAGS_GEN     = -I$(SRCROOT)/$(COMPONENT) 
  223 export INCFLAGS_POSIX   = -I$(OBJROOT)/EXPORT_HDRS/bsd
  224 export INCFLAGS_LOCAL   = -I.
  225 
  226 export INCFLAGS         = $(INCFLAGS_LOCAL) $(INCFLAGS_GEN) $(INCFLAGS_IMPORT) $(INCFLAGS_EXTERN) $(INCFLAGS_MAKEFILE)
  227 
  228 #
  229 # Default MIGFLAGS
  230 #
  231 export MIGFLAGS = $(DEFINES) $(INCFLAGS) $($(addsuffix $(ARCH_CONFIG),CFLAGS_))
  232 
  233 #
  234 # Default VPATH
  235 #
  236 empty:=
  237 space:= $(empty) $(empty)
  238 export VPATH_IMPORT     = $(subst $(space),:,$(patsubst %,$(OBJROOT)/EXPORT_HDRS/%,$(strip $(COMPONENT_IMPORT_LIST)))):
  239 export VPATH_EXTERN     = $(OBJROOT)/EXTERN_HDRS:
  240 export VPATH_GEN        = .:$(SOURCE):
  241 
  242 export VPATH            = $(VPATH_GEN)$(VPATH_IMPORT)$(VPATH_EXTERN)$(VPATH_MAKEFILE)
  243 
  244 #
  245 # Macros that control installation of kernel and it's header files
  246 #
  247 # install flags for header files
  248 # 
  249 INSTALL_FLAGS = -c -m 0444
  250 FILE_INSTALL_FLAGS = -c -m 0644
  251 DATA_INSTALL_FLAGS = -c -m 0644
  252 
  253 #
  254 # Header file destinations
  255 #
  256 FRAMEDIR = System/Library/Frameworks
  257 ifndef INCDIR
  258     INCDIR = /usr/include
  259 endif
  260 ifndef LCLDIR
  261     LCLDIR = $(FRAMEDIR)/System.framework/Versions/B/PrivateHeaders
  262 endif
  263 
  264 KINCVERS = A
  265 KINCFRAME = $(FRAMEDIR)/Kernel.framework
  266 KINCDIR = $(KINCFRAME)/Versions/$(KINCVERS)/Headers
  267 KPINCDIR = $(KINCFRAME)/Versions/$(KINCVERS)/PrivateHeaders
  268 
  269 #
  270 # Compononent Header file destinations
  271 #
  272 EXPDIR = EXPORT_HDRS/$(COMPONENT)
  273 
  274 #
  275 # Strip Flags
  276 #
  277 export STRIP_FLAGS_RELEASE      = -S -x 
  278 export STRIP_FLAGS_RELEASE_TRACE        = -S -x 
  279 export STRIP_FLAGS_DEBUG        = -S 
  280 export STRIP_FLAGS_DEBUG_TRACE  = -S 
  281 export STRIP_FLAGS_PROFILE      = -S -x
  282 
  283 export STRIP_FLAGS      = $($(addsuffix $(KERNEL_CONFIG),STRIP_FLAGS_)) 
  284 
  285 #
  286 # Man Page destination
  287 #
  288 MANDIR = usr/share/man
  289 
  290 #
  291 #  This must be here before any rules are possibly defined by the
  292 #  machine dependent makefile fragment so that a plain "make" command
  293 #  always works.  The config program will emit an appropriate rule to
  294 #  cause "all" to depend on every kernel configuration it generates.
  295 #
  296 
  297 default: all
  298 

Cache object: 5f6f074de296b115b0a6bfed07fcf183


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