xref: /illumos-gate/usr/src/uts/intel/ia32/sys/Makefile (revision 689b9301078f0c35c7f198fcee8032a0d30eff3a)
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 2007 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26
27# include global definitions
28include ../../../../Makefile.master
29
30HDRS=			\
31	kdi_regs.h	\
32	privmregs.h	\
33	privregs.h
34
35LINKS=			\
36	asm_linkage.h	\
37	machtypes.h	\
38	psw.h		\
39	pte.h		\
40	reg.h		\
41	stack.h		\
42	trap.h		\
43	traptrace.h
44
45ROOTINCISA= $(ROOT)/usr/include/ia32
46ROOTDIR= $(ROOTINCISA)/sys
47ROOTDIRS= $(ROOTDIR)
48
49ROOTHDRS= $(HDRS:%=$(ROOTDIR)/%)
50ROOTLINKS= $(LINKS:%=$(ROOTDIR)/%)
51
52CHECKHDRS= $(HDRS:%.h=%.check)
53
54$(ROOTDIR)/asm_linkage.h	:= LINK_TARGET = ../../sys/asm_linkage.h
55$(ROOTDIR)/machtypes.h		:= LINK_TARGET = ../../sys/machtypes.h
56$(ROOTDIR)/psw.h		:= LINK_TARGET = ../../sys/psw.h
57$(ROOTDIR)/pte.h		:= LINK_TARGET = ../../sys/pte.h
58$(ROOTDIR)/reg.h		:= LINK_TARGET = ../../sys/reg.h
59$(ROOTDIR)/stack.h		:= LINK_TARGET = ../../sys/stack.h
60$(ROOTDIR)/trap.h		:= LINK_TARGET = ../../sys/trap.h
61$(ROOTDIR)/traptrace.h		:= LINK_TARGET = ../../sys/traptrace.h
62
63# install rules
64$(ROOTDIR)/%: %
65	$(INS.file)
66
67.KEEP_STATE:
68
69.PARALLEL: $(CHECKHDRS) $(ROOTHDRS) $(ROOTLINKS)
70
71install_h: $(ROOTINCISA) .WAIT $(ROOTDIRS) .WAIT $(ROOTHDRS) $(ROOTLINKS)
72
73$(ROOTINCISA):
74	$(INS.dir)
75
76$(ROOTDIRS):	$(ROOTINCISA)
77	$(INS.dir)
78
79$(ROOTLINKS):
80	$(RM) $@; $(SYMLINK) $(LINK_TARGET) $@
81
82check:	$(CHECKHDRS)
83