uts/intel: don't generate priv_const.c into bmake tree
[unleashed.git] / usr / src / uts / intel / Makefile
blob5dece1269642523be6d094f8d3fba2d0f8db2ba6
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
21 # uts/intel/Makefile
23 # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
24 # Copyright 2015 Igor Kozhukhov <ikozhukhov@gmail.com>
26 # This makefile drives the production of all implementation architecture
27 # independent modules for Intel processors.
29 UTSBASE = ..
31 include Makefile.intel
34 # dprov is delivered in the SUNWcryptoint package.
36 DRV_KMODS += dprov
40 def := TARGET= def
41 def.prereq := TARGET= def
42 all := TARGET= all
43 all.prereq := TARGET= all
44 install := TARGET= install
45 install.prereq := TARGET= install
46 clean := TARGET= clean
47 clobber := TARGET= clobber
48 modlist := TARGET= modlist
49 modlist := NO_STATE= -K $$MODSTATE$$$$
50 check := TARGET= check
51 install_h := TARGET= install_h
52 install_h.prereq := TARGET= install_h
54 .KEEP_STATE:
56 .PARALLEL: $(PARALLEL_KMODS) $(XMODS) config
58 def all install clean clobber modlist: $(KMODS) $(XMODS) config
60 clobber: clobber.targ
63 # Privilege constants
65 # NOTE: The rules for generating priv_const.c file are shared between all
66 # processor architectures and and should be kept in sync. If they are changed in
67 # this file make sure that sparc rules are updated as well.
69 PRIVS_C = $(UTSBASE)/priv_const.c
71 $(PRIVS_C): $(PRIVS_AWK) $(PRIVS_DEF)
72 $(AWK) -f $(PRIVS_AWK) < $(PRIVS_DEF) cfile=$@
74 CLOBBERFILES += $(PRIVS_C)
77 # Prerequisites
79 # The uts/Makefile defines build parallelism for x86 platforms such that i86pc,
80 # and intel are all built in parallel. This requires building certain
81 # parts before the parallel build can start. The uts/Makefile appends the
82 # '.prereq' string to the original target and executes this Makefile to build
83 # any prerequisites needed before the full parallel build can start. After that
84 # make continues with normal targets.
86 # Any build prerequisites for x86 builds should be described here.
88 # genassym is used to build intel/dtrace and genunix, so it should be built
89 # first.
91 # priv_const.c is required to build genunix.
93 # genunix is used by everyone to ctf-merge with. Genunix is CTF-merged with
94 # intel/ip so as a side effect this dependency builds intel/ip as part of the
95 # prerequisites.
97 # intel/dtrace depends on i86pc/genassym, so we need to build both
98 # i86pc/genassym and intel/genassym.
100 all.prereq install.prereq def.prereq: genunix FRC
101 @cd ../i86pc/genassym; pwd; $(MAKE) $(@:%.prereq=%)
104 # Nothing to do for any other prerequisite targets.
106 %.prereq:
108 genunix: $(PRIVS_C)
110 $(KMODS) $(SUBDIRS) config: FRC
111 @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
113 $(XMODS): FRC
114 @if [ -f $@/Makefile ]; then \
115 cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
116 else \
117 true; \
120 install_h check: FRC
121 @cd asm; pwd; $(MAKE) $(TARGET)
122 @cd ia32/sys; pwd; $(MAKE) $(TARGET)
123 @cd amd64/sys; pwd; $(MAKE) $(TARGET)
125 include ../Makefile.targ