1e71ca95cSGerald Jelinek#
2e71ca95cSGerald Jelinek# CDDL HEADER START
3e71ca95cSGerald Jelinek#
4e71ca95cSGerald Jelinek# The contents of this file are subject to the terms of the
5e71ca95cSGerald Jelinek# Common Development and Distribution License (the "License").
6e71ca95cSGerald Jelinek# You may not use this file except in compliance with the License.
7e71ca95cSGerald Jelinek#
8e71ca95cSGerald Jelinek# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9e71ca95cSGerald Jelinek# or http://www.opensolaris.org/os/licensing.
10e71ca95cSGerald Jelinek# See the License for the specific language governing permissions
11e71ca95cSGerald Jelinek# and limitations under the License.
12e71ca95cSGerald Jelinek#
13e71ca95cSGerald Jelinek# When distributing Covered Code, include this CDDL HEADER in each
14e71ca95cSGerald Jelinek# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15e71ca95cSGerald Jelinek# If applicable, add the following below this CDDL HEADER, with the
16e71ca95cSGerald Jelinek# fields enclosed by brackets "[]" replaced with your own identifying
17e71ca95cSGerald Jelinek# information: Portions Copyright [yyyy] [name of copyright owner]
18e71ca95cSGerald Jelinek#
19e71ca95cSGerald Jelinek# CDDL HEADER END
20e71ca95cSGerald Jelinek#
21e71ca95cSGerald Jelinek#
2280e2ca85S# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
23e71ca95cSGerald Jelinek#
24e71ca95cSGerald Jelinek#	This makefile drives the production of the kernel component of
25e71ca95cSGerald Jelinek#	the Solaris 10 brand
26e71ca95cSGerald Jelinek#
27e71ca95cSGerald Jelinek
28e71ca95cSGerald Jelinek#
29e71ca95cSGerald Jelinek#	Path to the base of the uts directory tree (usually /usr/src/uts).
30e71ca95cSGerald Jelinek#
31e71ca95cSGerald JelinekUTSBASE =	../..
32e71ca95cSGerald JelinekS10_BASE =	$(UTSBASE)/common/brand/solaris10
33e71ca95cSGerald Jelinek
34e71ca95cSGerald Jelinek#
35e71ca95cSGerald Jelinek#	Define the module and object file sets.
36e71ca95cSGerald Jelinek#
37e71ca95cSGerald JelinekMODULE =	s10_brand
38e71ca95cSGerald JelinekOBJECTS =	$(S10_BRAND_OBJS:%=$(OBJS_DIR)/%)
39e71ca95cSGerald JelinekROOTMODULE =	$(USR_BRAND_DIR)/$(MODULE)
40e71ca95cSGerald Jelinek
41e71ca95cSGerald Jelinek#
42e71ca95cSGerald Jelinek#	Include common rules.
43e71ca95cSGerald Jelinek#
44e71ca95cSGerald Jelinekinclude $(UTSBASE)/intel/Makefile.intel
45e71ca95cSGerald Jelinek
46e71ca95cSGerald Jelinek#
47e71ca95cSGerald Jelinek#	Define targets
48e71ca95cSGerald Jelinek#
4980e2ca85SALL_TARGET =		$(BINARY)
5080e2ca85SINSTALL_TARGET =	$(BINARY) $(ROOTMODULE)
51e71ca95cSGerald Jelinek
52e71ca95cSGerald Jelinek
53e71ca95cSGerald Jelinek#
54e71ca95cSGerald Jelinek#	Update compiler variables.
55e71ca95cSGerald Jelinek#
56e71ca95cSGerald JelinekINC_PATH +=	-I$(S10_BASE) -I$(OBJS_DIR)
57e71ca95cSGerald JelinekAS_INC_PATH	+= -I$(UTSBASE)/i86pc/genassym/$(OBJS_DIR)
58*82d0151aSRichard LoweLDFLAGS +=	-Nexec/elfexec
59e71ca95cSGerald Jelinek
60e71ca95cSGerald Jelinek#
61e71ca95cSGerald Jelinek# Ugh, this is a gross hack.  s10_brand_asm.s uses lots of defines
62e71ca95cSGerald Jelinek# to simplify variable access.  All these defines work fine for amd64
63e71ca95cSGerald Jelinek# compiles because when compiling for amd64 we use the GNU assembler,
64e71ca95cSGerald Jelinek# gas.  For 32-bit code we use the Sun assembler, as.  Unfortunatly
65e71ca95cSGerald Jelinek# as does not handle certian constructs that gas does.  So rather than
66e71ca95cSGerald Jelinek# make our code less readable, we'll just use gas to compile our 32-bit
67e71ca95cSGerald Jelinek# code as well.
68e71ca95cSGerald Jelinek#
69e71ca95cSGerald Jelineki386_AS		= $(amd64_AS)
70e71ca95cSGerald Jelinek
71e71ca95cSGerald Jelinek#
72e71ca95cSGerald Jelinek#	Default build targets.
73e71ca95cSGerald Jelinek#
74e71ca95cSGerald Jelinek.KEEP_STATE:
75e71ca95cSGerald Jelinek
76e71ca95cSGerald Jelinekdef:		$(DEF_DEPS)
77e71ca95cSGerald Jelinek
78e71ca95cSGerald Jelinekall:		$(ALL_DEPS)
79e71ca95cSGerald Jelinek
80e71ca95cSGerald Jelinekclean:		$(CLEAN_DEPS)
81e71ca95cSGerald Jelinek
82e71ca95cSGerald Jelinekclobber:	$(CLOBBER_DEPS)
83e71ca95cSGerald Jelinek
84e71ca95cSGerald Jelinekinstall:	$(INSTALL_DEPS)
85e71ca95cSGerald Jelinek
86e71ca95cSGerald Jelinek#
87e71ca95cSGerald Jelinek#	Include common targets.
88e71ca95cSGerald Jelinek#
89e71ca95cSGerald Jelinekinclude $(UTSBASE)/intel/Makefile.targ
90