1 0 stevel # 2 0 stevel # CDDL HEADER START 3 0 stevel # 4 0 stevel # The contents of this file are subject to the terms of the 5 1167 kupfer # Common Development and Distribution License (the "License"). 6 1167 kupfer # You may not use this file except in compliance with the License. 7 0 stevel # 8 0 stevel # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 0 stevel # or http://www.opensolaris.org/os/licensing. 10 0 stevel # See the License for the specific language governing permissions 11 0 stevel # and limitations under the License. 12 0 stevel # 13 0 stevel # When distributing Covered Code, include this CDDL HEADER in each 14 0 stevel # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 0 stevel # If applicable, add the following below this CDDL HEADER, with the 16 0 stevel # fields enclosed by brackets "[]" replaced with your own identifying 17 0 stevel # information: Portions Copyright [yyyy] [name of copyright owner] 18 0 stevel # 19 0 stevel # CDDL HEADER END 20 0 stevel # 21 0 stevel # 22 8815 Sukumar # Copyright 2009 Sun Microsystems, Inc. All rights reserved. 23 0 stevel # Use is subject to license terms. 24 0 stevel # 25 0 stevel # This Makefiles contains the common targets and definitions for 26 0 stevel # all kernels. It is to be included in the Makefiles for specific 27 0 stevel # implementation architectures and processor architecture dependent 28 0 stevel # modules: i.e.: all driving kernel Makefiles. 29 0 stevel # 30 0 stevel 31 0 stevel # 32 0 stevel # Default rule for building the lint library directory: 33 0 stevel # 34 0 stevel $(LINT_LIB_DIR): 35 0 stevel -@mkdir -p $@ 2> /dev/null 36 0 stevel 37 0 stevel # 38 0 stevel # All C objects depend on inline files. However, cc(1) doesn't generate 39 0 stevel # the correct dependency info. Also, these Makefiles don't contain a 40 0 stevel # separate list of C-derived object files (but it is light weight to 41 0 stevel # let the assembler files think they depend upon this when they don't). 42 0 stevel # Fortunately, the inline files won't change very often. So, for now, 43 0 stevel # all objects depend on the inline files. Remove this when the inliner 44 0 stevel # is fixed to drop correct dependency information. 45 0 stevel # 46 0 stevel $(OBJECTS): $(INLINES) 47 0 stevel 48 0 stevel # 49 0 stevel # Partially link .o files to generate the kmod. The fake dependency 50 0 stevel # on modstubs simplifies things... 51 0 stevel # ELFSIGN_MOD is defined in the individual KCF plug-in modules Makefiles, 52 0 stevel # and will sign the ELF objects using elfsign(1). 53 0 stevel # 54 0 stevel $(BINARY): $(OBJECTS) 55 0 stevel $(LD) -r $(LDFLAGS) -o $@ $(OBJECTS) 56 0 stevel $(CTFMERGE_UNIQUIFY_AGAINST_GENUNIX) 57 0 stevel $(POST_PROCESS) 58 0 stevel $(ELFSIGN_MOD) 59 0 stevel 60 0 stevel # 61 0 stevel # This target checks each kmod for undefined entry points. It does not 62 0 stevel # modify the kmod in any way. 63 0 stevel # 64 0 stevel $(MODULE).check: FRC 65 0 stevel @BUILD_TYPE=DBG32 $(MAKE) $(MODULE).check.targ 66 0 stevel 67 0 stevel $(MODULE).check.targ: $(BINARY) $(OBJECTS) $(EXTRA_CHECK_OBJS) $(UNIX_O) $(MODSTUBS_O) $(GENLIB) 68 0 stevel $(LD) -o /dev/null $(OBJECTS) $(EXTRA_CHECK_OBJS) $(UNIX_O) $(MODSTUBS_O) $(GENLIB) 69 0 stevel 70 0 stevel # 71 0 stevel # Module lint library construction targets. 72 0 stevel # 73 0 stevel MOD_LINT_LIB = $(LINT_LIB_DIR)/llib-l$(LINT_MODULE).ln 74 0 stevel 75 0 stevel $(MOD_LINT_LIB): $(LINT_LIB_DIR) $(LINTS) 76 0 stevel @-$(ECHO) "\n$(OBJS_DIR)/$(MODULE): (library construction):" 77 10631 Gordon @($(LINT) -o $(LINT_MODULE)-$(OBJS_DIR) \ 78 10631 Gordon $(LINTFLAGS) $(LINTS) $(LTAIL)) 79 3446 mrj @$(MV) llib-l$(LINT_MODULE)-$(OBJS_DIR).ln $@ 80 0 stevel 81 0 stevel $(LINT_MODULE).lint: $(MOD_LINT_LIB) $(LINT_LIB) $(GEN_LINT_LIB) 82 0 stevel @-$(ECHO) "\n$(OBJS_DIR)/$(LINT_MODULE): global crosschecks:" 83 10631 Gordon @($(LINT) $(LINTFLAGS) $(MOD_LINT_LIB) \ 84 10631 Gordon $(LINT_LIB) $(GEN_LINT_LIB) $(LTAIL)) 85 0 stevel 86 0 stevel # 87 0 stevel # Since assym.h is a derived file, the dependency must be explicit for 88 0 stevel # all files including this file. (This is only actually required in the 89 0 stevel # instance when the .nse_depinfo file does not exist.) It may seem that 90 0 stevel # the lint targets should also have a similar dependency, but they don't 91 0 stevel # since only C headers are included when #defined(lint) is true. The 92 0 stevel # actual lists are defined in */Makefile.files. 93 0 stevel # 94 0 stevel $(ASSYM_DEPS:%=$(OBJS_DIR)/%): $(DSF_DIR)/$(OBJS_DIR)/assym.h 95 0 stevel 96 0 stevel # 97 0 stevel # Everybody need to know how to create a modstubs.o built with the 98 0 stevel # appropriate flags and located in the appropriate location. 99 0 stevel # 100 0 stevel $(MODSTUBS_O): $(MODSTUBS) 101 0 stevel $(COMPILE.s) -o $@ $(MODSTUBS) 102 0 stevel 103 0 stevel $(LINTS_DIR)/modstubs.ln: $(MODSTUBS) 104 0 stevel @($(LHEAD) $(LINT.s) $(MODSTUBS) $(LTAIL)) 105 0 stevel 106 0 stevel # 107 0 stevel # Build the source file which contains the kernel's utsname, 108 0 stevel # with release, version and machine set as follows: 109 0 stevel # 110 0 stevel # release: contents of $(RELEASE) (Spaces replaced by '_') 111 0 stevel # version: contents of $(PATCHID) (Spaces replaced by '_') 112 3446 mrj # machine: contents of $(UNAME_M) 113 0 stevel # 114 0 stevel # Build environment information is only contained in the comment section. 115 0 stevel # 116 0 stevel # The version string, normally the variable VERSION, is set to display 117 0 stevel # environmental information temporarily while in development because 118 0 stevel # it provides a little more useful information. 119 0 stevel # 120 0 stevel VERSION_STRING = ($(ECHO) $$LOGNAME [\`basename $$CODEMGR_WS\`] \\\c; date +%D) 121 0 stevel $(INTERNAL_RELEASE_BUILD)VERSION_STRING = $(ECHO) $(PATCHID) 122 0 stevel 123 0 stevel $(OBJS_DIR)/vers.o: $(OBJECTS) 124 0 stevel $(COMPILE.c) -DUTS_RELEASE=\"`$(ECHO) $(RELEASE) | sed -e 's/ /_/g'`\" \ 125 0 stevel -DUTS_VERSION=\"`$(VERSION_STRING) | sed -e 's/ /_/g'`\" \ 126 3446 mrj -DUTS_PLATFORM=\"$(UNAME_M)\" -o $@ $(SRC)/uts/common/os/vers.c 127 0 stevel $(CTFCONVERT_O) 128 0 stevel $(POST_PROCESS_O) 129 0 stevel 130 0 stevel $(LINTS_DIR)/vers.ln: $(SRC)/uts/common/os/vers.c 131 0 stevel @($(LHEAD) $(LINT.c) -DUTS_RELEASE=\"\" -DUTS_VERSION=\"\" \ 132 0 stevel -DUTS_PLATFORM=\"\" $(SRC)/uts/common/os/vers.c $(LTAIL)) 133 0 stevel 134 0 stevel # 135 0 stevel # Installation targets and rules: 136 0 stevel # 137 0 stevel $(ROOT_MOD_DIR) $(USR_MOD_DIR): 138 10738 James -$(INS.dir) 139 0 stevel 140 0 stevel $(ROOT_MOD_DIRS_32): $(ROOT_MOD_DIR) 141 10738 James -$(INS.dir) 142 0 stevel 143 0 stevel $(USR_MOD_DIRS_32): $(USR_MOD_DIR) 144 10738 James -$(INS.dir) 145 0 stevel 146 0 stevel $(ROOT_MOD_DIR)/%: $(OBJS_DIR)/% $(ROOT_MOD_DIR) FRC 147 1414 cindi $(INS.file) 148 1414 cindi 149 1414 cindi $(ROOT_CPU_DIR)/%: $(OBJS_DIR)/% $(ROOT_CPU_DIR) FRC 150 0 stevel $(INS.file) 151 0 stevel 152 0 stevel $(ROOT_DRV_DIR)/%: $(OBJS_DIR)/% $(ROOT_DRV_DIR) FRC 153 0 stevel $(INS.file) 154 0 stevel 155 0 stevel $(ROOT_DTRACE_DIR)/%: $(OBJS_DIR)/% $(ROOT_DTRACE_DIR) FRC 156 0 stevel $(INS.file) 157 0 stevel 158 0 stevel $(ROOT_EXEC_DIR)/%: $(OBJS_DIR)/% $(ROOT_EXEC_DIR) FRC 159 0 stevel $(INS.file) 160 0 stevel 161 0 stevel $(ROOT_FS_DIR)/%: $(OBJS_DIR)/% $(ROOT_FS_DIR) FRC 162 0 stevel $(INS.file) 163 0 stevel 164 0 stevel $(ROOT_SCHED_DIR)/%: $(OBJS_DIR)/% $(ROOT_SCHED_DIR) FRC 165 8348 Eric $(INS.file) 166 8348 Eric 167 8348 Eric $(ROOT_SOCK_DIR)/%: $(OBJS_DIR)/% $(ROOT_SOCK_DIR) FRC 168 0 stevel $(INS.file) 169 0 stevel 170 0 stevel $(ROOT_STRMOD_DIR)/%: $(OBJS_DIR)/% $(ROOT_STRMOD_DIR) FRC 171 0 stevel $(INS.file) 172 0 stevel 173 0 stevel $(ROOT_IPP_DIR)/%: $(OBJS_DIR)/% $(ROOT_IPP_DIR) FRC 174 0 stevel $(INS.file) 175 0 stevel 176 0 stevel $(ROOT_SYS_DIR)/%: $(OBJS_DIR)/% $(ROOT_SYS_DIR) FRC 177 0 stevel $(INS.file) 178 0 stevel 179 0 stevel $(ROOT_MISC_DIR)/%: $(OBJS_DIR)/% $(ROOT_MISC_DIR) FRC 180 0 stevel $(INS.file) 181 0 stevel 182 0 stevel $(ROOT_DACF_DIR)/%: $(OBJS_DIR)/% $(ROOT_DACF_DIR) FRC 183 0 stevel $(INS.file) 184 0 stevel 185 2712 nn35248 $(ROOT_BRAND_DIR)/%: $(OBJS_DIR)/% $(ROOT_BRAND_DIR) FRC 186 2712 nn35248 $(INS.file) 187 2712 nn35248 188 0 stevel $(ROOT_CRYPTO_DIR)/%: $(OBJS_DIR)/% $(ROOT_CRYPTO_DIR) FRC 189 0 stevel $(INS.file) 190 0 stevel 191 0 stevel $(ROOT_KGSS_DIR)/%: $(OBJS_DIR)/% $(ROOT_KGSS_DIR) FRC 192 0 stevel $(INS.file) 193 0 stevel 194 4851 cth $(ROOT_SCSI_VHCI_DIR)/%: $(OBJS_DIR)/% $(ROOT_SCSI_VHCI_DIR) FRC 195 4851 cth $(INS.file) 196 4851 cth 197 10696 David $(ROOT_PMCS_FW_DIR)/%: $(OBJS_DIR)/% $(ROOT_PMCS_FW_DIR) FRC 198 10696 David $(INS.file) 199 10696 David 200 7836 John $(ROOT_QLC_FW_DIR)/%: $(OBJS_DIR)/% $(ROOT_QLC_FW_DIR) FRC 201 7836 John $(INS.file) 202 7836 John 203 8815 Sukumar $(ROOT_EMLXS_FW_DIR)/%: $(OBJS_DIR)/% $(ROOT_EMLXS_FW_DIR) FRC 204 8815 Sukumar $(INS.file) 205 8815 Sukumar 206 0 stevel $(ROOT_MACH_DIR)/%: $(OBJS_DIR)/% $(ROOT_MACH_DIR) FRC 207 0 stevel $(INS.file) 208 0 stevel 209 0 stevel $(ROOT_FONT_DIR)/%: $(OBJS_DIR)/% $(ROOT_MOD_DIR) $(ROOT_FONT_DIR) FRC 210 0 stevel $(INS.file) 211 0 stevel 212 2311 seb $(ROOT_MAC_DIR)/%: $(OBJS_DIR)/% $(ROOT_MOD_DIR) $(ROOT_MAC_DIR) FRC 213 2311 seb $(INS.file) 214 2311 seb 215 0 stevel $(USR_DRV_DIR)/%: $(OBJS_DIR)/% $(USR_DRV_DIR) FRC 216 0 stevel $(INS.file) 217 0 stevel 218 0 stevel $(USR_EXEC_DIR)/%: $(OBJS_DIR)/% $(USR_EXEC_DIR) FRC 219 0 stevel $(INS.file) 220 0 stevel 221 0 stevel $(USR_FS_DIR)/%: $(OBJS_DIR)/% $(USR_FS_DIR) FRC 222 0 stevel $(INS.file) 223 0 stevel 224 0 stevel $(USR_SCHED_DIR)/%: $(OBJS_DIR)/% $(USR_SCHED_DIR) FRC 225 0 stevel $(INS.file) 226 0 stevel 227 10639 Darren $(USR_SOCK_DIR)/%: $(OBJS_DIR)/% $(USR_SOCK_DIR) FRC 228 10639 Darren $(INS.file) 229 10639 Darren 230 0 stevel $(USR_STRMOD_DIR)/%: $(OBJS_DIR)/% $(USR_STRMOD_DIR) FRC 231 0 stevel $(INS.file) 232 0 stevel 233 0 stevel $(USR_SYS_DIR)/%: $(OBJS_DIR)/% $(USR_SYS_DIR) FRC 234 0 stevel $(INS.file) 235 0 stevel 236 0 stevel $(USR_MISC_DIR)/%: $(OBJS_DIR)/% $(USR_MISC_DIR) FRC 237 0 stevel $(INS.file) 238 0 stevel 239 0 stevel $(USR_DACF_DIR)/%: $(OBJS_DIR)/% $(USR_DACF_DIR) FRC 240 0 stevel $(INS.file) 241 0 stevel 242 0 stevel $(USR_PCBE_DIR)/%: $(OBJS_DIR)/% $(USR_PCBE_DIR) FRC 243 0 stevel $(INS.file) 244 0 stevel 245 8347 Jordan $(USR_DTRACE_DIR)/%: $(OBJS_DIR)/% $(USR_DTRACE_DIR) FRC 246 8347 Jordan $(INS.file) 247 8347 Jordan 248 8347 Jordan $(USR_BRAND_DIR)/%: $(OBJS_DIR)/% $(USR_BRAND_DIR) FRC 249 8347 Jordan $(INS.file) 250 8347 Jordan 251 5206 is $(ROOT_KICONV_DIR)/%: $(OBJS_DIR)/% $(ROOT_KICONV_DIR) FRC 252 5206 is $(INS.file) 253 5206 is 254 0 stevel include $(SRC)/Makefile.psm.targ 255 0 stevel 256 0 stevel # 257 0 stevel # Target for 64b modules 258 0 stevel # 259 0 stevel $(ROOT_KERN_DIR_64): 260 10738 James -$(INS.dir) 261 0 stevel 262 0 stevel $(ROOT_KERN_DIR_64)/%: $(OBJS_DIR)/% $(ROOT_KERN_DIR_64) FRC 263 0 stevel $(INS.file) 264 0 stevel 265 0 stevel %/$(SUBDIR64): % 266 10738 James -$(INS.dir) 267 0 stevel 268 0 stevel # 269 0 stevel # Targets for '.conf' file installation. 270 0 stevel # 271 0 stevel $(ROOT_CONFFILE): $(SRC_CONFFILE) $(ROOT_CONFFILE:%/$(CONFFILE)=%) 272 0 stevel $(INS.conffile) 273 0 stevel 274 0 stevel # 275 0 stevel # Targets for creating links between common platforms. ROOT_PLAT_LINKS 276 0 stevel # are are the /platform level while ROOT_PLAT_LINKS_2 are one level 277 0 stevel # down (/platform/`uname -i`/{lib|sbin|kernel}. 278 0 stevel # 279 0 stevel $(ROOT_PLAT_LINKS): 280 0 stevel $(INS.slink1) 281 0 stevel 282 0 stevel $(ROOT_PLAT_LINKS_2): 283 0 stevel $(INS.slink2) 284 0 stevel 285 0 stevel $(USR_PLAT_LINKS): 286 0 stevel $(INS.slink1) 287 0 stevel 288 0 stevel $(USR_PLAT_LINKS_2): 289 0 stevel $(INS.slink2) 290 0 stevel 291 0 stevel # 292 0 stevel # multiple builds support 293 0 stevel # 294 0 stevel def $(DEF_DEPS) := TARGET = def 295 0 stevel all $(ALL_DEPS) := TARGET = all 296 0 stevel clean $(CLEAN_DEPS) := TARGET = clean 297 0 stevel clobber $(CLOBBER_DEPS) := TARGET = clobber 298 0 stevel lint $(LINT_DEPS) := TARGET = lint 299 0 stevel modlintlib $(MODLINTLIB_DEPS) := TARGET = modlintlib 300 1167 kupfer modlist $(MODLIST_DEPS) := TARGET = modlist 301 1167 kupfer modlist $(MODLIST_DEPS) := NO_STATE= -K $$MODSTATE$$$$ 302 0 stevel clean.lint $(CLEAN_LINT_DEPS) := TARGET = clean.lint 303 0 stevel install $(INSTALL_DEPS) := TARGET = install 304 0 stevel symcheck $(SYM_DEPS) := TARGET = symcheck 305 0 stevel 306 1167 kupfer ALL_TARGS = def all clean clobber lint modlintlib \ 307 1167 kupfer clean.lint lintlib install symcheck 308 0 stevel 309 0 stevel ALL_OBJ32 = $(ALL_TARGS:%=%.obj32) 310 0 stevel 311 0 stevel $(ALL_OBJ32): FRC 312 1167 kupfer @BUILD_TYPE=OBJ32 VERSION='$(VERSION)' $(MAKE) $(NO_STATE) $(TARGET).targ 313 0 stevel 314 0 stevel ALL_DEBUG32 = $(ALL_TARGS:%=%.debug32) 315 0 stevel 316 0 stevel $(ALL_DEBUG32): FRC 317 1167 kupfer @BUILD_TYPE=DBG32 VERSION='$(VERSION)' $(MAKE) $(NO_STATE) $(TARGET).targ 318 0 stevel 319 0 stevel ALL_OBJ64 = $(ALL_TARGS:%=%.obj64) 320 0 stevel 321 0 stevel $(ALL_OBJ64): FRC 322 1167 kupfer @BUILD_TYPE=OBJ64 VERSION='$(VERSION)' $(MAKE) $(NO_STATE) $(TARGET).targ 323 0 stevel 324 0 stevel ALL_DEBUG64 = $(ALL_TARGS:%=%.debug64) 325 0 stevel 326 0 stevel $(ALL_DEBUG64): FRC 327 1167 kupfer @BUILD_TYPE=DBG64 VERSION='$(VERSION)' $(MAKE) $(NO_STATE) $(TARGET).targ 328 3678 yz155240 329 3678 yz155240 # 330 3678 yz155240 # Currently only the IP module needs symbol checking on obj64. 331 3678 yz155240 # Other modules have the same global-objs nm output for debug64 and obj64. 332 3678 yz155240 # 333 3678 yz155240 $(SISCHECK_DEPS): $(DEF_DEPS) 334 3678 yz155240 @TARG=`$(ECHO) $@ | $(CUT) -d'.' -f2`; \ 335 3678 yz155240 MODSYMS=$(MODULE).symbols.$$TARG; \ 336 3678 yz155240 if [ -f "$(MODULE).global-objs.$$TARG" ]; then \ 337 3678 yz155240 $(GREP) -v '#' $(MODULE).global-objs.$$TARG |$(GREP) . | \ 338 3678 yz155240 $(SORT) -u > $$MODSYMS.tmp; \ 339 3678 yz155240 $(NM) $$TARG/$(MODULE) |$(GREP) OBJT |$(GREP) -v UNDEF | \ 340 3905 yz155240 $(CUT) -d'|' -f8 |$(GREP) -v '^___const_' | \ 341 3905 yz155240 $(GREP) -v '\.[0-9]*$$' |$(SORT) -u \ 342 3678 yz155240 > $$MODSYMS.tmp.new; \ 343 3678 yz155240 $(DIFF) $$MODSYMS.tmp $$MODSYMS.tmp.new > $$MODSYMS.diff || \ 344 3678 yz155240 ($(ECHO) "warning: $(MODULE) symbol checking:" \ 345 3678 yz155240 "global variable(s) introduced and/or removed."; \ 346 3678 yz155240 $(CAT) $$MODSYMS.diff; exit 1) \ 347 3678 yz155240 fi 348 3678 yz155240 349 3678 yz155240 $(SISCLEAN_DEPS): 350 3678 yz155240 -TARG=`$(ECHO) $@ | $(CUT) -d'.' -f2`; \ 351 3678 yz155240 MODSYMS=$(MODULE).symbols.$$TARG; \ 352 3678 yz155240 $(RM) $$MODSYMS.tmp $$MODSYMS.tmp.new $$MODSYMS.diff Nothing_to_remove 353 0 stevel 354 0 stevel 355 0 stevel $(OBJS_DIR): 356 0 stevel -@mkdir -p $@ 2> /dev/null 357 0 stevel 358 0 stevel def.targ: $(OBJS_DIR) $(ALL_TARGET) 359 0 stevel 360 0 stevel all.targ: $(OBJS_DIR) $(ALL_TARGET) 361 0 stevel 362 0 stevel lint.targ: $(OBJS_DIR) $(LINT_TARGET) 363 0 stevel 364 0 stevel modlintlib.targ: $(OBJS_DIR) $(MOD_LINT_LIB) 365 0 stevel 366 0 stevel install.targ: $(OBJS_DIR) $(INSTALL_TARGET) 367 1167 kupfer 368 1167 kupfer # 369 1167 kupfer # Support for Install.sh. 370 1167 kupfer # 371 1167 kupfer 372 1167 kupfer modlist: $(MODLIST_DEPS) 373 1167 kupfer 374 1167 kupfer # paths relative to $(ROOT). 375 1167 kupfer RELMODULE = $(ROOTMODULE:$(ROOT)/%=%) 376 1167 kupfer RELCONF = $(ROOT_CONFFILE:$(ROOT)/%=%) 377 1167 kupfer RELLINK = $(ROOTLINK:$(ROOT)/%=%) 378 1167 kupfer RELUNIX = $(UNIX32_LINK:$(ROOT)/%=%) 379 1167 kupfer RELSOFTLINKS = $(ROOTSOFTLINKS:$(ROOT)/%=%) 380 1167 kupfer 381 1167 kupfer MODSRC:sh= pwd 382 1167 kupfer 383 1167 kupfer # 384 1167 kupfer # Changes to this target may require corresponding changes to 385 1167 kupfer # Install.sh. 386 1167 kupfer # Don't issue a MOD entry if it's not in the install list. 387 1167 kupfer # 388 1167 kupfer $(MODLIST_DEPS): FRC 389 1167 kupfer @case $@ in \ 390 1167 kupfer *32) \ 391 1167 kupfer class=32; \ 392 8348 Eric relmodule=`dirname $(RELMODULE)`;; \ 393 1167 kupfer *64) \ 394 1167 kupfer class=64; \ 395 8348 Eric relmodule=`dirname $(RELMODULE)`/$(SUBDIR64);; \ 396 1167 kupfer esac; \ 397 1167 kupfer if [ -z "$(THISIMPL)" ]; then \ 398 1167 kupfer impl=all; \ 399 1167 kupfer else \ 400 1167 kupfer impl=$(THISIMPL); \ 401 1167 kupfer fi; \ 402 1167 kupfer if [ -n "$(ROOTMODULE)" -a -n "$(INSTALL_TARGET)" ]; then \ 403 1167 kupfer if [ -z "$(MODULE)" ]; then \ 404 1167 kupfer module=`basename $(ROOTMODULE)`; \ 405 1167 kupfer else \ 406 1167 kupfer module=$(MODULE); \ 407 1167 kupfer fi; \ 408 1167 kupfer tinstall="$(INSTALL_TARGET)"; \ 409 1167 kupfer for t in $$tinstall; do \ 410 1167 kupfer if [ "$(ROOTMODULE)" = $$t ]; then \ 411 1167 kupfer echo MOD $$module $$relmodule \ 412 1167 kupfer $$class $$impl $(MODSRC); \ 413 1167 kupfer break; \ 414 1167 kupfer fi \ 415 1167 kupfer done \ 416 1167 kupfer fi; \ 417 1167 kupfer if [ -n "$(CONF_SRCDIR)" ]; then \ 418 1167 kupfer tinstall="$(INSTALL_TARGET)"; \ 419 1167 kupfer for t in $$tinstall; do \ 420 1167 kupfer if [ $(ROOT_CONFFILE) = $$t ]; then \ 421 1167 kupfer echo CONF $(RELCONF) \ 422 1167 kupfer $(MODSRC)/$(CONF_SRCDIR) $$impl $$module; \ 423 1167 kupfer break; \ 424 1167 kupfer fi \ 425 1167 kupfer done \ 426 1167 kupfer fi; \ 427 1167 kupfer if [ -n "$(ROOTLINK)" ]; then \ 428 8348 Eric rellinks="$(RELLINK)"; \ 429 8348 Eric for r in $$rellinks; do \ 430 8348 Eric if [ $$class = 32 ]; then \ 431 8348 Eric linkdir=`dirname $$r`; \ 432 8348 Eric else \ 433 8348 Eric linkdir=`dirname $$r`/$(SUBDIR64); \ 434 8348 Eric fi; \ 435 1167 kupfer echo LINK $$relmodule $$module \ 436 8348 Eric $$linkdir `basename $$r` $$impl; \ 437 8348 Eric done \ 438 1167 kupfer fi; \ 439 1167 kupfer if [ -n "$(UNIX32_LINK)" ]; then \ 440 1167 kupfer echo SYMLINK $(SUBDIR64)/$(UNIX) \ 441 1167 kupfer `dirname $(RELUNIX)` unix $$impl $$module; \ 442 1167 kupfer fi; \ 443 1167 kupfer trelsoftlinks="$(RELSOFTLINKS)"; \ 444 1167 kupfer for t in $$trelsoftlinks; do \ 445 1167 kupfer if [ $$class = 32 ]; then \ 446 1167 kupfer linkdir=`dirname $$t`; \ 447 1167 kupfer else \ 448 1167 kupfer linkdir=`dirname $$t`/$(SUBDIR64); \ 449 1167 kupfer fi; \ 450 1167 kupfer linkname=`basename $$t`; \ 451 1167 kupfer echo SYMLINK $(MODULE) $$linkdir $$linkname \ 452 1167 kupfer $$impl $$module; \ 453 1167 kupfer done 454 0 stevel 455 0 stevel # 456 0 stevel # Cleanliness is next to ... 457 0 stevel # 458 0 stevel clean.targ: 459 0 stevel -$(RM) $(CLEANFILES) Nothing_to_remove 460 0 stevel 461 0 stevel clobber.targ: 462 0 stevel -$(RM) $(CLOBBERFILES) Nothing_to_remove 463 0 stevel 464 0 stevel clean.lint.targ: 465 0 stevel -$(RM) $(CLEANLINTFILES) Nothing_to_remove 466 0 stevel 467 0 stevel # 468 0 stevel # Create fake lintlibs in the 64b dirs so 469 0 stevel # global linting works 470 0 stevel # 471 0 stevel lint64: 472 0 stevel @$(ECHO) $(MODULE) fake lints 473 0 stevel @for dir in $(LINT64_DIRS); do \ 474 0 stevel if [ ! -d $$dir ]; then mkdir $$dir; fi \ 475 0 stevel done 476 0 stevel @for file in $(LINT64_FILES); do \ 477 0 stevel if [ ! -f $$file ]; then touch $$file; fi \ 478 0 stevel done 479 0 stevel 480 0 stevel # 481 0 stevel # In some places we also need to create fake lintlibs for 32b 482 0 stevel # dirs so global linting works 483 0 stevel # 484 0 stevel lint32: 485 0 stevel @$(ECHO) $(MODULE) fake lints 486 0 stevel @for dir in $(LINT32_DIRS); do \ 487 0 stevel if [ ! -d $$dir ]; then mkdir $$dir; fi \ 488 0 stevel done 489 0 stevel @for file in $(LINT32_FILES); do \ 490 0 stevel if [ ! -f $$file ]; then touch $$file; fi \ 491 0 stevel done 492 3446 mrj 493 0 stevel FRC: 494