xref: /illumos-gate/usr/src/uts/sun4u/sys/Makefile (revision 38a8ff6c)
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
529949e86Sstevel# Common Development and Distribution License (the "License").
629949e86Sstevel# 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#
2124fe0b3bSjmcp# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
227c478bd9Sstevel@tonic-gate# Use is subject to license terms.
232a1fd0ffSPeter Tribble# Copyright 2019 Peter Tribble.
247c478bd9Sstevel@tonic-gate#
25455e370cSJohn Levon# Copyright 2018 Joyent, Inc.
267c478bd9Sstevel@tonic-gate#
277c478bd9Sstevel@tonic-gateUTSBASE	= ../..
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gate#
307c478bd9Sstevel@tonic-gate# include global definitions
317c478bd9Sstevel@tonic-gate#
327c478bd9Sstevel@tonic-gateinclude ../Makefile.sun4u
337c478bd9Sstevel@tonic-gate
347c478bd9Sstevel@tonic-gate#
357c478bd9Sstevel@tonic-gate# Override defaults.
367c478bd9Sstevel@tonic-gate#
377c478bd9Sstevel@tonic-gateFILEMODE	 = 644
387c478bd9Sstevel@tonic-gate
397c478bd9Sstevel@tonic-gateSUN4_HDRS=			\
407c478bd9Sstevel@tonic-gate	async.h			\
417c478bd9Sstevel@tonic-gate	clock.h			\
427c478bd9Sstevel@tonic-gate	cmp.h			\
437c478bd9Sstevel@tonic-gate	cpc_ultra.h		\
44455e370cSJohn Levon	cpu_sgnblk_defs.h	\
457c478bd9Sstevel@tonic-gate	ddi_subrdefs.h		\
467c478bd9Sstevel@tonic-gate	dvma.h			\
477c478bd9Sstevel@tonic-gate	eeprom.h		\
486dfee483Stsien	errclassify.h		\
497c478bd9Sstevel@tonic-gate	fcode.h			\
50b65731f1Skini	fc_plat.h		\
517c478bd9Sstevel@tonic-gate	idprom.h		\
527c478bd9Sstevel@tonic-gate	intr.h			\
537c478bd9Sstevel@tonic-gate	intreg.h		\
547c478bd9Sstevel@tonic-gate	ivintr.h		\
55455e370cSJohn Levon	memlist_plat.h		\
567c478bd9Sstevel@tonic-gate	memnode.h		\
577c478bd9Sstevel@tonic-gate	nexusdebug.h		\
587c478bd9Sstevel@tonic-gate	prom_debug.h		\
597c478bd9Sstevel@tonic-gate	scb.h			\
60*38a8ff6cSPeter Tribble	smt.h			\
617c478bd9Sstevel@tonic-gate	sun4asi.h		\
627c478bd9Sstevel@tonic-gate	tod.h			\
637c478bd9Sstevel@tonic-gate	trapstat.h		\
647c478bd9Sstevel@tonic-gate	vis.h			\
657c478bd9Sstevel@tonic-gate	vm_machparam.h		\
667c478bd9Sstevel@tonic-gate	x_call.h		\
677c478bd9Sstevel@tonic-gate	xc_impl.h		\
687c478bd9Sstevel@tonic-gate	zsmach.h
697c478bd9Sstevel@tonic-gate
707c478bd9Sstevel@tonic-gateHDRS=	\
717c478bd9Sstevel@tonic-gate	cheetahregs.h		\
727c478bd9Sstevel@tonic-gate	cpr_impl.h		\
7325cf1a30Sjl	cpu_impl.h		\
747c478bd9Sstevel@tonic-gate	ecc_kstat.h		\
7529949e86Sstevel	envctrl.h		\
7629949e86Sstevel	envctrl_gen.h		\
7729949e86Sstevel	envctrl_ue250.h		\
7829949e86Sstevel	envctrl_ue450.h		\
797c478bd9Sstevel@tonic-gate	gpio_87317.h		\
807c478bd9Sstevel@tonic-gate	iocache.h		\
817c478bd9Sstevel@tonic-gate	iommu.h			\
827c478bd9Sstevel@tonic-gate	machasi.h		\
837c478bd9Sstevel@tonic-gate	machclock.h		\
847c478bd9Sstevel@tonic-gate	machcpuvar.h		\
857c478bd9Sstevel@tonic-gate	machparam.h		\
867c478bd9Sstevel@tonic-gate	machsystm.h		\
877c478bd9Sstevel@tonic-gate	machthread.h		\
887bebe46cSjc	mem_cache.h		\
897c478bd9Sstevel@tonic-gate	mmu.h			\
9025cf1a30Sjl	opl_module.h		\
917c478bd9Sstevel@tonic-gate	prom_plat.h		\
927c478bd9Sstevel@tonic-gate	pte.h			\
937c478bd9Sstevel@tonic-gate	sbd_ioctl.h		\
947c478bd9Sstevel@tonic-gate	spitregs.h		\
957c478bd9Sstevel@tonic-gate	sysioerr.h		\
967c478bd9Sstevel@tonic-gate	sysiosbus.h		\
977c478bd9Sstevel@tonic-gate	todmostek.h		\
98a83cadceSkm	traptrace.h
997c478bd9Sstevel@tonic-gate
1007c478bd9Sstevel@tonic-gateI2CHDRS =	clients/max1617.h misc/i2c_svc.h clients/i2c_client.h	\
101fb9f9b97Skupfer		clients/hpc3130.h clients/lm75.h	\
102c0e7977aSJosef 'Jeff' Sipek		clients/pcf8591.h clients/ssc050.h
103fb9f9b97Skupfer
1047c478bd9Sstevel@tonic-gateI2C_DIRS=	clients misc
1057c478bd9Sstevel@tonic-gateUSR_PSM_ISYS_I2C_ROOT=	$(USR_PSM_ISYS_DIR)/i2c
1067c478bd9Sstevel@tonic-gateUSR_PSM_ISYS_I2C_DIRS=	$(USR_PSM_ISYS_I2C_ROOT) \
1077c478bd9Sstevel@tonic-gate			$(I2C_DIRS:%=$(USR_PSM_ISYS_I2C_ROOT)/%)
1087c478bd9Sstevel@tonic-gate
1097c478bd9Sstevel@tonic-gateROOTI2CHDRS=		$(I2CHDRS:%=$(USR_PSM_ISYS_I2C_ROOT)/%)
1107c478bd9Sstevel@tonic-gate
1117c478bd9Sstevel@tonic-gateMONHDRS=
1127c478bd9Sstevel@tonic-gate#MONHDRS=	eeprom.h    idprom.h    keyboard.h  password.h
1137c478bd9Sstevel@tonic-gate
1147c478bd9Sstevel@tonic-gateUSR_PSM_MON_DIR=	$(USR_PSM_ISYS_DIR)/mon
1157c478bd9Sstevel@tonic-gate
1167c478bd9Sstevel@tonic-gateROOTHDRS=		$(HDRS:%=$(USR_PSM_ISYS_DIR)/%)
117fb9f9b97Skupfer
1187c478bd9Sstevel@tonic-gateSUN4_ROOTHDRS=		$(SUN4_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
1197c478bd9Sstevel@tonic-gate
1207c478bd9Sstevel@tonic-gateROOTMONHDRS=		$(MONHDRS:%=$(USR_PSM_MON_DIR)/%)
1217c478bd9Sstevel@tonic-gate
1227c478bd9Sstevel@tonic-gateROOTDIR=		$(ROOT)/usr/share/src
1237c478bd9Sstevel@tonic-gateROOTDIRS=		$(ROOTDIR)/uts $(ROOTDIR)/uts/$(PLATFORM)
1247c478bd9Sstevel@tonic-gate
1257c478bd9Sstevel@tonic-gateROOTLINK=		$(ROOTDIR)/uts/$(PLATFORM)/sys
1267c478bd9Sstevel@tonic-gateLINKDEST=		../../../../platform/$(PLATFORM)/include/sys
1277c478bd9Sstevel@tonic-gate
1287c478bd9Sstevel@tonic-gateCHECKHDRS=		$(HDRS:%.h=%.check) \
1297c478bd9Sstevel@tonic-gate			$(MONHDRS:%.h=mon/%.check) \
1307c478bd9Sstevel@tonic-gate			$(SUN4_HDRS:%.h=%.cmncheck)
1317c478bd9Sstevel@tonic-gate
1327c478bd9Sstevel@tonic-gate.KEEP_STATE:
1337c478bd9Sstevel@tonic-gate
1347c478bd9Sstevel@tonic-gate.PARALLEL: $(CHECKHDRS) $(ROOTHDRS) $(ROOTMONHDRS) $(SUN4_ROOTHDRS)
1357c478bd9Sstevel@tonic-gate
1365c1d0199Sgdinstall_h: $(ROOTDIRS) $(USR_PSM_ISYS_I2C_DIRS) .WAIT \
1377c478bd9Sstevel@tonic-gate		$(ROOTHDRS) $(ROOTI2CHDRS) \
1385c1d0199Sgd		$(ROOTMONHDRS) \
1397c478bd9Sstevel@tonic-gate		$(SUN4_ROOTHDRS) $(ROOTLINK)
1407c478bd9Sstevel@tonic-gate
1417c478bd9Sstevel@tonic-gatecheck:	$(CHECKHDRS)
1427c478bd9Sstevel@tonic-gate
1437c478bd9Sstevel@tonic-gate#
1447c478bd9Sstevel@tonic-gate# install rules
1457c478bd9Sstevel@tonic-gate#
1467c478bd9Sstevel@tonic-gate$(USR_PSM_MON_DIR):	$(USR_PSM_ISYS_DIR)
14748bc00d6Sjmcp	$(INS.dir)
1487c478bd9Sstevel@tonic-gate
1497c478bd9Sstevel@tonic-gate$(USR_PSM_ISYS_I2C_DIRS):
15048bc00d6Sjmcp	$(INS.dir)
1517c478bd9Sstevel@tonic-gate
1527c478bd9Sstevel@tonic-gate$(USR_PSM_ISYS_DIR)/%:	../../sfmmu/sys/% $(USR_PSM_ISYS_DIR)
1537c478bd9Sstevel@tonic-gate	$(INS.file)
1547c478bd9Sstevel@tonic-gate
1557c478bd9Sstevel@tonic-gate$(USR_PSM_ISYS_DIR)/%:	../../sun4/sys/% $(USR_PSM_ISYS_DIR)
1567c478bd9Sstevel@tonic-gate	$(INS.file)
1577c478bd9Sstevel@tonic-gate
1587c478bd9Sstevel@tonic-gate$(USR_PSM_MON_DIR)/%:	mon/% $(USR_PSM_MON_DIR)
1597c478bd9Sstevel@tonic-gate	$(INS.file)
1607c478bd9Sstevel@tonic-gate
1617c478bd9Sstevel@tonic-gate$(ROOTDIRS):
16248bc00d6Sjmcp	$(INS.dir)
1637c478bd9Sstevel@tonic-gate
1647c478bd9Sstevel@tonic-gate# -r because this used to be a directory and is now a link.
1657c478bd9Sstevel@tonic-gate$(ROOTLINK):	$(ROOTDIRS)
16624fe0b3bSjmcp	-$(RM) -r $@; $(SYMLINK) $(LINKDEST) $@
1677c478bd9Sstevel@tonic-gate
1687c478bd9Sstevel@tonic-gatemon/%.check:	mon/%.h
1697c478bd9Sstevel@tonic-gate	$(DOT_H_CHECK)
1707c478bd9Sstevel@tonic-gate
1717c478bd9Sstevel@tonic-gate%.check:	../../sfmmu/sys/%.h
1727c478bd9Sstevel@tonic-gate	$(DOT_H_CHECK)
1737c478bd9Sstevel@tonic-gate%.cmncheck:	../../sun4/sys/%.h
1747c478bd9Sstevel@tonic-gate	$(DOT_H_CHECK)
1757c478bd9Sstevel@tonic-gate
1767c478bd9Sstevel@tonic-gateFRC:
1777c478bd9Sstevel@tonic-gate
1787c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ
179