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/Makefile

Version: -  FREEBSD  -  FREEBSD11  -  FREEBSD10  -  FREEBSD9  -  FREEBSD92  -  FREEBSD91  -  FREEBSD90  -  FREEBSD8  -  FREEBSD82  -  FREEBSD81  -  FREEBSD80  -  FREEBSD7  -  FREEBSD74  -  FREEBSD73  -  FREEBSD72  -  FREEBSD71  -  FREEBSD70  -  FREEBSD6  -  FREEBSD64  -  FREEBSD63  -  FREEBSD62  -  FREEBSD61  -  FREEBSD60  -  FREEBSD5  -  FREEBSD55  -  FREEBSD54  -  FREEBSD53  -  FREEBSD52  -  FREEBSD51  -  FREEBSD50  -  FREEBSD4  -  FREEBSD3  -  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 #
    2 # CDDL HEADER START
    3 #
    4 # The contents of this file are subject to the terms of the
    5 # Common Development and Distribution License (the "License").
    6 # You may not use this file except in compliance with the License.
    7 #
    8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
    9 # or http://www.opensolaris.org/os/licensing.
   10 # See the License for the specific language governing permissions
   11 # and limitations under the License.
   12 #
   13 # When distributing Covered Code, include this CDDL HEADER in each
   14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
   15 # If applicable, add the following below this CDDL HEADER, with the
   16 # fields enclosed by brackets "[]" replaced with your own identifying
   17 # information: Portions Copyright [yyyy] [name of copyright owner]
   18 #
   19 # CDDL HEADER END
   20 #
   21 #
   22 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
   23 #
   24 # include global definitions
   25 include ../Makefile.master
   26 
   27 #
   28 # List of architectures to build as part of the standard build.
   29 #
   30 # Some of these architectures are built in parallel (see i386_PARALLEL and
   31 # sparc_PARALLEL). This requires building some parts first before parallel build
   32 # can start. Platform make files know what should be built as a prerequisite for
   33 # the parallel build to work. The i386_PREREQ and sparc_PREREQ variables tell
   34 # which platform directory to enter to start making prerequisite dependencies.
   35 #
   36 sparc_ARCHITECTURES = sun4v sun4u sparc
   37 
   38 i386_ARCHITECTURES = i86pc i86xpv intel
   39 
   40 #
   41 # For i386 all architectures can be compiled in parallel.
   42 #
   43 # intel/Makefile knows how to build prerequisites needed for parallel build.
   44 #
   45 i386_PREREQ = intel
   46 i386_PARALLEL = $(i386_ARCHITECTURES)
   47 
   48 #
   49 # For sparc all architectures can be compiled in parallel.
   50 #
   51 # sun4/Makefile knows how to build prerequisites needed for parallel build.
   52 # can start.
   53 #
   54 sparc_PREREQ = sun4
   55 sparc_PARALLEL = $(sparc_ARCHITECTURES)
   56 
   57 #
   58 # Platforms defined in $(MACH)_PARALLEL are built in parallel. DUMMY is placed
   59 # at the end in case $(MACH)_PARALLEL is empty to prevent everything going in
   60 # parallel.
   61 #
   62 .PARALLEL: $($(MACH)_PARALLEL) DUMMY
   63 
   64 #
   65 # For build prerequisites we use a special target which is constructed by adding
   66 # '.prereq' suffix to the $(MACH)_PREREQ.
   67 #
   68 PREREQ_TARGET = $($(MACH)_PREREQ:%=%.prereq)
   69 
   70 
   71 def             :=      TARGET= def
   72 all             :=      TARGET= all
   73 install         :=      TARGET= install
   74 install_h       :=      TARGET= install_h
   75 clean           :=      TARGET= clean
   76 clobber         :=      TARGET= clobber
   77 lint            :=      TARGET= lint
   78 clean.lint      :=      TARGET= clean.lint
   79 check           :=      TARGET= check
   80 modlist         :=      TARGET= modlist
   81 modlist         :=      NO_STATE= -K $$MODSTATE$$$$
   82 
   83 .KEEP_STATE:
   84 
   85 def all lint: all_h $(PMTMO_FILE) $($(MACH)_ARCHITECTURES)
   86 
   87 install: all_h install_dirs $(PMTMO_FILE) $($(MACH)_ARCHITECTURES)
   88 
   89 install_dirs:
   90         @cd ..; pwd; $(MAKE) rootdirs
   91         @pwd
   92 
   93 #
   94 # Rule to build prerequisites. The left part of the pattern will match
   95 # PREREQ_TARGET.
   96 #
   97 # The location of the Makefile is determined by strippinng '.prereq' suffix from
   98 # the target name. We add '.prereq' suffix to the target passed to the child
   99 # Makefile so that it can distinguish prerequisite build from the regular one.
  100 #
  101 #
  102 %.prereq:
  103         @cd $(@:%.prereq=%); pwd; $(MAKE) $(NO_STATE) $(TARGET).prereq
  104 
  105 #
  106 # Rule to build architecture files. Build all required prerequisites and then
  107 # build the rest (potentially in parallel).
  108 #
  109 $($(MACH)_ARCHITECTURES): $(PREREQ_TARGET) FRC
  110         @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
  111 
  112 $(PMTMO_FILE) pmtmo_file: $(PATCH_MAKEUP_TABLE)
  113         @if [ -z "$(PATCH_MAKEUP_TABLE)" ] ; then \
  114                 echo 'ERROR: $$(PATCH_MAKEUP_TABLE) not set' \
  115                     'in environment' >&2 ; \
  116                 exit 1 ; \
  117         fi
  118         RELEASE="$(RELEASE)" MACH="$(MACH)" \
  119             $(CTFCVTPTBL) -o $(PMTMO_FILE) $(PATCH_MAKEUP_TABLE)
  120 
  121 #
  122 # The following is the list of directories which contain Makefiles with
  123 # targets to install header file. The machine independent headers are
  124 # installed by invoking the Makefile in the directory containing the
  125 # header files. Machine and architecture dependent headers are installed
  126 # by invoking the main makefile for that architecture/machine which,
  127 # in turn, is responsible for invoking the Makefiles which install headers.
  128 # It is done this way so as not to assume that all of the header files in
  129 # the architecture/machine dependent subdirectories are in completely
  130 # isomorphic locations.
  131 #
  132 COMMON_HDRDIRS= common/avs \
  133                 common/c2 \
  134                 common/des \
  135                 common/fs \
  136                 common/gssapi \
  137                 common/idmap \
  138                 common/inet \
  139                 common/inet/ipf/netinet \
  140                 common/inet/kssl \
  141                 common/inet/nca \
  142                 common/inet/sockmods/netpacket \
  143                 common/io/bpf/net \
  144                 common/ipp \
  145                 common/net \
  146                 common/netinet \
  147                 common/nfs \
  148                 common/pcmcia/sys \
  149                 common/rpc \
  150                 common/rpcsvc \
  151                 common/sharefs \
  152                 common/smb \
  153                 common/smbsrv \
  154                 common/sys \
  155                 common/vm
  156 
  157 
  158 # These aren't the only headers in closed.  But the other directories
  159 # are simple enough that they can be driven from the src tree.
  160 $(CLOSED_BUILD)COMMON_HDRDIRS += $(CLOSED)/uts/common/sys
  161 
  162 #
  163 # Subset of COMMON_HDRDIRS in which at least one header is generated
  164 # at runtime (e.g., rpcgen).  (This is a partial list; there are
  165 # other directories that should be included and do not yet have the
  166 # necessary Makefile support.  See 6414855.)
  167 #
  168 DYNHDRDIRS = common/rpcsvc common/idmap common/sys
  169 
  170 sparc_HDRDIRS= sun/sys
  171 i386_HDRDIRS= i86pc/vm i86xpv/vm
  172 
  173 HDRDIRS= $(COMMON_HDRDIRS) $($(MACH)_HDRDIRS)
  174 install_h check: $(HDRDIRS) $($(MACH)_ARCHITECTURES)
  175 
  176 $(HDRDIRS): FRC
  177         @cd $@; pwd; $(MAKE) $(TARGET)
  178 
  179 # ensures that headers made by rpcgen and others are available in uts source
  180 # for kernel builds to reference without building install_h
  181 #
  182 all_h: FRC
  183         @cd common/sys; pwd; $(MAKE) $@
  184         @cd common/rpc; pwd; $(MAKE) $@
  185         @cd common/rpcsvc; pwd; $(MAKE) $@
  186         @cd common/gssapi; pwd; $(MAKE) $@
  187         @cd common/idmap; pwd; $(MAKE) $@
  188 
  189 clean clobber: $($(MACH)_ARCHITECTURES) $(DYNHDRDIRS)
  190         @if [ '$(PATCH_BUILD)' != '#' ] ; then \
  191                 echo $(RM) $(PMTMO_FILE) ; \
  192                 $(RM) $(PMTMO_FILE) ; \
  193         fi
  194 
  195 EXTRA_CLOBBER_TARGETS= common/avs/ns/rdc
  196 clobber: $(EXTRA_CLOBBER_TARGETS)
  197 
  198 
  199 clean.lint modlist: $($(MACH)_ARCHITECTURES)
  200 
  201 ONC_FILES=      common/io/timod.c \
  202                 common/os/sig.c \
  203                 common/os/flock.c \
  204                 common/os/sysent.c \
  205                 common/os/swapgeneric.c \
  206                 common/syscall/fcntl.c 
  207 
  208 # edit onc plus source files. 
  209 ONC_PLUS:       $(ONC_FILES:%=%_onc_plus) 
  210 
  211 #
  212 # Cross-reference customization: build a cross-reference over all of
  213 # the supported architectures.  Although there's no correct way to set
  214 # the include path (since we don't know what architecture is the one
  215 # the user will be interested in), it's historically been set to
  216 # mirror the $(XRDIRS) list, and that works kinda sorta okay.
  217 #
  218 # We need to manually prune usr/closed/uts/{i86xpv|sfmmu|i86pc} since
  219 # none of them exist.
  220 #
  221 SHARED_XRDIRS = $(sparc_ARCHITECTURES) $(i386_ARCHITECTURES) sun4 sfmmu \
  222         sun common
  223 CLOSED_XRDIRS = $(SHARED_XRDIRS:%=% ../../closed/uts/%)
  224 XRDIRS = $(SHARED_XRDIRS)
  225 CLOSED_XRDIRS_XEN = $(CLOSED_XRDIRS:../../closed/uts/i86xpv=)
  226 CLOSED_XRDIRS_1 = $(CLOSED_XRDIRS_XEN:../../closed/uts/i86pc=)
  227 $(CLOSED_BUILD)XRDIRS = $(CLOSED_XRDIRS_1:../../closed/uts/sfmmu=)
  228 
  229 XRINCDIRS = $(XRDIRS)
  230 
  231 cscope.out tags: FRC
  232         $(XREF) -x $@
  233 
  234 FRC:

Cache object: 4a51a7b40100fdcd4d7feba6ddb0e503


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