gptzfsboot and zfsloader can't find slices inside PTABLE_VTOC label after 9099
[unleashed.git] / usr / src / uts / Makefile
blob7d921f7ba22c4820fc5d0b9c3fb8a2f0ed48c42b
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
22 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
23 # Copyright 2012 Nexenta Systems, Inc. All rights reserved.
24 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
26 # include global definitions
27 include ../Makefile.master
30 # List of architectures to build as part of the standard build.
32 # Some of these architectures are built in parallel (see i386_PARALLEL and
33 # sparc_PARALLEL). This requires building some parts first before parallel build
34 # can start. Platform make files know what should be built as a prerequisite for
35 # the parallel build to work. The i386_PREREQ and sparc_PREREQ variables tell
36 # which platform directory to enter to start making prerequisite dependencies.
38 sparc_ARCHITECTURES = $(CONFIG_PLATFORM) sparc
40 i386_ARCHITECTURES = $(CONFIG_PLATFORM) intel
43 # For i386 all architectures can be compiled in parallel.
45 # intel/Makefile knows how to build prerequisites needed for parallel build.
47 i386_PREREQ = intel
48 i386_PARALLEL = $(i386_ARCHITECTURES)
51 # For sparc all architectures can be compiled in parallel.
53 # sun4/Makefile knows how to build prerequisites needed for parallel build.
54 # can start.
56 sparc_PREREQ = sun4
57 sparc_PARALLEL = $(sparc_ARCHITECTURES)
60 # Platforms defined in $(MACH)_PARALLEL are built in parallel. DUMMY is placed
61 # at the end in case $(MACH)_PARALLEL is empty to prevent everything going in
62 # parallel.
64 .PARALLEL: $($(MACH)_PARALLEL) DUMMY
67 # For build prerequisites we use a special target which is constructed by adding
68 # '.prereq' suffix to the $(MACH)_PREREQ.
70 PREREQ_TARGET = $($(MACH)_PREREQ:%=%.prereq)
73 def := TARGET= def
74 all := TARGET= all
75 install := TARGET= install
76 install_h := TARGET= install_h
77 clean := TARGET= clean
78 clobber := TARGET= clobber
79 clobber_h := TARGET= clobber
80 check := TARGET= check
81 modlist := TARGET= modlist
82 modlist := NO_STATE= -K $$MODSTATE$$$$
84 .KEEP_STATE:
86 def all: all_h $(PMTMO_FILE) $($(MACH)_ARCHITECTURES)
88 install: all_h install_dirs $(PMTMO_FILE) $($(MACH)_ARCHITECTURES)
90 install_dirs:
91 @cd ..; pwd; $(MAKE) rootdirs
92 @pwd
95 # Rule to build prerequisites. The left part of the pattern will match
96 # PREREQ_TARGET.
98 # The location of the Makefile is determined by strippinng '.prereq' suffix from
99 # the target name. We add '.prereq' suffix to the target passed to the child
100 # Makefile so that it can distinguish prerequisite build from the regular one.
103 %.prereq:
104 @cd $(@:%.prereq=%); pwd; $(MAKE) $(NO_STATE) $(TARGET).prereq
107 # Rule to build architecture files. Build all required prerequisites and then
108 # build the rest (potentially in parallel).
110 $($(MACH)_ARCHITECTURES): $(PREREQ_TARGET) FRC
111 @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
115 # The following is the list of directories which contain Makefiles with
116 # targets to install header file. The machine independent headers are
117 # installed by invoking the Makefile in the directory containing the
118 # header files. Machine and architecture dependent headers are installed
119 # by invoking the main makefile for that architecture/machine which,
120 # in turn, is responsible for invoking the Makefiles which install headers.
121 # It is done this way so as not to assume that all of the header files in
122 # the architecture/machine dependent subdirectories are in completely
123 # isomorphic locations.
125 COMMON_HDRDIRS= common/c2 \
126 common/des \
127 common/gssapi \
128 common/idmap \
129 common/klm \
130 common/io/bpf/net \
131 common/io/fibre-channel/fca/qlc \
132 common/ipp \
133 common/netinet \
134 common/nfs \
135 common/rpc \
136 common/rpcsvc \
137 common/sharefs \
138 common/smb \
139 common/smbsrv
143 # Subset of COMMON_HDRDIRS in which at least one header is generated
144 # at runtime (e.g., rpcgen), and in which "make clean" should run.
145 # Other directories should be included here, but do not yet have the
146 # necessary Makefile support (make clean). See 6414855.
148 DYNHDRDIRS = common/gssapi \
149 common/idmap \
150 common/io/fibre-channel/fca/qlc \
151 common/klm \
152 common/rpc \
153 common/rpcsvc
155 sparc_HDRDIRS= sun/sys
156 i386_HDRDIRS=
158 HDRDIRS= $(COMMON_HDRDIRS) $($(MACH)_HDRDIRS)
159 install_h check: $(HDRDIRS) $($(MACH)_ARCHITECTURES)
161 $(HDRDIRS): FRC
162 @cd $@; pwd; $(MAKE) $(TARGET)
164 # ensures that headers made by rpcgen and others are available in uts source
165 # for kernel builds to reference without building install_h
167 all_h: FRC
168 @cd common/rpc; pwd; $(MAKE) $@
169 @cd common/rpcsvc; pwd; $(MAKE) $@
170 @cd common/gssapi; pwd; $(MAKE) $@
171 @cd common/idmap; pwd; $(MAKE) $@
172 @cd common/klm; pwd; $(MAKE) $@
174 clean clobber: $($(MACH)_ARCHITECTURES) $(DYNHDRDIRS)
176 # testing convenience
177 clobber_h: $(DYNHDRDIRS)
179 modlist: $($(MACH)_ARCHITECTURES)
181 FRC: