9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# CDDL HEADER START
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# The contents of this file are subject to the terms of the
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# Common Development and Distribution License (the "License").
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# You may not use this file except in compliance with the License.
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# or http://www.opensolaris.org/os/licensing.
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# See the License for the specific language governing permissions
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# and limitations under the License.
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# When distributing Covered Code, include this CDDL HEADER in each
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# If applicable, add the following below this CDDL HEADER, with the
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# fields enclosed by brackets "[]" replaced with your own identifying
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# information: Portions Copyright [yyyy] [name of copyright owner]
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# CDDL HEADER END
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
80e2ca8596e3435bc3b76f3c597833ea0a87f85e# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# This makefile drives the production of the kernel component of
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# the N-1 Solaris brand
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# Path to the base of the uts directory tree (usually /usr/src/uts).
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
628e3cbed6489fa1db545d8524a06cd6535af456Edward PilatowiczUTSBASE = ../..
628e3cbed6489fa1db545d8524a06cd6535af456Edward PilatowiczSN1_BASE = $(UTSBASE)/common/brand/sn1
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# Define the module and object file sets.
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
628e3cbed6489fa1db545d8524a06cd6535af456Edward PilatowiczMODULE = sn1_brand
628e3cbed6489fa1db545d8524a06cd6535af456Edward PilatowiczOBJECTS = $(SN1_BRAND_OBJS:%=$(OBJS_DIR)/%)
628e3cbed6489fa1db545d8524a06cd6535af456Edward PilatowiczLINTS = $(SN1_BRAND_OBJS:%.o=$(LINTS_DIR)/%.ln)
9a9ae70f32271d74856130e37667ca926b27feb4jvROOTMODULE = $(USR_BRAND_DIR)/$(MODULE)
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# Include common rules.
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnninclude $(UTSBASE)/intel/Makefile.intel
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# Define targets
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
80e2ca8596e3435bc3b76f3c597833ea0a87f85eALL_TARGET = $(BINARY)
628e3cbed6489fa1db545d8524a06cd6535af456Edward PilatowiczLINT_TARGET = $(MODULE).lint
80e2ca8596e3435bc3b76f3c597833ea0a87f85eINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
628e3cbed6489fa1db545d8524a06cd6535af456Edward Pilatowicz
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn
628e3cbed6489fa1db545d8524a06cd6535af456Edward Pilatowicz#
628e3cbed6489fa1db545d8524a06cd6535af456Edward Pilatowicz# Update compiler variables.
628e3cbed6489fa1db545d8524a06cd6535af456Edward Pilatowicz#
628e3cbed6489fa1db545d8524a06cd6535af456Edward PilatowiczINC_PATH += -I$(SN1_BASE) -I$(OBJS_DIR)
fd9e7635fa85e33de5aff912b955d797589f6f87edpAS_INC_PATH += -I$(UTSBASE)/i86pc/genassym/$(OBJS_DIR)
628e3cbed6489fa1db545d8524a06cd6535af456Edward PilatowiczLDFLAGS += -dy -Nexec/elfexec
fd9e7635fa85e33de5aff912b955d797589f6f87edp
fd9e7635fa85e33de5aff912b955d797589f6f87edp#
fd9e7635fa85e33de5aff912b955d797589f6f87edp# Ugh, this is a gross hack. Sn1_brand_asm.s uses lots of defines
fd9e7635fa85e33de5aff912b955d797589f6f87edp# to simplify variable access. All these defines work fine for amd64
fd9e7635fa85e33de5aff912b955d797589f6f87edp# compiles because when compiling for amd64 we use the GNU assembler,
fd9e7635fa85e33de5aff912b955d797589f6f87edp# gas. For 32-bit code we use the Sun assembler, as. Unfortunatly
fd9e7635fa85e33de5aff912b955d797589f6f87edp# as does not handle certian constructs that gas does. So rather than
fd9e7635fa85e33de5aff912b955d797589f6f87edp# make our code less readable, we'll just use gas to compile our 32-bit
fd9e7635fa85e33de5aff912b955d797589f6f87edp# code as well.
fd9e7635fa85e33de5aff912b955d797589f6f87edp#
fd9e7635fa85e33de5aff912b955d797589f6f87edpi386_AS = $(amd64_AS)
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# Default build targets.
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn.KEEP_STATE:
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnndef: $(DEF_DEPS)
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnnall: $(ALL_DEPS)
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnnclean: $(CLEAN_DEPS)
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnnclobber: $(CLOBBER_DEPS)
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnnlint: $(LINT_DEPS)
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnnmodlintlib: $(MODLINTLIB_DEPS)
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnnclean.lint: $(CLEAN_LINT_DEPS)
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnninstall: $(INSTALL_DEPS)
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# Include common targets.
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnninclude $(UTSBASE)/intel/Makefile.targ