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