Makefile revision 75d01c9ab5ef6f1bbac9f9d4eb379d5c38583d82
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# CDDL HEADER START
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# The contents of this file are subject to the terms of the
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# Common Development and Distribution License, Version 1.0 only
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# (the "License"). You may not use this file except in compliance
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# with the License.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# or http://www.opensolaris.org/os/licensing.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# See the License for the specific language governing permissions
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# and limitations under the License.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# When distributing Covered Code, include this CDDL HEADER in each
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# If applicable, add the following below this CDDL HEADER, with the
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# fields enclosed by brackets "[]" replaced with your own identifying
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# information: Portions Copyright [yyyy] [name of copyright owner]
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# CDDL HEADER END
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# Use is subject to license terms.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#ident "%Z%%M% %I% %E% SMI"
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# include global definitions
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Siraineninclude ../../../Makefile.master
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# NOTE: pm.h is not shipped. It should be shipped when power management
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# is a real feature of Solaris.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenHDRS= \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenaflt.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenavintr.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenbmac.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenbootconf.h bpp_reg.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenbpp_var.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenbw2reg.h bw2var.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainencg3var.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainencg6fbc.h cg6reg.h cg6tec.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainencg6thc.h cg6var.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainencms.h cursor_impl.h dbriio.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainendkmpio.h dmaga.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Siraineneri.h eri_common.h eri_mac.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Siraineneri_msg.h eri_phy.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenfdreg.h fdvar.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenhme.h hme_mac.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenhme_phy.h i82586.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenisdnio.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenmace.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenmemfb.h memreg.h memvar.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenmmcodecreg.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenobpdefs.h pixrect.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenpr_impl_util.h pr_planegroups.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenpromif.h promimpl.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenramdac.h ser_async.h ser_zscc.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainensocalvar.h socalreg.h socalmap.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainensocalio.h socal_cq_defs.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenstp4020_reg.h stp4020_var.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenttymux.h ttymuxuser.h \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenzsdev.h
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenAUDIOHDRS= \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenaudio_4231.h \
641f0c0900ee6e7cf9667f4b40ed95cec7d0cdcaTimo Sirainenaudio1575.h
641f0c0900ee6e7cf9667f4b40ed95cec7d0cdcaTimo Sirainen
641f0c0900ee6e7cf9667f4b40ed95cec7d0cdcaTimo SirainenSCSIADHDRS= \
641f0c0900ee6e7cf9667f4b40ed95cec7d0cdcaTimo Sirainenespcmd.h espreg.h espvar.h fascmd.h fasdma.h \
641f0c0900ee6e7cf9667f4b40ed95cec7d0cdcaTimo Sirainenfasreg.h fasvar.h sfvar.h \
8fcff4c5b52f24d9c681805fdf06b486f1d0fcbeTimo Sirainenifpcmd.h ifpvar.h ifpio.h ifpmail.h ifpreg.h \
641f0c0900ee6e7cf9667f4b40ed95cec7d0cdcaTimo Sirainenispcmd.h ispmail.h ispreg.h ispvar.h
641f0c0900ee6e7cf9667f4b40ed95cec7d0cdcaTimo Sirainen
641f0c0900ee6e7cf9667f4b40ed95cec7d0cdcaTimo SirainenSCSITARGHDRS= \
641f0c0900ee6e7cf9667f4b40ed95cec7d0cdcaTimo Sirainen
641f0c0900ee6e7cf9667f4b40ed95cec7d0cdcaTimo SirainenROOTDIR= $(ROOT)/usr/include/sys
641f0c0900ee6e7cf9667f4b40ed95cec7d0cdcaTimo SirainenROOTDIRS= $(ROOTDIR) \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(ROOTDIR)/audio \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(ROOTDIR)/scsi/adapters \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(ROOTDIR)/scsi/targets
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenROOTHDRS= $(HDRS:%=$(ROOTDIR)/%)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenROOTAUDHDRS= $(AUDIOHDRS:%=$(ROOTDIR)/audio/%)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenROOTFCHDRS= $(FCHDRS:%=$(ROOTDIR)/fc4/%)
8fcff4c5b52f24d9c681805fdf06b486f1d0fcbeTimo SirainenROOTSCSIADHDRS= $(SCSIADHDRS:%=$(ROOTDIR)/scsi/adapters/%)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenROOTSCSITARGHDRS= $(SCSITARGHDRS:%=$(ROOTDIR)/scsi/targets/%)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# install rules
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen$(ROOTDIR)/%: %
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(INS.file)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen$(ROOTDIR)/audio/%: audio/%
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(INS.file)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen$(ROOTDIR)/scsi/adapters/%: scsi/adapters/%
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(INS.file)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen$(ROOTDIR)/scsi/targets/%: scsi/targets/%
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(INS.file)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# check files really don't exist
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenaudio/%.check: audio/%.h
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(DOT_H_CHECK)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenscsi/adapters/%.check: scsi/adapters/%.h
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(DOT_H_CHECK)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenscsi/targets/%.check: scsi/targets/%.h
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(DOT_H_CHECK)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenCHECKHDRS= \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(HDRS:%.h=%.check) \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(AUDIOHDRS:%.h=audio/%.check) \
641f0c0900ee6e7cf9667f4b40ed95cec7d0cdcaTimo Sirainen $(FCHDRS:%.h=fc4/%.check) \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(SCSIADHDRS:%.h=scsi/adapters/%.check) \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(SCSITARGHDRS:%.h=scsi/targets/%.check)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# headers which won't quite meet the standards...
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# devops.h has a macro where the formal parameters to the macro are greater
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# than 80 characters. cpp (or the equivalent built into acomp) does not allow
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# continuation line breaks in the formal parameter list. This could be fixed
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# by giving shorter names to the formal parameters, but the right fix is to
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# fix cpp. (Also, /* CSTYLED */ doesn't seem to fix this.
641f0c0900ee6e7cf9667f4b40ed95cec7d0cdcaTimo Sirainen#
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainendevops.check := CSTYLE_TAIL = | grep -v "line > 80 characters" | true
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen.KEEP_STATE:
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen.PARALLEL: $(CHECKHDRS) $(ROOTHDRS) $(ROOTAUDHDRS) $(ROOTAUDIMPLHDRS) \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(ROOTSCSIADHDRS) $(ROOTSCSITARGHDRS) $(ROOTXHDRS) \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(ROOTFCHDRS)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Siraineninstall_h: $(ROOTDIRS) .WAIT $(ROOTHDRS) \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(ROOTAUDHDRS) $(ROOTAUDIMPLHDRS) \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(ROOTSCSIADHDRS) $(ROOTSCSITARGHDRS) $(ROOTFCHDRS)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen$(ROOTDIRS):
f5672f838a62a3ae6cdf41641abecdddf1340f83Timo Sirainen $(INS.dir)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainencheck: $(CHECKHDRS)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen