29 UTSBASE = ..
30
31 include Makefile.sun4u
32
33 #
34 # The following are SPARC specific (rather than sun4u) specific modules
35 # which are required for the sun4u kernel to completely lint. They are
36 # not involved in the build in any other way. In order to minimize
37 # build time, it is assumed that they are up to date. But since sun4u
38 # is really a separate architecture we cannot use the v7 sparc modules.
39 #
40 SPARC_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR)
41
42 SPARC_LINTS =
43
44 #
45 #
46 #
47 LINT_LIBS = $(LINT_LIB) \
48 $(LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
49 $(CLOSED_LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
50 $(SPARC_LINTS:%=$(SPARC_LIB_DIR)/llib-l%.ln)
51
52
53 def := TARGET= def
54 def.prereq := TARGET= def
55 all := TARGET= all
56 all.prereq := TARGET= all
57 install := TARGET= install
58 install.prereq := TARGET= all
59 install_h := TARGET= install_h
60 install_h.prere := TARGET= install_h
61 clean := TARGET= clean
62 clobber := TARGET= clobber
63 lint := TARGET= lint
64 lint.prereq := TARGET= lint
65 lintlib := TARGET= lintlib
66 modlintlib := TARGET= modlintlib
67 modlist := TARGET= modlist
68 modlist modlist.sparc := NO_STATE= -K $$MODSTATE$$$$
69 clean.lint := TARGET= clean.lint
70 check := TARGET= check
71
72 .KEEP_STATE:
73
74 .PARALLEL: $(PARALLEL_KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
75 $(IMPLEMENTATIONS) $(CLOSED_IMPLEMENTATIONS) \
76 modlist modlist.sparc
77
78 # Override for CPU_KMODS... they cannot be built
79 # in parallel
80 .NO_PARALLEL: $(CPU_KMODS)
81
82 def all clean clobber clean.lint: genassym unix .WAIT \
83 $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
84 $(IMPLEMENTATIONS) $(CLOSED_IMPLEMENTATIONS)
85
86 clobber: clobber.targ
87
88 # list the modules under sun4u.
89 modlist: unix $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
90 $(IMPLEMENTATIONS:.WAIT=) $(CLOSED_IMPLEMENTATIONS)
91
92 # list the modules for Install -k sun4u.
93 modlist.karch: modlist modlist.sparc
94
95 modlist.sparc:
96 @cd $(SRC)/uts/sparc; pwd; $(MAKE) $(NO_STATE) modlist
97
98 install: install_platforms genassym unix .WAIT $(KMODS) $(CLOSED_KMODS) \
99 $(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS) $(CLOSED_IMPLEMENTATIONS)
100
101 lintlib: unix
102
103 modlintlib: $(LINT_KMODS) $(CLOSED_LINT_KMODS)
104
105 genassym unix $(KMODS): FRC
106 @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
107
108 #
109 # Privilege constants
110 #
111 # NOTE: The rules for generating priv_const.c file are shared between all
112 # processor architectures and should be kept in sync. If they are changed in
113 # this file make sure that x86 rules are updated as well.
114 #
115 PRIVS_C = $(UTSBASE)/common/os/priv_const.c
116
117 $(PRIVS_C): $(PRIVS_AWK) $(PRIVS_DEF)
118 $(NAWK) -f $(PRIVS_AWK) < $(PRIVS_DEF) cfile=$@
119
120 CLOBBERFILES += $(PRIVS_C)
121
122 #
123 # Prerequisites
178
179 #
180 # Platform inter-dependencies
181 #
182 lw8: serengeti
183
184 quasar: darwin
185
186 #
187 # The genunix requires priv_const.c file to be generated first.
188 #
189 genunix: $(PRIVS_C)
190
191 #
192 # Rules
193 #
194
195 $(IMPLEMENTATIONS): FRC
196 @cd $@; pwd; THISIMPL=$@ $(MAKE) $(NO_STATE) $(TARGET)
197
198 $(CLOSED_IMPLEMENTATIONS): FRC
199 cd $(CLOSED)/uts/sun4u/$@; pwd; \
200 THISIMPL=$@ $(MAKE) $(NO_STATE) $(TARGET); \
201
202 $(XMODS): FRC
203 @if [ -f $@/Makefile ]; then \
204 cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
205 else \
206 true; \
207 fi
208
209 $(CLOSED_XMODS): FRC
210 @if [ -f $(CLOSED)/uts/sun4u/$@/Makefile ]; then \
211 cd $(CLOSED)/uts/sun4u/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
212 else \
213 true; \
214 fi
215
216 $(CLOSED_KMODS): FRC
217 cd $(CLOSED)/uts/sun4u/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
218
219 install_h check: install_platforms $(IMPLEMENTATIONS) \
220 $(CLOSED_IMPLEMENTATIONS) FRC
221 @cd sys; pwd; $(MAKE) $(TARGET)
222 @cd vm; pwd; $(MAKE) $(TARGET)
223
224 #
225 # Rules for the /platforms directories. This is hardwired here because
226 # the first stage of the project (KBI) only implements the userland
227 # changes, but the only reasonable place to record the aliases is
228 # here in kernel land.
229 #
230 $(ROOT_PLAT_DIRS): $(ROOT_PLAT_DIR)
231 -$(INS.dir)
232
233 #
234 # create directories in /usr/platform/ for the implementations that are
235 # defined in $(IMPLEMENTED_PLATFORM)
236 # (eg. SUNW,Ultra-1)
237 #
238 # Foreach $(IMPLEMENTED_PLATFORM) there can be a list of $(LINKED_PLATFORMS)
239 # that are linked to it.
240 #
270 $(USR_DESKTOP_INC_DIR): $(USR_DESKTOP_DIR)
271 $(INS.slink4)
272
273 $(USR_DESKTOP_SBIN_DIR): $(USR_DESKTOP_DIR)
274 $(INS.slink5)
275
276 $(USR_DESKTOP_LIB_DIR): $(USR_DESKTOP_DIR)
277 -$(INS.dir)
278
279 #
280 # Full kernel lint target.
281 #
282 LINT_TARGET = globallint
283
284 globallint:
285 @pwd
286 @-$(ECHO) "\nSUN4U KERNEL: global crosschecks:"
287 @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
288
289 lint: lintlib .WAIT modlintlib .WAIT $(SPARC_LINTS) $(LINT_DEPS) \
290 $(IMPLEMENTATIONS) $(CLOSED_IMPLEMENTATIONS) $(CPU_KMODS)
291
292 include ../Makefile.targ
293
294 #
295 # Cross-reference customization: build a cross-reference over all of the
296 # sun4u-related directories.
297 #
298 SHARED_XRDIRS = ../sun4u ../sun4 ../sfmmu ../sparc ../sun ../common
299 CLOSED_XRDIRS = $(SHARED_XRDIRS:../%=../% ../../../closed/uts/%)
300 XRDIRS = $(SHARED_XRDIRS)
301 $(CLOSED_BUILD)XRDIRS = $(CLOSED_XRDIRS:../../../closed/uts/sfmmu=)
302
303 XRPRUNE = i86pc
304
305 cscope.out tags: FRC
306 $(XREF) -x $@
|
29 UTSBASE = ..
30
31 include Makefile.sun4u
32
33 #
34 # The following are SPARC specific (rather than sun4u) specific modules
35 # which are required for the sun4u kernel to completely lint. They are
36 # not involved in the build in any other way. In order to minimize
37 # build time, it is assumed that they are up to date. But since sun4u
38 # is really a separate architecture we cannot use the v7 sparc modules.
39 #
40 SPARC_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR)
41
42 SPARC_LINTS =
43
44 #
45 #
46 #
47 LINT_LIBS = $(LINT_LIB) \
48 $(LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
49 $(SPARC_LINTS:%=$(SPARC_LIB_DIR)/llib-l%.ln)
50
51
52 def := TARGET= def
53 def.prereq := TARGET= def
54 all := TARGET= all
55 all.prereq := TARGET= all
56 install := TARGET= install
57 install.prereq := TARGET= all
58 install_h := TARGET= install_h
59 install_h.prere := TARGET= install_h
60 clean := TARGET= clean
61 clobber := TARGET= clobber
62 lint := TARGET= lint
63 lint.prereq := TARGET= lint
64 lintlib := TARGET= lintlib
65 modlintlib := TARGET= modlintlib
66 modlist := TARGET= modlist
67 modlist modlist.sparc := NO_STATE= -K $$MODSTATE$$$$
68 clean.lint := TARGET= clean.lint
69 check := TARGET= check
70
71 .KEEP_STATE:
72
73 .PARALLEL: $(PARALLEL_KMODS) $(XMODS) \
74 $(IMPLEMENTATIONS) \
75 modlist modlist.sparc
76
77 # Override for CPU_KMODS... they cannot be built
78 # in parallel
79 .NO_PARALLEL: $(CPU_KMODS)
80
81 def all clean clobber clean.lint: genassym unix .WAIT \
82 $(KMODS) $(XMODS) $(IMPLEMENTATIONS)
83
84 clobber: clobber.targ
85
86 # list the modules under sun4u.
87 modlist: unix $(KMODS) $(XMODS) $(IMPLEMENTATIONS:.WAIT=)
88
89 # list the modules for Install -k sun4u.
90 modlist.karch: modlist modlist.sparc
91
92 modlist.sparc:
93 @cd $(SRC)/uts/sparc; pwd; $(MAKE) $(NO_STATE) modlist
94
95 install: install_platforms genassym unix .WAIT $(KMODS) \
96 $(XMODS) $(IMPLEMENTATIONS)
97
98 lintlib: unix
99
100 modlintlib: $(LINT_KMODS)
101
102 genassym unix $(KMODS): FRC
103 @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
104
105 #
106 # Privilege constants
107 #
108 # NOTE: The rules for generating priv_const.c file are shared between all
109 # processor architectures and should be kept in sync. If they are changed in
110 # this file make sure that x86 rules are updated as well.
111 #
112 PRIVS_C = $(UTSBASE)/common/os/priv_const.c
113
114 $(PRIVS_C): $(PRIVS_AWK) $(PRIVS_DEF)
115 $(NAWK) -f $(PRIVS_AWK) < $(PRIVS_DEF) cfile=$@
116
117 CLOBBERFILES += $(PRIVS_C)
118
119 #
120 # Prerequisites
175
176 #
177 # Platform inter-dependencies
178 #
179 lw8: serengeti
180
181 quasar: darwin
182
183 #
184 # The genunix requires priv_const.c file to be generated first.
185 #
186 genunix: $(PRIVS_C)
187
188 #
189 # Rules
190 #
191
192 $(IMPLEMENTATIONS): FRC
193 @cd $@; pwd; THISIMPL=$@ $(MAKE) $(NO_STATE) $(TARGET)
194
195 $(XMODS): FRC
196 @if [ -f $@/Makefile ]; then \
197 cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
198 else \
199 true; \
200 fi
201
202 install_h check: install_platforms $(IMPLEMENTATIONS) \
203 @cd sys; pwd; $(MAKE) $(TARGET)
204 @cd vm; pwd; $(MAKE) $(TARGET)
205
206 #
207 # Rules for the /platforms directories. This is hardwired here because
208 # the first stage of the project (KBI) only implements the userland
209 # changes, but the only reasonable place to record the aliases is
210 # here in kernel land.
211 #
212 $(ROOT_PLAT_DIRS): $(ROOT_PLAT_DIR)
213 -$(INS.dir)
214
215 #
216 # create directories in /usr/platform/ for the implementations that are
217 # defined in $(IMPLEMENTED_PLATFORM)
218 # (eg. SUNW,Ultra-1)
219 #
220 # Foreach $(IMPLEMENTED_PLATFORM) there can be a list of $(LINKED_PLATFORMS)
221 # that are linked to it.
222 #
252 $(USR_DESKTOP_INC_DIR): $(USR_DESKTOP_DIR)
253 $(INS.slink4)
254
255 $(USR_DESKTOP_SBIN_DIR): $(USR_DESKTOP_DIR)
256 $(INS.slink5)
257
258 $(USR_DESKTOP_LIB_DIR): $(USR_DESKTOP_DIR)
259 -$(INS.dir)
260
261 #
262 # Full kernel lint target.
263 #
264 LINT_TARGET = globallint
265
266 globallint:
267 @pwd
268 @-$(ECHO) "\nSUN4U KERNEL: global crosschecks:"
269 @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
270
271 lint: lintlib .WAIT modlintlib .WAIT $(SPARC_LINTS) $(LINT_DEPS) \
272 $(IMPLEMENTATIONS) $(CPU_KMODS)
273
274 include ../Makefile.targ
275
276 #
277 # Cross-reference customization: build a cross-reference over all of the
278 # sun4u-related directories.
279 #
280 XRDIRS = ../sun4u ../sun4 ../sfmmu ../sparc ../sun ../common
281 XRPRUNE = i86pc
282
283 cscope.out tags: FRC
284 $(XREF) -x $@
|