17c478bd9Sstevel@tonic-gate# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 54ab75253Smrj# Common Development and Distribution License (the "License"). 64ab75253Smrj# You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate# and limitations under the License. 127c478bd9Sstevel@tonic-gate# 137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate# 197c478bd9Sstevel@tonic-gate# CDDL HEADER END 207c478bd9Sstevel@tonic-gate# 214ab75253Smrj 227c478bd9Sstevel@tonic-gate# 2388447a05SGarrett D'Amore# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate# Use is subject to license terms. 257c478bd9Sstevel@tonic-gate# 267c478bd9Sstevel@tonic-gate# include global definitions 277c478bd9Sstevel@tonic-gateinclude ../../../Makefile.master 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gateHDRS= \ 307c478bd9Sstevel@tonic-gateavintr.h \ 317c478bd9Sstevel@tonic-gatebootconf.h bpp_reg.h \ 327c478bd9Sstevel@tonic-gatebpp_var.h \ 337c478bd9Sstevel@tonic-gatedkmpio.h dmaga.h \ 347c478bd9Sstevel@tonic-gatefdreg.h fdvar.h \ 35*b51e13bfSGarrett D'Amoreobpdefs.h \ 367c478bd9Sstevel@tonic-gatepromif.h promimpl.h \ 37*b51e13bfSGarrett D'Amoreser_async.h ser_zscc.h \ 38fb9f9b97Skupfersocalio.h socalreg.h \ 393db86aabSstevelsocal_cq_defs.h socalmap.h socalvar.h \ 407c478bd9Sstevel@tonic-gatestp4020_reg.h stp4020_var.h \ 417c478bd9Sstevel@tonic-gatettymux.h ttymuxuser.h \ 427c478bd9Sstevel@tonic-gatezsdev.h 437c478bd9Sstevel@tonic-gate 447c478bd9Sstevel@tonic-gateSCSIADHDRS= \ 457c478bd9Sstevel@tonic-gateespcmd.h espreg.h espvar.h fascmd.h fasdma.h \ 463d19cdaeSstevelfasreg.h fasvar.h ifpio.h sfvar.h 47fb9f9b97Skupfer 48fb9f9b97SkupferCLOSED_SCSIAD = $(CLOSED)/uts/sun/sys/scsi/adapters 49fb9f9b97Skupfer 50fb9f9b97SkupferCLOSED_SCSIADHDRS= \ 51fb9f9b97Skupferifpcmd.h ifpmail.h ifpreg.h ifpvar.h \ 523d19cdaeSstevelispcmd.h ispmail.h ispreg.h ispvar.h 537c478bd9Sstevel@tonic-gate 547c478bd9Sstevel@tonic-gateSCSITARGHDRS= \ 557c478bd9Sstevel@tonic-gate 567c478bd9Sstevel@tonic-gateROOTDIR= $(ROOT)/usr/include/sys 577c478bd9Sstevel@tonic-gateROOTDIRS= $(ROOTDIR) \ 587c478bd9Sstevel@tonic-gate $(ROOTDIR)/audio \ 597c478bd9Sstevel@tonic-gate $(ROOTDIR)/scsi/adapters \ 607c478bd9Sstevel@tonic-gate $(ROOTDIR)/scsi/targets 617c478bd9Sstevel@tonic-gate 627c478bd9Sstevel@tonic-gateROOTHDRS= $(HDRS:%=$(ROOTDIR)/%) 63fb9f9b97Skupfer$(CLOSED_BUILD)ROOTHDRS += $(CLOSED_HDRS:%=$(ROOTDIR)/%) 647c478bd9Sstevel@tonic-gateROOTFCHDRS= $(FCHDRS:%=$(ROOTDIR)/fc4/%) 657c478bd9Sstevel@tonic-gateROOTSCSIADHDRS= $(SCSIADHDRS:%=$(ROOTDIR)/scsi/adapters/%) 66fb9f9b97Skupfer$(CLOSED_BUILD)ROOTSCSIADHDRS += \ 67fb9f9b97Skupfer $(CLOSED_SCSIADHDRS:%=$(ROOTDIR)/scsi/adapters/%) 687c478bd9Sstevel@tonic-gateROOTSCSITARGHDRS= $(SCSITARGHDRS:%=$(ROOTDIR)/scsi/targets/%) 697c478bd9Sstevel@tonic-gate 707c478bd9Sstevel@tonic-gate 717c478bd9Sstevel@tonic-gate# install rules 727c478bd9Sstevel@tonic-gate$(ROOTDIR)/%: % 737c478bd9Sstevel@tonic-gate $(INS.file) 747c478bd9Sstevel@tonic-gate 75fb9f9b97Skupfer$(ROOTDIR)/%: $(CLOSED)/uts/sun/sys/% 76fb9f9b97Skupfer $(INS.file) 77fb9f9b97Skupfer 787c478bd9Sstevel@tonic-gate$(ROOTDIR)/audio/%: audio/% 797c478bd9Sstevel@tonic-gate $(INS.file) 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gate$(ROOTDIR)/scsi/adapters/%: scsi/adapters/% 827c478bd9Sstevel@tonic-gate $(INS.file) 837c478bd9Sstevel@tonic-gate 84fb9f9b97Skupfer$(ROOTDIR)/scsi/adapters/%: $(CLOSED_SCSIAD)/% 85fb9f9b97Skupfer $(INS.file) 86fb9f9b97Skupfer 877c478bd9Sstevel@tonic-gate$(ROOTDIR)/scsi/targets/%: scsi/targets/% 887c478bd9Sstevel@tonic-gate $(INS.file) 897c478bd9Sstevel@tonic-gate 907c478bd9Sstevel@tonic-gate# check files really don't exist 917c478bd9Sstevel@tonic-gate 927c478bd9Sstevel@tonic-gateaudio/%.check: audio/%.h 937c478bd9Sstevel@tonic-gate $(DOT_H_CHECK) 947c478bd9Sstevel@tonic-gate 957c478bd9Sstevel@tonic-gatescsi/adapters/%.check: scsi/adapters/%.h 967c478bd9Sstevel@tonic-gate $(DOT_H_CHECK) 977c478bd9Sstevel@tonic-gate 987c478bd9Sstevel@tonic-gatescsi/targets/%.check: scsi/targets/%.h 997c478bd9Sstevel@tonic-gate $(DOT_H_CHECK) 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gateCHECKHDRS= \ 1027c478bd9Sstevel@tonic-gate $(HDRS:%.h=%.check) \ 1037c478bd9Sstevel@tonic-gate $(FCHDRS:%.h=fc4/%.check) \ 1047c478bd9Sstevel@tonic-gate $(SCSIADHDRS:%.h=scsi/adapters/%.check) \ 1057c478bd9Sstevel@tonic-gate $(SCSITARGHDRS:%.h=scsi/targets/%.check) 1067c478bd9Sstevel@tonic-gate 107fb9f9b97Skupfer$(CLOSED_BUILD)CHECKHDRS += \ 108fb9f9b97Skupfer $(CLOSED_HDRS:%.h=$(CLOSED)/uts/sun/sys/%.check) \ 109fb9f9b97Skupfer $(CLOSED_SCSIADHDRS:%.h=$(CLOSED_SCSIAD)/%.check) 1107c478bd9Sstevel@tonic-gate 1117c478bd9Sstevel@tonic-gate# headers which won't quite meet the standards... 1127c478bd9Sstevel@tonic-gate# 1137c478bd9Sstevel@tonic-gate# devops.h has a macro where the formal parameters to the macro are greater 1147c478bd9Sstevel@tonic-gate# than 80 characters. cpp (or the equivalent built into acomp) does not allow 1157c478bd9Sstevel@tonic-gate# continuation line breaks in the formal parameter list. This could be fixed 1167c478bd9Sstevel@tonic-gate# by giving shorter names to the formal parameters, but the right fix is to 1177c478bd9Sstevel@tonic-gate# fix cpp. (Also, /* CSTYLED */ doesn't seem to fix this. 1187c478bd9Sstevel@tonic-gate# 1197c478bd9Sstevel@tonic-gatedevops.check := CSTYLE_TAIL = | grep -v "line > 80 characters" | true 1207c478bd9Sstevel@tonic-gate 1217c478bd9Sstevel@tonic-gate.KEEP_STATE: 1227c478bd9Sstevel@tonic-gate 1237c478bd9Sstevel@tonic-gate.PARALLEL: $(CHECKHDRS) $(ROOTHDRS) $(ROOTAUDHDRS) $(ROOTAUDIMPLHDRS) \ 1247c478bd9Sstevel@tonic-gate $(ROOTSCSIADHDRS) $(ROOTSCSITARGHDRS) $(ROOTXHDRS) \ 1257c478bd9Sstevel@tonic-gate $(ROOTFCHDRS) 1267c478bd9Sstevel@tonic-gate 1277c478bd9Sstevel@tonic-gateinstall_h: $(ROOTDIRS) .WAIT $(ROOTHDRS) \ 1287c478bd9Sstevel@tonic-gate $(ROOTAUDHDRS) $(ROOTAUDIMPLHDRS) \ 1297c478bd9Sstevel@tonic-gate $(ROOTSCSIADHDRS) $(ROOTSCSITARGHDRS) $(ROOTFCHDRS) 1307c478bd9Sstevel@tonic-gate 1317c478bd9Sstevel@tonic-gate$(ROOTDIRS): 1327c478bd9Sstevel@tonic-gate $(INS.dir) 1337c478bd9Sstevel@tonic-gate 1347c478bd9Sstevel@tonic-gatecheck: $(CHECKHDRS) 135