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 (the "License"). 6 # You may not use this file except in compliance with the License. 7 # 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 # or http://www.opensolaris.org/os/licensing. 10 # See the License for the specific language governing permissions 11 # and limitations under the License. 12 # 13 # When distributing Covered Code, include this CDDL HEADER in each 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 # If applicable, add the following below this CDDL HEADER, with the 16 # fields enclosed by brackets "[]" replaced with your own identifying 17 # information: Portions Copyright [yyyy] [name of copyright owner] 18 # 19 # CDDL HEADER END 20 # 21 22 # 23 # Copyright 2010 Sun Microsystems, Inc. All rights reserved. 24 # Use is subject to license terms. 25 # 26 # include global definitions 27 include ../../../Makefile.master 28 29 HDRS= \ 30 avintr.h \ 31 bootconf.h \ 32 dkmpio.h \ 33 fdreg.h fdvar.h \ 34 obpdefs.h \ 35 promif.h promimpl.h \ 36 ser_async.h ser_zscc.h \ 37 socalio.h socalreg.h \ 38 socal_cq_defs.h socalmap.h socalvar.h \ 39 ttymux.h ttymuxuser.h \ 40 zsdev.h 41 42 SCSIADHDRS= \ 43 fascmd.h fasdma.h \ 44 fasreg.h fasvar.h ifpio.h sfvar.h 45 46 CLOSED_SCSIAD = $(CLOSED)/uts/sun/sys/scsi/adapters 47 48 CLOSED_SCSIADHDRS= \ 49 ifpcmd.h ifpmail.h ifpreg.h ifpvar.h \ 50 ispcmd.h ispmail.h ispreg.h ispvar.h 51 52 SCSITARGHDRS= \ 53 54 ROOTDIR= $(ROOT)/usr/include/sys 55 ROOTDIRS= $(ROOTDIR) \ 56 $(ROOTDIR)/audio \ 57 $(ROOTDIR)/scsi/adapters \ 58 $(ROOTDIR)/scsi/targets 59 60 ROOTHDRS= $(HDRS:%=$(ROOTDIR)/%) 61 $(CLOSED_BUILD)ROOTHDRS += $(CLOSED_HDRS:%=$(ROOTDIR)/%) 62 ROOTFCHDRS= $(FCHDRS:%=$(ROOTDIR)/fc4/%) 63 ROOTSCSIADHDRS= $(SCSIADHDRS:%=$(ROOTDIR)/scsi/adapters/%) 64 $(CLOSED_BUILD)ROOTSCSIADHDRS += \ 65 $(CLOSED_SCSIADHDRS:%=$(ROOTDIR)/scsi/adapters/%) 66 ROOTSCSITARGHDRS= $(SCSITARGHDRS:%=$(ROOTDIR)/scsi/targets/%) 67 68 69 # install rules 70 $(ROOTDIR)/%: % 71 $(INS.file) 72 73 $(ROOTDIR)/%: $(CLOSED)/uts/sun/sys/% 74 $(INS.file) 75 76 $(ROOTDIR)/audio/%: audio/% 77 $(INS.file) 78 79 $(ROOTDIR)/scsi/adapters/%: scsi/adapters/% 80 $(INS.file) 81 82 $(ROOTDIR)/scsi/adapters/%: $(CLOSED_SCSIAD)/% 83 $(INS.file) 84 85 $(ROOTDIR)/scsi/targets/%: scsi/targets/% 86 $(INS.file) 87 88 # check files really don't exist 89 90 audio/%.check: audio/%.h 91 $(DOT_H_CHECK) 92 93 scsi/adapters/%.check: scsi/adapters/%.h 94 $(DOT_H_CHECK) 95 96 scsi/targets/%.check: scsi/targets/%.h 97 $(DOT_H_CHECK) 98 99 CHECKHDRS= \ 100 $(HDRS:%.h=%.check) \ 101 $(FCHDRS:%.h=fc4/%.check) \ 102 $(SCSIADHDRS:%.h=scsi/adapters/%.check) \ 103 $(SCSITARGHDRS:%.h=scsi/targets/%.check) 104 105 $(CLOSED_BUILD)CHECKHDRS += \ 106 $(CLOSED_HDRS:%.h=$(CLOSED)/uts/sun/sys/%.check) \ 107 $(CLOSED_SCSIADHDRS:%.h=$(CLOSED_SCSIAD)/%.check) 108 109 # headers which won't quite meet the standards... 110 # 111 # devops.h has a macro where the formal parameters to the macro are greater 112 # than 80 characters. cpp (or the equivalent built into acomp) does not allow 113 # continuation line breaks in the formal parameter list. This could be fixed 114 # by giving shorter names to the formal parameters, but the right fix is to 115 # fix cpp. (Also, /* CSTYLED */ doesn't seem to fix this. 116 # 117 devops.check := CSTYLE_TAIL = | grep -v "line > 80 characters" | true 118 119 .KEEP_STATE: 120 121 .PARALLEL: $(CHECKHDRS) $(ROOTHDRS) $(ROOTAUDHDRS) $(ROOTAUDIMPLHDRS) \ 122 $(ROOTSCSIADHDRS) $(ROOTSCSITARGHDRS) $(ROOTXHDRS) \ 123 $(ROOTFCHDRS) 124 125 install_h: $(ROOTDIRS) .WAIT $(ROOTHDRS) \ 126 $(ROOTAUDHDRS) $(ROOTAUDIMPLHDRS) \ 127 $(ROOTSCSIADHDRS) $(ROOTSCSITARGHDRS) $(ROOTFCHDRS) 128 129 $(ROOTDIRS): 130 $(INS.dir) 131 132 check: $(CHECKHDRS)