6811333 Remove prom_printf() message in emlxs driver
[opensolaris.git] / usr / src / uts / Makefile
blobabdab6d9d40a8ac19b1ab81aac75960f0267e80c
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 2008 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
25 # include global definitions
26 include ../Makefile.master
29 # List of architectures to build as part of the standard build.
31 # Some of these architectures are built in parallel (see i386_PARALLEL and
32 # sparc_PARALLEL). This requires building some parts first before parallel build
33 # can start. Platform make files know what should be built as a prerequisite for
34 # the parallel build to work. The i386_PREREQ and sparc_PREREQ variables tell
35 # which platform directory to enter to start making prerequisite dependencies.
37 sparc_ARCHITECTURES = sun4v sun4u sparc
39 i386_ARCHITECTURES = i86pc i86xpv intel
42 # For i386 all architectures can be compiled in parallel.
44 # intel/Makefile knows how to build prerequisites needed for parallel build.
46 i386_PREREQ = intel
47 i386_PARALLEL = $(i386_ARCHITECTURES)
50 # For sparc all architectures can be compiled in parallel.
52 # sun4/Makefile knows how to build prerequisites needed for parallel build.
53 # can start.
55 sparc_PREREQ = sun4
56 sparc_PARALLEL = $(sparc_ARCHITECTURES)
59 # Platforms defined in $(MACH)_PARALLEL are built in parallel. DUMMY is placed
60 # at the end in case $(MACH)_PARALLEL is empty to prevent everything going in
61 # parallel.
63 .PARALLEL: $($(MACH)_PARALLEL) DUMMY
66 # For build prerequisites we use a special target which is constructed by adding
67 # '.prereq' suffix to the $(MACH)_PREREQ.
69 PREREQ_TARGET = $($(MACH)_PREREQ:%=%.prereq)
72 def := TARGET= def
73 all := TARGET= all
74 install := TARGET= install
75 install_h := TARGET= install_h
76 clean := TARGET= clean
77 clobber := TARGET= clobber
78 lint := TARGET= lint
79 clean.lint := TARGET= clean.lint
80 check := TARGET= check
81 modlist := TARGET= modlist
82 modlist := NO_STATE= -K $$MODSTATE$$$$
84 .KEEP_STATE:
86 def all lint: all_h $(PMTMO_FILE) $($(MACH)_ARCHITECTURES)
88 install: all_h install_dirs $(PMTMO_FILE) $($(MACH)_ARCHITECTURES)
90 clean clobber: $($(MACH)_ARCHITECTURES)
91 @if [ '$(PATCH_BUILD)' != '#' ] ; then \
92 echo $(RM) $(PMTMO_FILE) ; \
93 $(RM) $(PMTMO_FILE) ; \
96 EXTRA_CLOBBER_TARGETS= common/avs/ns/rdc
97 clobber: $(EXTRA_CLOBBER_TARGETS)
100 clean.lint modlist: $($(MACH)_ARCHITECTURES)
102 install_dirs:
103 @cd ..; pwd; $(MAKE) rootdirs
104 @pwd
107 # Rule to build prerequisites. The left part of the pattern will match
108 # PREREQ_TARGET.
110 # The location of the Makefile is determined by strippinng '.prereq' suffix from
111 # the target name. We add '.prereq' suffix to the target passed to the child
112 # Makefile so that it can distinguish prerequisite build from the regular one.
115 %.prereq:
116 @cd $(@:%.prereq=%); pwd; $(MAKE) $(NO_STATE) $(TARGET).prereq
119 # Rule to build architecture files. Build all required prerequisites and then
120 # build the rest (potentially in parallel).
122 $($(MACH)_ARCHITECTURES): $(PREREQ_TARGET) FRC
123 @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
125 $(PMTMO_FILE) pmtmo_file: $(PATCH_MAKEUP_TABLE)
126 @if [ -z "$(PATCH_MAKEUP_TABLE)" ] ; then \
127 echo 'ERROR: $$(PATCH_MAKEUP_TABLE) not set' \
128 'in environment' >&2 ; \
129 exit 1 ; \
131 RELEASE="$(RELEASE)" MACH="$(MACH)" \
132 $(CTFCVTPTBL) -o $(PMTMO_FILE) $(PATCH_MAKEUP_TABLE)
135 # The following is the list of directories which contain Makefiles with
136 # targets to install header file. The machine independent headers are
137 # installed by invoking the Makefile in the directory containing the
138 # header files. Machine and architecture dependent headers are installed
139 # by invoking the main makefile for that architecture/machine which,
140 # in turn, is responsible for invoking the Makefiles which install headers.
141 # It is done this way so as not to assume that all of the header files in
142 # the architecture/machine dependent subdirectories are in completely
143 # isomorphic locations.
145 COMMON_HDRDIRS= common/avs \
146 common/c2 \
147 common/des \
148 common/fs \
149 common/gssapi \
150 common/idmap \
151 common/inet \
152 common/inet/ipf/netinet \
153 common/inet/kssl \
154 common/inet/nca \
155 common/ipp \
156 common/net \
157 common/netinet \
158 common/nfs \
159 common/pcmcia/sys \
160 common/rpc \
161 common/rpcsvc \
162 common/sharefs \
163 common/smbsrv \
164 common/sys \
165 common/vm
168 # These aren't the only headers in closed. But the other directories
169 # are simple enough that they can be driven from the src tree.
170 $(CLOSED_BUILD)COMMON_HDRDIRS += $(CLOSED)/uts/common/sys
172 sparc_HDRDIRS= sun/sys
173 i386_HDRDIRS= i86pc/vm i86xpv/vm
175 HDRDIRS= $(COMMON_HDRDIRS) $($(MACH)_HDRDIRS)
176 install_h check: $(HDRDIRS) $($(MACH)_ARCHITECTURES)
178 $(HDRDIRS): FRC
179 @cd $@; pwd; $(MAKE) $(TARGET)
181 # ensures that headers made by rpcgen and others are available in uts source
182 # for kernel builds to reference without building install_h
184 all_h: FRC
185 @cd common/sys; pwd; $(MAKE) $@
186 @cd common/rpc; pwd; $(MAKE) $@
187 @cd common/rpcsvc; pwd; $(MAKE) $@
188 @cd common/gssapi; pwd; $(MAKE) $@
189 @cd common/idmap; pwd; $(MAKE) $@
191 ONC_FILES= common/io/timod.c \
192 common/os/sig.c \
193 common/os/flock.c \
194 common/os/sysent.c \
195 common/os/swapgeneric.c \
196 common/syscall/fcntl.c
198 # edit onc plus source files.
199 ONC_PLUS: $(ONC_FILES:%=%_onc_plus)
202 # Cross-reference customization: build a cross-reference over all of
203 # the supported architectures. Although there's no correct way to set
204 # the include path (since we don't know what architecture is the one
205 # the user will be interested in), it's historically been set to
206 # mirror the $(XRDIRS) list, and that works kinda sorta okay.
208 # We need to manually prune usr/closed/uts/{i86xpv|sfmmu|i86pc} since
209 # none of them exist.
211 SHARED_XRDIRS = $(sparc_ARCHITECTURES) $(i386_ARCHITECTURES) sun4 sfmmu \
212 sun common
213 CLOSED_XRDIRS = $(SHARED_XRDIRS:%=% ../../closed/uts/%)
214 XRDIRS = $(SHARED_XRDIRS)
215 CLOSED_XRDIRS_XEN = $(CLOSED_XRDIRS:../../closed/uts/i86xpv=)
216 CLOSED_XRDIRS_1 = $(CLOSED_XRDIRS_XEN:../../closed/uts/i86pc=)
217 $(CLOSED_BUILD)XRDIRS = $(CLOSED_XRDIRS_1:../../closed/uts/sfmmu=)
219 XRINCDIRS = $(XRDIRS)
221 cscope.out tags: FRC
222 $(XREF) -x $@
224 FRC: