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 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  22 # Use is subject to license terms.
  23 # Copyright 2019 Peter Tribble.
  24 #
  25 # uts/sun4u/sys/Makefile
  26 #
  27 UTSBASE = ../..
  28 
  29 #
  30 # include global definitions
  31 #
  32 include ../Makefile.sun4u
  33 
  34 #
  35 # Override defaults.
  36 #
  37 FILEMODE         = 644
  38 
  39 SUN4_HDRS=                      \
  40         async.h                 \
  41         clock.h                 \
  42         cmp.h                   \
  43         cpc_ultra.h             \
  44         cpu_sgnblk_defs.h       \
  45         ddi_subrdefs.h          \
  46         dvma.h                  \
  47         eeprom.h                \
  48         errclassify.h           \
  49         fcode.h                 \
  50         fc_plat.h               \
  51         idprom.h                \
  52         intr.h                  \
  53         intreg.h                \
  54         ivintr.h                \
  55         memlist_plat.h          \
  56         memnode.h               \
  57         nexusdebug.h            \
  58         prom_debug.h            \
  59         scb.h                   \
  60         sun4asi.h               \
  61         tod.h                   \
  62         trapstat.h              \
  63         vis.h                   \
  64         vm_machparam.h          \
  65         x_call.h                \
  66         xc_impl.h               \
  67         zsmach.h
  68 
  69 HDRS=   \
  70         cheetahregs.h           \
  71         cpr_impl.h              \
  72         cpu_impl.h              \
  73         ecc_kstat.h             \
  74         envctrl.h               \
  75         envctrl_gen.h           \
  76         envctrl_ue250.h         \
  77         envctrl_ue450.h         \
  78         gpio_87317.h            \
  79         iocache.h               \
  80         iommu.h                 \
  81         machasi.h               \
  82         machclock.h             \
  83         machcpuvar.h            \
  84         machparam.h             \
  85         machsystm.h             \
  86         machthread.h            \
  87         mem_cache.h             \
  88         mmu.h                   \
  89         opl_module.h            \
  90         prom_plat.h             \
  91         pte.h                   \
  92         sbd_ioctl.h             \
  93         spitregs.h              \
  94         sysioerr.h              \
  95         sysiosbus.h             \
  96         todmostek.h             \
  97         traptrace.h
  98 
  99 I2CHDRS =       clients/max1617.h misc/i2c_svc.h clients/i2c_client.h   \
 100                 clients/hpc3130.h clients/lm75.h        \
 101                 clients/pcf8591.h clients/ssc050.h
 102 
 103 I2C_DIRS=       clients misc
 104 USR_PSM_ISYS_I2C_ROOT=  $(USR_PSM_ISYS_DIR)/i2c
 105 USR_PSM_ISYS_I2C_DIRS=  $(USR_PSM_ISYS_I2C_ROOT) \
 106                         $(I2C_DIRS:%=$(USR_PSM_ISYS_I2C_ROOT)/%)
 107 
 108 ROOTI2CHDRS=            $(I2CHDRS:%=$(USR_PSM_ISYS_I2C_ROOT)/%)
 109 
 110 MONHDRS=
 111 #MONHDRS=       eeprom.h    idprom.h    keyboard.h  password.h
 112 
 113 USR_PSM_MON_DIR=        $(USR_PSM_ISYS_DIR)/mon
 114 
 115 ROOTHDRS=               $(HDRS:%=$(USR_PSM_ISYS_DIR)/%)
 116 
 117 SUN4_ROOTHDRS=          $(SUN4_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
 118 
 119 ROOTMONHDRS=            $(MONHDRS:%=$(USR_PSM_MON_DIR)/%)
 120 
 121 ROOTDIR=                $(ROOT)/usr/share/src
 122 ROOTDIRS=               $(ROOTDIR)/uts $(ROOTDIR)/uts/$(PLATFORM)
 123 
 124 ROOTLINK=               $(ROOTDIR)/uts/$(PLATFORM)/sys
 125 LINKDEST=               ../../../../platform/$(PLATFORM)/include/sys
 126 
 127 CHECKHDRS=              $(HDRS:%.h=%.check) \
 128                         $(MONHDRS:%.h=mon/%.check) \
 129                         $(SUN4_HDRS:%.h=%.cmncheck)
 130 
 131 .KEEP_STATE:
 132 
 133 .PARALLEL: $(CHECKHDRS) $(ROOTHDRS) $(ROOTMONHDRS) $(SUN4_ROOTHDRS)
 134 
 135 install_h: $(ROOTDIRS) $(USR_PSM_ISYS_I2C_DIRS) .WAIT \
 136                 $(ROOTHDRS) $(ROOTI2CHDRS) \
 137                 $(ROOTMONHDRS) \
 138                 $(SUN4_ROOTHDRS) $(ROOTLINK)
 139 
 140 check:  $(CHECKHDRS)
 141 
 142 #
 143 # install rules
 144 #
 145 $(USR_PSM_MON_DIR):     $(USR_PSM_ISYS_DIR)
 146         $(INS.dir)
 147 
 148 $(USR_PSM_ISYS_I2C_DIRS):
 149         $(INS.dir)
 150 
 151 $(USR_PSM_ISYS_DIR)/%:  ../../sfmmu/sys/% $(USR_PSM_ISYS_DIR)
 152         $(INS.file)
 153 
 154 $(USR_PSM_ISYS_DIR)/%:  ../../sun4/sys/% $(USR_PSM_ISYS_DIR)
 155         $(INS.file)
 156 
 157 $(USR_PSM_MON_DIR)/%:   mon/% $(USR_PSM_MON_DIR)
 158         $(INS.file)
 159 
 160 $(ROOTDIRS):
 161         $(INS.dir)
 162 
 163 # -r because this used to be a directory and is now a link.
 164 $(ROOTLINK):    $(ROOTDIRS)
 165         -$(RM) -r $@; $(SYMLINK) $(LINKDEST) $@
 166 
 167 mon/%.check:    mon/%.h
 168         $(DOT_H_CHECK)
 169 
 170 %.check:        ../../sfmmu/sys/%.h
 171         $(DOT_H_CHECK)
 172 %.cmncheck:     ../../sun4/sys/%.h
 173         $(DOT_H_CHECK)
 174 
 175 FRC:
 176 
 177 include ../../Makefile.targ