xref: /illumos-gate/usr/src/uts/intel/config/Makefile (revision 9525b14bcdeb5b5f6f95ab27c2f48f18bd2ec829)
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# uts/intel/config/Makefile
23# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26#	This makefile drives the production of the kernel configuration files.
27#
28#	intel architecture dependent
29#
30
31#
32#	Path to the base of the uts directory tree (usually /usr/src/uts).
33#
34UTSBASE	= ../..
35
36#
37#	Include common rules.
38#
39include $(UTSBASE)/intel/Makefile.intel
40
41#
42#	Define the module and object file sets.
43#
44SRCDIR		= $(UTSBASE)/intel/os
45PATH2INST	= path_to_inst
46CONFIGFILES	= name_to_major minor_perm driver_aliases name_to_sysnum \
47		  driver_classes dacf.conf $(PATH2INST) mach
48SECCONFIG	= device_policy priv_names
49BOOTIMAGE	= solaris.xpm.gz
50BOOTENVRC	= bootenv.rc
51DEVMASTER	= master
52FILEMODE	= 644
53ROOTETC		= $(ROOT)/etc
54ROOTETCSEC	= $(ROOTETC)/security
55ROOTBOOT	= $(ROOT)/boot
56BOOTSOLARIS	= $(ROOTBOOT)/solaris
57BOOTDEVICEDB	= $(BOOTSOLARIS)/devicedb
58
59SRCFILES	= $(CONFIGFILES:%=$(SRCDIR)/%) $(SECCONFIG:%=$(SRCDIR)/%)
60SRCFILES	+= $(BOOTIMAGE:%=$(SRCDIR)/%)
61SRCFILES	+= $(BOOTENVRC:%=$(SRCDIR)/%)
62SRCFILES	+= $(DEVMASTER:%=$(SRCDIR)/%)
63ROOTCONFIGFILES	= $(CONFIGFILES:%=$(ROOTETC)/%) $(SECCONFIG:%=$(ROOTETCSEC)/%)
64ROOTCONFIGFILES	+= $(BOOTIMAGE:%=$(ROOTBOOT)/%)
65ROOTCONFIGFILES	+= $(BOOTENVRC:%=$(BOOTSOLARIS)/%)
66ROOTCONFIGFILES	+= $(DEVMASTER:%=$(BOOTDEVICEDB)/%)
67
68#
69#	Default build targets.
70#
71.KEEP_STATE:
72
73def all: $(SRCFILES)
74
75install: all $(ROOTCONFIGFILES)
76
77#
78#	The ROOTETC directory is made by ../../../Targetdirs
79#	through the rootdirs target in ../../../Makefile.
80#
81#	etc/path_to_inst has permissions different from the other config files
82#
83$(ROOTETC)/$(PATH2INST):= FILEMODE=444
84
85$(ROOTETC)/%: $(SRCDIR)/%
86	$(INS.file)
87
88$(ROOTETCSEC)/%: $(SRCDIR)/%
89	$(INS.file)
90
91$(ROOTBOOT):
92	$(INS) -s -d -m $(DIRMODE) $@
93
94$(ROOTBOOT)/%: $(ROOTBOOT) $(SRCDIR)/%
95	$(INS.file)
96
97$(BOOTSOLARIS):
98	$(INS) -s -d -m $(DIRMODE) $@
99
100$(BOOTSOLARIS)/%: $(BOOTSOLARIS) $(SRCDIR)/%
101	$(INS.file)
102
103$(BOOTDEVICEDB):
104	$(INS) -s -d -m $(DIRMODE) $@
105
106$(BOOTDEVICEDB)/%: $(BOOTDEVICEDB) $(SRCDIR)/%
107	$(INS.file)
108
109$(SRCDIR)/priv_names: $(PRIVS_DEF) $(PRIVS_AWK)
110	$(NAWK) -f $(PRIVS_AWK) < $(PRIVS_DEF) -v pnamesfile=$@
111
112clean clobber lint:
113
114#
115#	No lints, so keep the clobber and clean targets reasonable.
116#
117CLEANLINTFILES	= Nothing_to_remove
118CLEANFILES	= Nothing_to_remove
119CLOBBERFILES	= Nothing_to_remove
120
121#
122#	Include common targets.
123#
124include $(UTSBASE)/intel/Makefile.targ
125