10Sstevel@tonic-gate# 20Sstevel@tonic-gate# CDDL HEADER START 30Sstevel@tonic-gate# 40Sstevel@tonic-gate# The contents of this file are subject to the terms of the 51106Smrj# Common Development and Distribution License (the "License"). 61106Smrj# You may not use this file except in compliance with the License. 70Sstevel@tonic-gate# 80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate# See the License for the specific language governing permissions 110Sstevel@tonic-gate# and limitations under the License. 120Sstevel@tonic-gate# 130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate# 190Sstevel@tonic-gate# CDDL HEADER END 200Sstevel@tonic-gate# 211106Smrj 220Sstevel@tonic-gate# 2311519SGarrett.Damore@Sun.COM# Copyright 2010 Sun Microsystems, Inc. All rights reserved. 240Sstevel@tonic-gate# Use is subject to license terms. 250Sstevel@tonic-gate# 260Sstevel@tonic-gate# include global definitions 270Sstevel@tonic-gateinclude ../../../Makefile.master 280Sstevel@tonic-gate 290Sstevel@tonic-gateHDRS= \ 300Sstevel@tonic-gateavintr.h \ 3111760SGarrett.Damore@Sun.COMbootconf.h \ 32*11841SGarrett.Damore@Sun.COMdkmpio.h \ 330Sstevel@tonic-gatefdreg.h fdvar.h \ 3410892SGarrett.Damore@Sun.COMobpdefs.h \ 350Sstevel@tonic-gatepromif.h promimpl.h \ 3610892SGarrett.Damore@Sun.COMser_async.h ser_zscc.h \ 371167Skupfersocalio.h socalreg.h \ 382305Sstevelsocal_cq_defs.h socalmap.h socalvar.h \ 390Sstevel@tonic-gatettymux.h ttymuxuser.h \ 400Sstevel@tonic-gatezsdev.h 410Sstevel@tonic-gate 420Sstevel@tonic-gateSCSIADHDRS= \ 43*11841SGarrett.Damore@Sun.COMfascmd.h fasdma.h \ 442373Sstevelfasreg.h fasvar.h ifpio.h sfvar.h 451167Skupfer 461167SkupferCLOSED_SCSIAD = $(CLOSED)/uts/sun/sys/scsi/adapters 471167Skupfer 481167SkupferCLOSED_SCSIADHDRS= \ 491167Skupferifpcmd.h ifpmail.h ifpreg.h ifpvar.h \ 502373Sstevelispcmd.h ispmail.h ispreg.h ispvar.h 510Sstevel@tonic-gate 520Sstevel@tonic-gateSCSITARGHDRS= \ 530Sstevel@tonic-gate 540Sstevel@tonic-gateROOTDIR= $(ROOT)/usr/include/sys 550Sstevel@tonic-gateROOTDIRS= $(ROOTDIR) \ 560Sstevel@tonic-gate $(ROOTDIR)/audio \ 570Sstevel@tonic-gate $(ROOTDIR)/scsi/adapters \ 580Sstevel@tonic-gate $(ROOTDIR)/scsi/targets 590Sstevel@tonic-gate 600Sstevel@tonic-gateROOTHDRS= $(HDRS:%=$(ROOTDIR)/%) 611167Skupfer$(CLOSED_BUILD)ROOTHDRS += $(CLOSED_HDRS:%=$(ROOTDIR)/%) 620Sstevel@tonic-gateROOTFCHDRS= $(FCHDRS:%=$(ROOTDIR)/fc4/%) 630Sstevel@tonic-gateROOTSCSIADHDRS= $(SCSIADHDRS:%=$(ROOTDIR)/scsi/adapters/%) 641167Skupfer$(CLOSED_BUILD)ROOTSCSIADHDRS += \ 651167Skupfer $(CLOSED_SCSIADHDRS:%=$(ROOTDIR)/scsi/adapters/%) 660Sstevel@tonic-gateROOTSCSITARGHDRS= $(SCSITARGHDRS:%=$(ROOTDIR)/scsi/targets/%) 670Sstevel@tonic-gate 680Sstevel@tonic-gate 690Sstevel@tonic-gate# install rules 700Sstevel@tonic-gate$(ROOTDIR)/%: % 710Sstevel@tonic-gate $(INS.file) 720Sstevel@tonic-gate 731167Skupfer$(ROOTDIR)/%: $(CLOSED)/uts/sun/sys/% 741167Skupfer $(INS.file) 751167Skupfer 760Sstevel@tonic-gate$(ROOTDIR)/audio/%: audio/% 770Sstevel@tonic-gate $(INS.file) 780Sstevel@tonic-gate 790Sstevel@tonic-gate$(ROOTDIR)/scsi/adapters/%: scsi/adapters/% 800Sstevel@tonic-gate $(INS.file) 810Sstevel@tonic-gate 821167Skupfer$(ROOTDIR)/scsi/adapters/%: $(CLOSED_SCSIAD)/% 831167Skupfer $(INS.file) 841167Skupfer 850Sstevel@tonic-gate$(ROOTDIR)/scsi/targets/%: scsi/targets/% 860Sstevel@tonic-gate $(INS.file) 870Sstevel@tonic-gate 880Sstevel@tonic-gate# check files really don't exist 890Sstevel@tonic-gate 900Sstevel@tonic-gateaudio/%.check: audio/%.h 910Sstevel@tonic-gate $(DOT_H_CHECK) 920Sstevel@tonic-gate 930Sstevel@tonic-gatescsi/adapters/%.check: scsi/adapters/%.h 940Sstevel@tonic-gate $(DOT_H_CHECK) 950Sstevel@tonic-gate 960Sstevel@tonic-gatescsi/targets/%.check: scsi/targets/%.h 970Sstevel@tonic-gate $(DOT_H_CHECK) 980Sstevel@tonic-gate 990Sstevel@tonic-gateCHECKHDRS= \ 1000Sstevel@tonic-gate $(HDRS:%.h=%.check) \ 1010Sstevel@tonic-gate $(FCHDRS:%.h=fc4/%.check) \ 1020Sstevel@tonic-gate $(SCSIADHDRS:%.h=scsi/adapters/%.check) \ 1030Sstevel@tonic-gate $(SCSITARGHDRS:%.h=scsi/targets/%.check) 1040Sstevel@tonic-gate 1051167Skupfer$(CLOSED_BUILD)CHECKHDRS += \ 1061167Skupfer $(CLOSED_HDRS:%.h=$(CLOSED)/uts/sun/sys/%.check) \ 1071167Skupfer $(CLOSED_SCSIADHDRS:%.h=$(CLOSED_SCSIAD)/%.check) 1080Sstevel@tonic-gate 1090Sstevel@tonic-gate# headers which won't quite meet the standards... 1100Sstevel@tonic-gate# 1110Sstevel@tonic-gate# devops.h has a macro where the formal parameters to the macro are greater 1120Sstevel@tonic-gate# than 80 characters. cpp (or the equivalent built into acomp) does not allow 1130Sstevel@tonic-gate# continuation line breaks in the formal parameter list. This could be fixed 1140Sstevel@tonic-gate# by giving shorter names to the formal parameters, but the right fix is to 1150Sstevel@tonic-gate# fix cpp. (Also, /* CSTYLED */ doesn't seem to fix this. 1160Sstevel@tonic-gate# 1170Sstevel@tonic-gatedevops.check := CSTYLE_TAIL = | grep -v "line > 80 characters" | true 1180Sstevel@tonic-gate 1190Sstevel@tonic-gate.KEEP_STATE: 1200Sstevel@tonic-gate 1210Sstevel@tonic-gate.PARALLEL: $(CHECKHDRS) $(ROOTHDRS) $(ROOTAUDHDRS) $(ROOTAUDIMPLHDRS) \ 1220Sstevel@tonic-gate $(ROOTSCSIADHDRS) $(ROOTSCSITARGHDRS) $(ROOTXHDRS) \ 1230Sstevel@tonic-gate $(ROOTFCHDRS) 1240Sstevel@tonic-gate 1250Sstevel@tonic-gateinstall_h: $(ROOTDIRS) .WAIT $(ROOTHDRS) \ 1260Sstevel@tonic-gate $(ROOTAUDHDRS) $(ROOTAUDIMPLHDRS) \ 1270Sstevel@tonic-gate $(ROOTSCSIADHDRS) $(ROOTSCSITARGHDRS) $(ROOTFCHDRS) 1280Sstevel@tonic-gate 1290Sstevel@tonic-gate$(ROOTDIRS): 1300Sstevel@tonic-gate $(INS.dir) 1310Sstevel@tonic-gate 1320Sstevel@tonic-gatecheck: $(CHECKHDRS) 133