Makefile revision 7c478bd95313f5f23a4c958a745db2134aa03244
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# CDDL HEADER START
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# The contents of this file are subject to the terms of the
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# Common Development and Distribution License, Version 1.0 only
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# (the "License"). You may not use this file except in compliance
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# with the License.
dd750c560ae48cf6caeb9a9fe81d33fc4746106dBrian Wellington# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
dd750c560ae48cf6caeb9a9fe81d33fc4746106dBrian Wellington# or http://www.opensolaris.org/os/licensing.
dd750c560ae48cf6caeb9a9fe81d33fc4746106dBrian Wellington# See the License for the specific language governing permissions
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# and limitations under the License.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# CDDL HEADER END
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# Use is subject to license terms.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley#ident "%Z%%M% %I% %E% SMI"
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# This makefile drives the production of unix (and unix.o).
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# sun4u starfire implementation architecture dependent
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# Path to the base of the uts directory tree (usually /usr/src/uts).
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Define the module and object file sets.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob HalleyUNIX32_LINK = $(ROOT_STARFIRE_KERN_DIR_32)/$(UNIX)
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob HalleyGENOPTS = -L $(GENUNIX_DIR)/$(OBJS_DIR) -l $(GENUNIX)
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob HalleyPLATOPTS = -L $(PLAT_DIR)/$(OBJS_DIR) -l $(PLATMOD)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Include common rules.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeininclude $(UTSBASE)/sun4u/starfire/Makefile.starfire
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Define targets
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinINSTALL_TARGET = $(UNIX_BIN) $(ROOTMODULE) $(UNIX32_LINK)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# This is UNIX_DIR. Use a short path.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCLEANFILES += $(UNIX_O) $(MODSTUBS_O) $(OBJS_DIR)/vers.c \
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# lint pass one enforcement
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# Turn on doubleword alignment for 64 bit counter timer registers
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# Default build targets.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein$(UNIX_BIN): $(UNIX_O) $(MODSTUBS_O) $(MAPFILE) $(LIBS) $(DTRACESTUBS)
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley $(LD) -dy -b -o $@ -e _start -I $(KRTLD) -M $(MAPFILE) \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein $(UNIX_O) $(MODSTUBS_O) $(LIBOPTS) $(DTRACESTUBS)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein$(UNIX32_LINK): $(ROOT_PSM_KERN_DIR_32) $(UNIX_BIN)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein $(UNIX_O) $(MODSTUBS_O) $(LIBOPTS) $(DTRACESTUBS)
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley#$(UNIX).glom: $(UNIX)
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# ${LD} -dy -b -z nodefs -o $@ -e _start -I $(KRTLD) -M $(MAPFILE) \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# $(UNIX_O) $(MODSTUBS_O) $(GENUNIX_DIR)/$(GENUNIX)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# $(POST_PROCESS)
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# Special rules for generating assym.h for inclusion in assembly files.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# CPU_OBJ now comprises of 2 object files which come from sun4 common
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# and from architecture dependent code. OBJS_DIR is prepended where
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# CPU_OBJ is defined to allow for building multiple CPU_OBJ's
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# The global lint target builds the kernel lint library (llib-lunix.ln)
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# which is equivalent to a lint of /unix.o. Then all kernel modules for
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# this architecture are linted against the kernel lint library.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# Note: lint errors in the kernel lint library will be repeated for
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# each module. It is important that the kernel lint library
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# be clean to keep the textual output to a reasonable level.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# Include common targets.