Makefile revision 24da5b34f49324ed742a340010ed5bd3d4e06625
c63ebf815c8a874525cf18670ad74847f7fc7b26Christian Maeder# CDDL HEADER START
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# The contents of this file are subject to the terms of the
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# Common Development and Distribution License (the "License").
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# You may not use this file except in compliance with the License.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder# or http://www.opensolaris.org/os/licensing.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# See the License for the specific language governing permissions
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maeder# and limitations under the License.
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder# When distributing Covered Code, include this CDDL HEADER in each
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder# If applicable, add the following below this CDDL HEADER, with the
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder# fields enclosed by brackets "[]" replaced with your own identifying
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# information: Portions Copyright [yyyy] [name of copyright owner]
a1ed34933c266ce85066acb0d7b20c90cb8eb213Christian Maeder# CDDL HEADER END
ad270004874ce1d0697fb30d7309f180553bb315Christian Maeder# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich# Use is subject to license terms.
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder# ident "%Z%%M% %I% %E% SMI"
3e8b136f23ed57d40ee617f49bcac37830b58cabChristian Maeder# This makefile drives the production of unix (and unix.o).
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# sun4u starcat implementation architecture dependent
3dde4051c307b609159a097f08a05108fdd036efJonathan von Schroeder# Path to the base of the uts directory tree (usually /usr/src/uts).
3dde4051c307b609159a097f08a05108fdd036efJonathan von Schroeder# Define the module and object file sets.
3dde4051c307b609159a097f08a05108fdd036efJonathan von SchroederOBJECTS = $(SPECIAL_OBJS:%=$(OBJS_DIR)/%) \
3dde4051c307b609159a097f08a05108fdd036efJonathan von SchroederLINTS = $(SPECIAL_OBJS:%.o=$(LINTS_DIR)/%.ln) \
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder $(MACH_NOT_YET_KMODS:%.o=$(LINTS_DIR)/%.ln) \
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian MaederROOTMODULE = $(ROOT_STARCAT_KERN_DIR)/$(UNIX)
363939beade943a02b31004cea09dec34fa8a6d9Christian MaederGENOPTS = -L $(GENUNIX_DIR)/$(OBJS_DIR) -l $(GENUNIX)
6aea82c63ba1d2efc0329bc784a14e521469ec20Christian MaederCPUOPTS = -L $(CPU_DIR)/$(OBJS_DIR) -l $(CPUNAME)
431d34c7007a787331c4e5ec997badb0f8190fc7Christian MaederPLATOPTS = -L $(PLAT_DIR)/$(OBJS_DIR) -l $(PLATMOD)
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder# Include common rules.
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maederinclude $(UTSBASE)/sun4u/starcat/Makefile.starcat
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# Define targets
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder# This is UNIX_DIR. Use a short path.
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederCLEANFILES += $(UNIX_O) $(MODSTUBS_O) $(OBJS_DIR)/vers.c \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder# lint pass one enforcement
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# Turn on doubleword alignment for 64 bit counter timer registers
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# Default build targets.
6cd33d6101fb1b93baa6d86fac158af18a115108Christian Maeder$(UNIX_BIN): $(UNIX_O) $(MODSTUBS_O) $(MAPFILE) $(LIBS) $(DTRACESTUBS)
6cd33d6101fb1b93baa6d86fac158af18a115108Christian Maeder $(LD) -dy -b -o $@ -e _start -I $(KRTLD) -M $(MAPFILE) \
6cd33d6101fb1b93baa6d86fac158af18a115108Christian Maeder $(UNIX_O) $(MODSTUBS_O) $(LIBOPTS) $(DTRACESTUBS)
ea5432ff6f61c64469b11d9352b23fef4ff152e8Christian Maedersymcheck.targ: $(UNIX_O) $(MODSTUBS_O) $(LIBS) $(DTRACESTUBS)
b2ac5a92cf36382e8deea5661c1964566caf72b3Christian Maeder $(UNIX_O) $(MODSTUBS_O) $(LIBOPTS) $(DTRACESTUBS)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(LD) -r -o $@ $(OBJECTS) $(OBJS_DIR)/vers.o
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# Special rules for generating assym.h for inclusion in assembly files.
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian Maeder# CPU_OBJ now comprises of 2 object files which come from sun4 common
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian Maeder# and from architecture dependent code. OBJS_DIR is prepended where
328a85c807f2a95c3f147d10b05927eaf862ebebChristian Maeder# CPU_DIR is defined to allow for building multiple CPU_OBJ's
5b818f10e11fc79def1fdd5c8a080d64a6438d87Christian Maeder# The global lint target builds the kernel lint library (llib-lunix.ln)
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers# which is equivalent to a lint of /unix.o. Then all kernel modules for
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# this architecture are linted against the kernel lint library.
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# Note: lint errors in the kernel lint library will be repeated for
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# each module. It is important that the kernel lint library
140287998aa8592c9c403bd9e308e447ba92ae11Christian Maeder# be clean to keep the textual output to a reasonable level.
3554301a34639efb6c9961a8571775d0061284c9Christian Maeder @-$(ECHO) "\n$(UNIX): (library construction):"
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder# Include common targets.