1# 2# CDDL HEADER START 3# 4# The contents of this file are subject to the terms of the 5# Common Development and Distribution License, Version 1.0 only 6# (the "License"). You may not use this file except in compliance 7# with the License. 8# 9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10# or http://www.opensolaris.org/os/licensing. 11# See the License for the specific language governing permissions 12# and limitations under the License. 13# 14# When distributing Covered Code, include this CDDL HEADER in each 15# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16# If applicable, add the following below this CDDL HEADER, with the 17# fields enclosed by brackets "[]" replaced with your own identifying 18# information: Portions Copyright [yyyy] [name of copyright owner] 19# 20# CDDL HEADER END 21# 22# 23# Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24# Use is subject to license terms. 25# 26# ident "%Z%%M% %I% %E% SMI" 27# 28# This makefile drives the production of all implementation architecture 29# dependent modules for the i86pc architecture. 30# 31 32UTSBASE = .. 33 34include Makefile.i86pc 35 36# 37# The following are x86 specific (rather than i86pc) specific modules 38# which are required for the i86pc kernel to completely lint. They are 39# not involved in the build in any other way. In order to minimize 40# build time, it is assumed that they are up to date. 41# 42INTEL_LIB_DIR = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR) 43 44INTEL_LINTS = genunix 45 46LINT_LIBS = $(LINT_LIB) \ 47 $(KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \ 48 $(INTEL_LINTS:%=$(INTEL_LIB_DIR)/llib-l%.ln) 49 50# 51# 52# 53def := TARGET= def 54all := TARGET= all 55install := TARGET= install 56clean := TARGET= clean 57clobber := TARGET= clobber 58lint := TARGET= lint 59lintlib := TARGET= lintlib 60machmodlintlib := TARGET= modlintlib 61clean.lint := TARGET= clean.lint 62check := TARGET= check 63 64.KEEP_STATE: 65 66.PARALLEL: $(KMODS) $(XMODS) 67 68def all clean clobber clean.lint: genassym unix .WAIT $(KMODS) $(XMODS) 69 70install: install_platforms genassym unix .WAIT $(KMODS) $(XMODS) 71 72lintlib: unix 73 74modlintlib: $(KMODS) 75 76genassym unix $(KMODS): FRC 77 @cd $@; pwd; $(MAKE) $(TARGET) 78 79$(XMODS): FRC 80 @if [ -f $@/Makefile ]; then \ 81 cd $@; pwd; $(MAKE) $(TARGET); \ 82 else \ 83 true; \ 84 fi 85 86install_h check: FRC 87 @cd sys; pwd; $(MAKE) $(TARGET) 88 89# 90# For some x86 OEMs that deliver their own platform kernel modules but 91# will not deliver anything in usr/platform, they should add their platforms 92# here so a symlink will be created to the standard usr/platform/i86pc. 93# 94OEM_LINKS = ncri86pc 95 96OEM_USR_PLAT_LINKS = $(OEM_LINKS:%=$(USR_PLAT_DIR)/%) 97 98$(OEM_USR_PLAT_LINKS): 99 $(INS.slink1) 100 101# 102# Definitions for the /platform directory aliases. 103# Currently none for i86pc. 104# 105PLAT_LINKS = 106 107# 108# Make the /platform directories. This is hardwired here because 109# the first stage of the project (KBI) only implements the userland 110# changes, but the only reasonable place to record the aliases is 111# here in kernel land. 112# 113install_platforms: $(ROOT_PSM_DIR) $(USR_PSM_DIR) \ 114 $(ROOT_PLAT_LINKS) $(USR_PLAT_LINKS) \ 115 $(OEM_USR_PLAT_LINKS) 116 117# 118# Work-around to disable acpica global crosscheck lint warnings 119# 120LGREP.i86pc = grep -v 'i86pc/io/acpica' 121 122# 123# Full kernel lint target. 124# 125LINT_TARGET = globallint 126 127# workaround for multiply defined errors 128globallint := LINTFLAGS += -erroff=E_NAME_MULTIPLY_DEF2 129 130globallint: 131 @-$(ECHO) "\nFULL KERNEL: global crosschecks:" 132 @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2) | $(LGREP.i86pc) 133 134lint: lintlib .WAIT modlintlib .WAIT $(INTEL_LINTS) $(LINT_DEPS) 135 136$(INTEL_LINTS): FRC 137 @cd $(UTSBASE)/intel/$@; pwd; $(MAKE) modlintlib 138 139FRC: 140 141include ../Makefile.targ 142 143# 144# Cross-reference customization: build a cross-reference over all of the 145# i86pc-related directories. 146# 147XRDIRS = ../i86pc ../intel ../common 148XRPRUNE = sun4u sun4 149 150cscope.out tags: FRC 151 $(XREF) -x $@ 152