xref: /illumos-gate/usr/src/uts/intel/config/Makefile (revision 6c3eb1522a391079b03bb1847a6e4dc8bddf0224)
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
54FILEMODE	= 644
55ROOTETC		= $(ROOT)/etc
56ROOTETCSEC	= $(ROOTETC)/security
57ROOTBOOT	= $(ROOT)/boot
58BOOTSOLARIS	= $(ROOTBOOT)/solaris
59
60SRCFILES	= $(CONFIGFILES:%=$(SRCDIR)/%) $(SECCONFIG:%=$(SRCDIR)/%)
61SRCFILES	+= $(BOOTIMAGE:%=$(SRCDIR)/%)
62SRCFILES	+= $(BOOTENVRC:%=$(SRCDIR)/%)
63SRCFILES	+= $(DEVMASTER:%=$(SRCDIR)/%)
64ROOTCONFIGFILES	= $(CONFIGFILES:%=$(ROOTETC)/%) $(SECCONFIG:%=$(ROOTETCSEC)/%)
65ROOTCONFIGFILES	+= $(BOOTIMAGE:%=$(ROOTBOOT)/%)
66ROOTCONFIGFILES	+= $(BOOTENVRC:%=$(BOOTSOLARIS)/%)
67ROOTALTBOOTIMAGE = $(ALTBOOTIMAGE:%=$(ROOTBOOT)/%)
68
69#
70#	Default build targets.
71#
72.KEEP_STATE:
73
74def all: $(SRCFILES)
75
76install: all $(ROOTCONFIGFILES) $(ROOTALTBOOTIMAGE)
77
78#
79#	The ROOTETC directory is made by ../../../Targetdirs
80#	through the rootdirs target in ../../../Makefile.
81#
82#	etc/path_to_inst has permissions different from the other config files
83#
84$(ROOTETC)/$(PATH2INST):= FILEMODE=444
85
86$(ROOTETC)/%: $(SRCDIR)/%
87	$(INS.file)
88
89$(ROOTETCSEC)/%: $(SRCDIR)/%
90	$(INS.file)
91
92$(ROOTBOOT):
93	$(INS) -s -d -m $(DIRMODE) $@
94
95$(ROOTBOOT)/%: $(ROOTBOOT) $(SRCDIR)/%
96	$(INS.file)
97
98$(ROOTBOOT)/solaris.xpm: $(ROOTBOOT)/splashimage.xpm
99	$(RM) $@; $(LN) $(ROOTBOOT)/splashimage.xpm $@
100
101$(BOOTSOLARIS):
102	$(INS) -s -d -m $(DIRMODE) $@
103
104$(BOOTSOLARIS)/%: $(BOOTSOLARIS) $(SRCDIR)/%
105	$(INS.file)
106
107$(SRCDIR)/priv_names: $(PRIVS_DEF) $(PRIVS_AWK)
108	$(AWK) -f $(PRIVS_AWK) < $(PRIVS_DEF) -v pnamesfile=$@
109
110clean:
111clobber: clobber.targ
112
113#
114#	Keep the clobber and clean targets reasonable.
115#
116CLEANFILES	= Nothing_to_remove
117CLOBBERFILES	= $(SRCDIR)/priv_names
118
119#
120#	Include common targets.
121#
122include $(UTSBASE)/intel/Makefile.targ
123