Makefile.targ revision 4851:5e98cf4c2164
1193323Sed#
2193323Sed# CDDL HEADER START
3193323Sed#
4193323Sed# The contents of this file are subject to the terms of the
5193323Sed# Common Development and Distribution License (the "License").
6193323Sed# You may not use this file except in compliance with the License.
7193323Sed#
8193323Sed# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9193323Sed# or http://www.opensolaris.org/os/licensing.
10193323Sed# See the License for the specific language governing permissions
11193323Sed# and limitations under the License.
12193323Sed#
13193323Sed# When distributing Covered Code, include this CDDL HEADER in each
14193323Sed# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15193323Sed# If applicable, add the following below this CDDL HEADER, with the
16193323Sed# fields enclosed by brackets "[]" replaced with your own identifying
17193323Sed# information: Portions Copyright [yyyy] [name of copyright owner]
18193323Sed#
19193323Sed# CDDL HEADER END
20193323Sed#
21193323Sed#
22193323Sed# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23193323Sed# Use is subject to license terms.
24193323Sed#
25193323Sed#ident	"%Z%%M%	%I%	%E% SMI"
26193323Sed#
27193323Sed#	This Makefiles contains the common targets and definitions for
28193323Sed#	all kernels. It is to be included in the Makefiles for specific
29193323Sed#	implementation architectures and processor architecture dependent
30193323Sed#	modules: i.e.: all driving kernel Makefiles.
31193323Sed#
32193323Sed
33193323Sed#
34200581Srdivacky#	Default rule for building the lint library directory:
35193323Sed#
36193323Sed$(LINT_LIB_DIR):
37193323Sed	-@mkdir -p $@ 2> /dev/null
38193323Sed
39200581Srdivacky#
40200581Srdivacky#	All C objects depend on inline files. However, cc(1) doesn't generate
41200581Srdivacky#	the correct dependency info. Also, these Makefiles don't contain a
42200581Srdivacky#	separate list of C-derived object files (but it is light weight to
43193323Sed#	let the assembler files think they depend upon this when they don't).
44193323Sed#	Fortunately, the inline files won't change very often. So, for now,
45193323Sed#	all objects depend on the inline files. Remove this when the inliner
46193323Sed#	is fixed to drop correct dependency information.
47193323Sed#
48193323Sed$(OBJECTS): $(INLINES)
49193323Sed
50193323Sed#
51193323Sed#	Partially link .o files to generate the kmod. The fake dependency
52193323Sed#	on modstubs simplifies things...
53193323Sed#	ELFSIGN_MOD is defined in the individual KCF plug-in modules Makefiles,
54193323Sed#	and will sign the ELF objects using elfsign(1).
55193323Sed#
56193323Sed$(BINARY):		$(OBJECTS)
57193323Sed	$(LD) -r $(LDFLAGS) -o $@ $(OBJECTS)
58193323Sed	$(CTFMERGE_UNIQUIFY_AGAINST_GENUNIX)
59193323Sed	$(POST_PROCESS)
60200581Srdivacky	$(ELFSIGN_MOD)
61200581Srdivacky
62200581Srdivacky#
63193323Sed#	This target checks each kmod for undefined entry points. It does not
64193323Sed#	modify the kmod in any way.
65193323Sed#
66193323Sed$(MODULE).check:	FRC
67193323Sed	@BUILD_TYPE=DBG32 $(MAKE) $(MODULE).check.targ
68193323Sed
69193323Sed$(MODULE).check.targ:	$(BINARY) $(OBJECTS) $(EXTRA_CHECK_OBJS) $(UNIX_O) $(MODSTUBS_O) $(GENLIB)
70193323Sed	$(LD) -o /dev/null $(OBJECTS) $(EXTRA_CHECK_OBJS) $(UNIX_O) $(MODSTUBS_O) $(GENLIB)
71193323Sed
72193323Sed#
73193323Sed#	Module lint library construction targets.
74193323Sed#
75193323SedMOD_LINT_LIB	= $(LINT_LIB_DIR)/llib-l$(LINT_MODULE).ln
76193323Sed
77193323Sed$(MOD_LINT_LIB):	$(LINT_LIB_DIR) $(LINTS)
78193323Sed	@-$(ECHO) "\n$(OBJS_DIR)/$(MODULE): (library construction):"
79193323Sed	@$(LINT) -o $(LINT_MODULE)-$(OBJS_DIR) $(LINTFLAGS) $(LINTS)
80198396Srdivacky	@$(MV) llib-l$(LINT_MODULE)-$(OBJS_DIR).ln $@
81198396Srdivacky
82198396Srdivacky$(LINT_MODULE).lint:	$(MOD_LINT_LIB) $(LINT_LIB) $(GEN_LINT_LIB)
83193323Sed	@-$(ECHO) "\n$(OBJS_DIR)/$(LINT_MODULE): global crosschecks:"
84193323Sed	@$(LINT) $(LINTFLAGS) $(MOD_LINT_LIB) $(LINT_LIB) $(GEN_LINT_LIB)
85193323Sed
86193323Sed#
87193323Sed# Since assym.h is a derived file, the dependency must be explicit for
88193323Sed# all files including this file. (This is only actually required in the
89193323Sed# instance when the .nse_depinfo file does not exist.) It may seem that
90193323Sed# the lint targets should also have a similar dependency, but they don't
91193323Sed# since only C headers are included when #defined(lint) is true. The
92193323Sed# actual lists are defined in */Makefile.files.
93193323Sed#
94193323Sed$(ASSYM_DEPS:%=$(OBJS_DIR)/%):	$(DSF_DIR)/$(OBJS_DIR)/assym.h
95193323Sed
96193323Sed#
97193323Sed#	Everybody need to know how to create a modstubs.o built with the
98193323Sed#	appropriate flags and located in the appropriate location.
99200581Srdivacky#
100200581Srdivacky$(MODSTUBS_O):	$(MODSTUBS)
101200581Srdivacky	$(COMPILE.s) -o $@ $(MODSTUBS)
102193323Sed
103193323Sed$(LINTS_DIR)/modstubs.ln:	$(MODSTUBS)
104193323Sed	@($(LHEAD) $(LINT.s) $(MODSTUBS) $(LTAIL))
105193323Sed
106193323Sed#
107193323Sed# Build the source file which contains the kernel's utsname,
108193323Sed# with release, version and machine set as follows:
109193323Sed#
110193323Sed#	release: contents of $(RELEASE) (Spaces replaced by '_')
111193323Sed#	version: contents of $(PATCHID) (Spaces replaced by '_')
112193323Sed#	machine: contents of $(UNAME_M)
113193323Sed#
114193323Sed# Build environment information is only contained in the comment section.
115193323Sed#
116193323Sed# The version string, normally the variable VERSION, is set to display
117193323Sed# environmental information temporarily while in development because
118193323Sed# it provides a little more useful information.
119198892Srdivacky#
120193323SedVERSION_STRING	= ($(ECHO) $$LOGNAME [\`basename $$CODEMGR_WS\`] \\\c; date +%D)
121193323Sed$(INTERNAL_RELEASE_BUILD)VERSION_STRING = $(ECHO) $(PATCHID)
122193323Sed
123193323Sed$(OBJS_DIR)/vers.o: $(OBJECTS)
124193323Sed	$(COMPILE.c) -DUTS_RELEASE=\"`$(ECHO) $(RELEASE) | sed -e 's/ /_/g'`\" \
125193323Sed	    -DUTS_VERSION=\"`$(VERSION_STRING) | sed -e 's/ /_/g'`\" \
126193323Sed	    -DUTS_PLATFORM=\"$(UNAME_M)\" -o $@ $(SRC)/uts/common/os/vers.c
127193323Sed	$(CTFCONVERT_O)
128200581Srdivacky	$(POST_PROCESS_O)
129200581Srdivacky
130200581Srdivacky$(LINTS_DIR)/vers.ln: $(SRC)/uts/common/os/vers.c
131200581Srdivacky	@($(LHEAD) $(LINT.c) -DUTS_RELEASE=\"\" -DUTS_VERSION=\"\" \
132200581Srdivacky	    -DUTS_PLATFORM=\"\" $(SRC)/uts/common/os/vers.c $(LTAIL))
133200581Srdivacky
134200581Srdivacky#
135200581Srdivacky#	Installation targets and rules:
136200581Srdivacky#
137200581Srdivacky$(ROOT_MOD_DIR) $(USR_MOD_DIR):
138200581Srdivacky	-$(INS.dir.root.sys)
139200581Srdivacky
140200581Srdivacky$(ROOT_MOD_DIRS_32):	$(ROOT_MOD_DIR)
141200581Srdivacky	-$(INS.dir.root.sys)
142200581Srdivacky
143200581Srdivacky$(USR_MOD_DIRS_32):	$(USR_MOD_DIR)
144200581Srdivacky	-$(INS.dir.root.sys)
145200581Srdivacky
146200581Srdivacky$(ROOT_MOD_DIR)/%:	$(OBJS_DIR)/% $(ROOT_MOD_DIR) FRC
147200581Srdivacky	$(INS.file)
148200581Srdivacky
149193323Sed$(ROOT_CPU_DIR)/%:	$(OBJS_DIR)/% $(ROOT_CPU_DIR) FRC
150193323Sed	$(INS.file)
151193323Sed
152193323Sed$(ROOT_DRV_DIR)/%:	$(OBJS_DIR)/% $(ROOT_DRV_DIR) FRC
153193323Sed	$(INS.file)
154193323Sed
155193323Sed$(ROOT_DTRACE_DIR)/%:	$(OBJS_DIR)/% $(ROOT_DTRACE_DIR) FRC
156193323Sed	$(INS.file)
157193323Sed
158193323Sed$(ROOT_EXEC_DIR)/%:	$(OBJS_DIR)/% $(ROOT_EXEC_DIR) FRC
159199481Srdivacky	$(INS.file)
160200581Srdivacky
161200581Srdivacky$(ROOT_FS_DIR)/%:	$(OBJS_DIR)/% $(ROOT_FS_DIR) FRC
162193323Sed	$(INS.file)
163193323Sed
164193323Sed$(ROOT_SCHED_DIR)/%:	$(OBJS_DIR)/% $(ROOT_SCHED_DIR) FRC
165193323Sed	$(INS.file)
166193323Sed
167193323Sed$(ROOT_STRMOD_DIR)/%:	$(OBJS_DIR)/% $(ROOT_STRMOD_DIR) FRC
168193323Sed	$(INS.file)
169193323Sed
170193323Sed$(ROOT_IPP_DIR)/%:	$(OBJS_DIR)/% $(ROOT_IPP_DIR) FRC
171193323Sed	$(INS.file)
172193323Sed
173193323Sed$(ROOT_SYS_DIR)/%:	$(OBJS_DIR)/% $(ROOT_SYS_DIR) FRC
174193323Sed	$(INS.file)
175199481Srdivacky
176193323Sed$(ROOT_MISC_DIR)/%:	$(OBJS_DIR)/% $(ROOT_MISC_DIR) FRC
177193323Sed	$(INS.file)
178193323Sed
179193323Sed$(ROOT_DACF_DIR)/%:	$(OBJS_DIR)/% $(ROOT_DACF_DIR) FRC
180193323Sed	$(INS.file)
181193323Sed
182193323Sed$(ROOT_BRAND_DIR)/%:	$(OBJS_DIR)/% $(ROOT_BRAND_DIR) FRC
183193323Sed	$(INS.file)
184193323Sed
185193323Sed$(ROOT_CRYPTO_DIR)/%:	$(OBJS_DIR)/% $(ROOT_CRYPTO_DIR) FRC
186193323Sed	$(INS.file)
187193323Sed
188193323Sed$(ROOT_KGSS_DIR)/%:	$(OBJS_DIR)/% $(ROOT_KGSS_DIR) FRC
189193323Sed	$(INS.file)
190198090Srdivacky
191193323Sed$(ROOT_SCSI_VHCI_DIR)/%: $(OBJS_DIR)/% $(ROOT_SCSI_VHCI_DIR) FRC
192193323Sed	$(INS.file)
193193323Sed
194193323Sed$(ROOT_MACH_DIR)/%:	$(OBJS_DIR)/% $(ROOT_MACH_DIR) FRC
195193323Sed	$(INS.file)
196193323Sed
197193323Sed$(ROOT_FONT_DIR)/%:	$(OBJS_DIR)/% $(ROOT_MOD_DIR) $(ROOT_FONT_DIR) FRC
198193323Sed	$(INS.file)
199193323Sed
200193323Sed$(ROOT_MAC_DIR)/%:	$(OBJS_DIR)/% $(ROOT_MOD_DIR) $(ROOT_MAC_DIR) FRC
201193323Sed	$(INS.file)
202193323Sed
203193323Sed$(ROOT_DEVNAME_DIR)/%:	$(OBJS_DIR)/% $(ROOT_DEVNAME_DIR) FRC
204193323Sed	$(INS.file)
205193323Sed
206193323Sed$(USR_DRV_DIR)/%:	$(OBJS_DIR)/% $(USR_DRV_DIR) FRC
207193323Sed	$(INS.file)
208193323Sed
209193323Sed$(USR_EXEC_DIR)/%:	$(OBJS_DIR)/% $(USR_EXEC_DIR) FRC
210193323Sed	$(INS.file)
211193323Sed
212193323Sed$(USR_FS_DIR)/%:	$(OBJS_DIR)/% $(USR_FS_DIR) FRC
213193323Sed	$(INS.file)
214193323Sed
215193323Sed$(USR_SCHED_DIR)/%:	$(OBJS_DIR)/% $(USR_SCHED_DIR) FRC
216193323Sed	$(INS.file)
217193323Sed
218193323Sed$(USR_STRMOD_DIR)/%:	$(OBJS_DIR)/% $(USR_STRMOD_DIR) FRC
219193323Sed	$(INS.file)
220193323Sed
221193323Sed$(USR_SYS_DIR)/%:	$(OBJS_DIR)/% $(USR_SYS_DIR) FRC
222193323Sed	$(INS.file)
223193323Sed
224193323Sed$(USR_MISC_DIR)/%:	$(OBJS_DIR)/% $(USR_MISC_DIR) FRC
225193323Sed	$(INS.file)
226193323Sed
227193323Sed$(USR_DACF_DIR)/%:	$(OBJS_DIR)/% $(USR_DACF_DIR) FRC
228193323Sed	$(INS.file)
229193323Sed
230193323Sed$(USR_PCBE_DIR)/%:	$(OBJS_DIR)/% $(USR_PCBE_DIR) FRC
231193323Sed	$(INS.file)
232193323Sed
233193323Sed$(USR_DEVNAME_DIR)/%:	$(OBJS_DIR)/% $(USR_DEVNAME_DIR) FRC
234193323Sed	$(INS.file)
235193323Sed
236193323Sedinclude $(SRC)/Makefile.psm.targ
237193323Sed
238193323Sed#
239193323Sed#	Target for 64b modules
240193323Sed#
241193323Sed$(ROOT_KERN_DIR_64):
242193323Sed	-$(INS.dir.root.sys)
243193323Sed
244193323Sed$(ROOT_KERN_DIR_64)/%:	$(OBJS_DIR)/% $(ROOT_KERN_DIR_64) FRC
245193323Sed	$(INS.file)
246193323Sed
247193323Sed%/$(SUBDIR64):		%
248199481Srdivacky	-$(INS.dir.root.sys)
249199481Srdivacky
250199481Srdivacky#
251199481Srdivacky#	Targets for '.conf' file installation.
252199481Srdivacky#
253199481Srdivacky$(ROOT_CONFFILE):	$(SRC_CONFFILE)	$(ROOT_CONFFILE:%/$(CONFFILE)=%)
254199481Srdivacky	$(INS.conffile)
255193323Sed
256193323Sed#
257193323Sed#	Targets for '.esa' (activation) file installation.
258193323Sed#
259193323Sed$(ROOT_ACTFILE):
260193323Sed	$(INS.actfile)
261193323Sed
262193323Sed#
263193323Sed#	Targets for creating links between common platforms. ROOT_PLAT_LINKS
264193323Sed#	are are the /platform level while ROOT_PLAT_LINKS_2 are one level
265193323Sed#	down (/platform/`uname -i`/{lib|sbin|kernel}.
266193323Sed#
267193323Sed$(ROOT_PLAT_LINKS):
268193323Sed	$(INS.slink1)
269193323Sed
270193323Sed$(ROOT_PLAT_LINKS_2):
271193323Sed	$(INS.slink2)
272193323Sed
273193323Sed$(USR_PLAT_LINKS):
274193323Sed	$(INS.slink1)
275193323Sed
276193323Sed$(USR_PLAT_LINKS_2):
277193323Sed	$(INS.slink2)
278193323Sed
279193323Sed#
280193323Sed# multiple builds support
281193323Sed#
282193323Seddef $(DEF_DEPS)			:= TARGET = def
283193323Sedall $(ALL_DEPS)			:= TARGET = all
284193323Sedclean $(CLEAN_DEPS)		:= TARGET = clean
285198090Srdivackyclobber $(CLOBBER_DEPS)		:= TARGET = clobber
286198090Srdivackylint $(LINT_DEPS)		:= TARGET = lint
287198090Srdivackymodlintlib $(MODLINTLIB_DEPS)	:= TARGET = modlintlib
288198090Srdivackymodlist	$(MODLIST_DEPS)		:= TARGET = modlist
289198090Srdivackymodlist	$(MODLIST_DEPS)		:= NO_STATE= -K $$MODSTATE$$$$
290198090Srdivackyclean.lint $(CLEAN_LINT_DEPS)	:= TARGET = clean.lint
291198090Srdivackyinstall $(INSTALL_DEPS)		:= TARGET = install
292193323Sedsymcheck $(SYM_DEPS)		:= TARGET = symcheck
293193323Sed
294193323SedALL_TARGS	= def all clean clobber lint modlintlib \
295193323Sed		  clean.lint lintlib install symcheck
296193323Sed
297193323SedALL_OBJ32	= $(ALL_TARGS:%=%.obj32)
298193323Sed
299193323Sed$(ALL_OBJ32):	FRC
300193323Sed	@BUILD_TYPE=OBJ32 VERSION='$(VERSION)' $(MAKE) $(NO_STATE) $(TARGET).targ
301193323Sed
302193323SedALL_DEBUG32	= $(ALL_TARGS:%=%.debug32)
303193323Sed
304193323Sed$(ALL_DEBUG32):	FRC
305193323Sed	@BUILD_TYPE=DBG32 VERSION='$(VERSION)' $(MAKE) $(NO_STATE) $(TARGET).targ
306193323Sed
307193323SedALL_OBJ64	= $(ALL_TARGS:%=%.obj64)
308193323Sed
309193323Sed$(ALL_OBJ64):	FRC
310193323Sed	@BUILD_TYPE=OBJ64 VERSION='$(VERSION)' $(MAKE) $(NO_STATE) $(TARGET).targ
311193323Sed
312193323SedALL_DEBUG64	= $(ALL_TARGS:%=%.debug64)
313193323Sed
314193323Sed$(ALL_DEBUG64):	FRC
315193323Sed	@BUILD_TYPE=DBG64 VERSION='$(VERSION)' $(MAKE) $(NO_STATE) $(TARGET).targ
316193323Sed
317193323Sed#
318193323Sed#	Currently only the IP module needs symbol checking on obj64.
319193323Sed#	Other modules have the same global-objs nm output for debug64 and obj64.
320199481Srdivacky#
321199481Srdivacky$(SISCHECK_DEPS):	$(DEF_DEPS)
322199481Srdivacky	@TARG=`$(ECHO) $@ | $(CUT) -d'.' -f2`; \
323199481Srdivacky	MODSYMS=$(MODULE).symbols.$$TARG; \
324199481Srdivacky	if [ -f "$(MODULE).global-objs.$$TARG" ]; then \
325199481Srdivacky		$(GREP) -v '#' $(MODULE).global-objs.$$TARG |$(GREP) . | \
326199481Srdivacky		    $(SORT) -u > $$MODSYMS.tmp; \
327199481Srdivacky		$(NM) $$TARG/$(MODULE) |$(GREP) OBJT |$(GREP) -v UNDEF | \
328199481Srdivacky		    $(CUT) -d'|' -f8 |$(GREP) -v '^___const_' | \
329193323Sed		    $(GREP) -v '\.[0-9]*$$' |$(SORT) -u \
330193323Sed		    > $$MODSYMS.tmp.new; \
331193323Sed		$(DIFF) $$MODSYMS.tmp $$MODSYMS.tmp.new > $$MODSYMS.diff || \
332193323Sed		    ($(ECHO) "warning: $(MODULE) symbol checking:" \
333193323Sed		    "global variable(s) introduced and/or removed."; \
334193323Sed		    $(CAT) $$MODSYMS.diff; exit 1) \
335193323Sed	fi
336193323Sed
337193323Sed$(SISCLEAN_DEPS):
338193323Sed	-TARG=`$(ECHO) $@ | $(CUT) -d'.' -f2`; \
339193323Sed	MODSYMS=$(MODULE).symbols.$$TARG; \
340193323Sed	$(RM) $$MODSYMS.tmp $$MODSYMS.tmp.new $$MODSYMS.diff Nothing_to_remove
341193323Sed
342193323Sed
343193323Sed$(OBJS_DIR):
344193323Sed	-@mkdir -p $@ 2> /dev/null
345193323Sed
346193323Seddef.targ:		$(OBJS_DIR) $(ALL_TARGET)
347193323Sed
348193323Sedall.targ:		$(OBJS_DIR) $(ALL_TARGET)
349193323Sed
350193323Sedlint.targ:		$(OBJS_DIR) $(LINT_TARGET)
351193323Sed
352193323Sedmodlintlib.targ:	$(OBJS_DIR) $(MOD_LINT_LIB)
353193323Sed
354193323Sedinstall.targ:		$(OBJS_DIR) $(INSTALL_TARGET)
355193323Sed
356193323Sed#
357193323Sed# Support for Install.sh.
358193323Sed#
359193323Sed
360193323Sedmodlist:	$(MODLIST_DEPS)
361193323Sed
362193323Sed# paths relative to $(ROOT).
363193323SedRELMODULE = $(ROOTMODULE:$(ROOT)/%=%)
364193323SedRELCONF = $(ROOT_CONFFILE:$(ROOT)/%=%)
365193323SedRELLINK = $(ROOTLINK:$(ROOT)/%=%)
366193323SedRELUNIX = $(UNIX32_LINK:$(ROOT)/%=%)
367193323SedRELSOFTLINKS = $(ROOTSOFTLINKS:$(ROOT)/%=%)
368193323Sed
369193323SedMODSRC:sh=		pwd
370193323Sed
371193323Sed#
372193323Sed# Changes to this target may require corresponding changes to
373193323Sed# Install.sh.
374193323Sed# Don't issue a MOD entry if it's not in the install list.
375193323Sed#
376193323Sed$(MODLIST_DEPS): FRC
377193323Sed	@case $@ in \
378193323Sed	*32) \
379193323Sed		class=32; \
380193323Sed		relmodule=`dirname $(RELMODULE)`; \
381193323Sed		rellink=`dirname $(RELLINK)`;; \
382193323Sed	*64) \
383193323Sed		class=64; \
384193323Sed		relmodule=`dirname $(RELMODULE)`/$(SUBDIR64); \
385193323Sed		rellink=`dirname $(RELLINK)`/$(SUBDIR64);; \
386193323Sed	esac; \
387193323Sed	if [ -z "$(THISIMPL)" ]; then \
388193323Sed		impl=all; \
389193323Sed	else \
390193323Sed		impl=$(THISIMPL); \
391193323Sed	fi; \
392193323Sed	if [ -n "$(ROOTMODULE)" -a -n "$(INSTALL_TARGET)" ]; then \
393193323Sed		if [ -z "$(MODULE)" ]; then \
394193323Sed			module=`basename $(ROOTMODULE)`; \
395193323Sed		else \
396193323Sed			module=$(MODULE); \
397193323Sed		fi; \
398193323Sed		tinstall="$(INSTALL_TARGET)"; \
399193323Sed		for t in $$tinstall; do \
400193323Sed			if [ "$(ROOTMODULE)" = $$t ]; then \
401193323Sed				echo MOD $$module $$relmodule \
402193323Sed				    $$class $$impl $(MODSRC); \
403193323Sed				break; \
404193323Sed			fi \
405193323Sed		done \
406193323Sed	fi; \
407193323Sed	if [ -n "$(CONF_SRCDIR)" ]; then \
408193323Sed		tinstall="$(INSTALL_TARGET)"; \
409193323Sed		for t in $$tinstall; do \
410193323Sed			if [ $(ROOT_CONFFILE) = $$t ]; then \
411193323Sed				echo CONF $(RELCONF) \
412193323Sed				    $(MODSRC)/$(CONF_SRCDIR) $$impl $$module; \
413193323Sed				break; \
414193323Sed			fi \
415193323Sed		done \
416193323Sed	fi; \
417193323Sed	if [ -n "$(ROOTLINK)" ]; then \
418193323Sed		echo LINK $$relmodule $$module \
419193323Sed		    $$rellink `basename $(RELLINK)` $$impl; \
420193323Sed	fi; \
421193323Sed	if [ -n "$(UNIX32_LINK)" ]; then \
422193323Sed		echo SYMLINK $(SUBDIR64)/$(UNIX) \
423193323Sed		    `dirname $(RELUNIX)` unix $$impl $$module; \
424193323Sed	fi; \
425193323Sed	trelsoftlinks="$(RELSOFTLINKS)"; \
426193323Sed	for t in $$trelsoftlinks; do \
427193323Sed		if [ $$class = 32 ]; then \
428193323Sed			linkdir=`dirname $$t`; \
429193323Sed		else \
430193323Sed			linkdir=`dirname $$t`/$(SUBDIR64); \
431193323Sed		fi; \
432193323Sed		linkname=`basename $$t`; \
433193323Sed		echo SYMLINK $(MODULE) $$linkdir $$linkname \
434193323Sed		    $$impl $$module; \
435193323Sed	done
436193323Sed
437193323Sed#
438193323Sed#	Cleanliness is next to ...
439193323Sed#
440193323Sedclean.targ:
441193323Sed	-$(RM) $(CLEANFILES) Nothing_to_remove
442193323Sed
443193323Sedclobber.targ:
444193323Sed	-$(RM) $(CLOBBERFILES) Nothing_to_remove
445193323Sed
446193323Sedclean.lint.targ:
447193323Sed	-$(RM) $(CLEANLINTFILES) Nothing_to_remove
448193323Sed
449193323Sed#
450193323Sed#	Create fake lintlibs in the 64b dirs so
451193323Sed#	global linting works
452193323Sed#
453193323Sedlint64:
454193323Sed	@$(ECHO) $(MODULE) fake lints
455193323Sed	@for dir in $(LINT64_DIRS); do \
456193323Sed		if [ ! -d $$dir ]; then mkdir $$dir; fi \
457193323Sed	done
458199481Srdivacky	@for file in $(LINT64_FILES); do \
459199481Srdivacky		if [ ! -f $$file ]; then touch $$file; fi \
460199481Srdivacky	done
461199481Srdivacky
462199481Srdivacky#
463199481Srdivacky#	In some places we also need to create fake lintlibs for 32b
464199481Srdivacky#	dirs so global linting works
465199481Srdivacky#
466193323Sedlint32:
467193323Sed	@$(ECHO) $(MODULE) fake lints
468193323Sed	@for dir in $(LINT32_DIRS); do \
469193323Sed		if [ ! -d $$dir ]; then mkdir $$dir; fi \
470193323Sed	done
471193323Sed	@for file in $(LINT32_FILES); do \
472193323Sed		if [ ! -f $$file ]; then touch $$file; fi \
473193323Sed	done
474193323Sed
475193323SedFRC:
476193323Sed