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]
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.
31 include Makefile.intel
34 # dprov is delivered in the SUNWcryptoint package.
41 def.prereq
:= TARGET
= def
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
56 .PARALLEL
: $(PARALLEL_KMODS
) $(XMODS
) config
58 def
all install clean clobber modlist
: $(KMODS
) $(XMODS
) config
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
= $(SRCTOP
)/kernel
/os
/priv_const.c
71 $(PRIVS_C
): $(PRIVS_AWK
) $(PRIVS_DEF
)
72 $(AWK
) -f
$(PRIVS_AWK
) < $(PRIVS_DEF
) cfile
=$@
74 CLOBBERFILES
+= $(PRIVS_C
)
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
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
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.
110 $(KMODS
) $(SUBDIRS
) config
: FRC
111 @cd
$@
; pwd
; $(MAKE
) $(NO_STATE
) $(TARGET
)
114 @if
[ -f
$@
/Makefile
]; then \
115 cd
$@
; pwd
; $(MAKE
) $(NO_STATE
) $(TARGET
); \
121 @cd asm
; pwd
; $(MAKE
) $(TARGET
)
122 @cd ia32
/sys
; pwd
; $(MAKE
) $(TARGET
)
123 @cd amd64
/sys
; pwd
; $(MAKE
) $(TARGET
)
125 include ..
/Makefile.targ