xref: /illumos-gate/usr/src/uts/intel/config/Makefile (revision 275c9da86e89f8abf71135cf63d9fc23671b2e60)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# uts/intel/config/Makefile
24# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27#ident	"%Z%%M%	%I%	%E% SMI"
28#
29#	This makefile drives the production of the kernel configuration files.
30#
31#	intel architecture dependent
32#
33
34#
35#	Path to the base of the uts directory tree (usually /usr/src/uts).
36#
37UTSBASE	= ../..
38
39#
40#	Include common rules.
41#
42include $(UTSBASE)/intel/Makefile.intel
43
44#
45#	Define the module and object file sets.
46#
47SRCDIR		= $(UTSBASE)/intel/os
48PATH2INST	= path_to_inst
49CONFIGFILES	= name_to_major minor_perm driver_aliases name_to_sysnum \
50		  driver_classes dacf.conf $(PATH2INST) mach
51SECCONFIG	= device_policy priv_names
52BOOTIMAGE	= solaris.xpm
53BOOTENVRC	= bootenv.rc
54DEVMASTER	= master
55FILEMODE	= 644
56OWNER		= root
57GROUP		= sys
58ROOTETC		= $(ROOT)/etc
59ROOTETCSEC	= $(ROOTETC)/security
60ROOTBOOT	= $(ROOT)/boot
61BOOTSOLARIS	= $(ROOTBOOT)/solaris
62BOOTDEVICEDB	= $(BOOTSOLARIS)/devicedb
63
64SRCFILES	= $(CONFIGFILES:%=$(SRCDIR)/%) $(SECCONFIG:%=$(SRCDIR)/%)
65SRCFILES	+= $(BOOTIMAGE:%=$(SRCDIR)/%)
66SRCFILES	+= $(BOOTENVRC:%=$(SRCDIR)/%)
67SRCFILES	+= $(DEVMASTER:%=$(SRCDIR)/%)
68ROOTCONFIGFILES	= $(CONFIGFILES:%=$(ROOTETC)/%) $(SECCONFIG:%=$(ROOTETCSEC)/%)
69ROOTCONFIGFILES	+= $(BOOTIMAGE:%=$(ROOTBOOT)/%)
70ROOTCONFIGFILES	+= $(BOOTENVRC:%=$(BOOTSOLARIS)/%)
71ROOTCONFIGFILES	+= $(DEVMASTER:%=$(BOOTDEVICEDB)/%)
72
73#
74#	Default build targets.
75#
76.KEEP_STATE:
77
78def all: $(SRCFILES)
79
80install: all $(ROOTCONFIGFILES)
81
82#
83#	The ROOTETC directory is made by ../../../Targetdirs
84#	through the rootdirs target in ../../../Makefile.
85#
86#	etc/path_to_inst has permissions different from the other config files
87#
88$(ROOTETC)/$(PATH2INST):= FILEMODE=444
89$(ROOTETC)/$(PATH2INST):= GROUP=root
90
91$(ROOTETC)/%: $(SRCDIR)/%
92	$(INS.file)
93
94$(ROOTETCSEC)/%: $(SRCDIR)/%
95	$(INS.file)
96
97$(ROOTBOOT):
98	$(INS) -s -d -m $(DIRMODE) $@
99
100$(ROOTBOOT)/%: $(ROOTBOOT) $(SRCDIR)/%
101	$(INS.file)
102
103$(BOOTSOLARIS):
104	$(INS) -s -d -m $(DIRMODE) $@
105
106$(BOOTSOLARIS)/%: $(BOOTSOLARIS) $(SRCDIR)/%
107	$(INS.file)
108
109$(BOOTDEVICEDB):
110	$(INS) -s -d -m $(DIRMODE) $@
111
112$(BOOTDEVICEDB)/%: $(BOOTDEVICEDB) $(SRCDIR)/%
113	$(INS.file)
114
115$(SRCDIR)/priv_names: $(PRIVS_DEF) $(PRIVS_AWK)
116	$(NAWK) -f $(PRIVS_AWK) < $(PRIVS_DEF) -v pnamesfile=$@
117
118clean clobber lint:
119
120#
121#	No lints, so keep the clobber and clean targets reasonable.
122#
123CLEANLINTFILES	= Nothing_to_remove
124CLEANFILES	= Nothing_to_remove
125CLOBBERFILES	= Nothing_to_remove
126
127#
128#	Include common targets.
129#
130include $(UTSBASE)/intel/Makefile.targ
131