Makefile revision 02e56f3f1bfc8d9977bafb8cb5202f576dcded27
95881853170c1ca02b650717fd416a2c2a5e3568nd#
95881853170c1ca02b650717fd416a2c2a5e3568nd# CDDL HEADER START
95881853170c1ca02b650717fd416a2c2a5e3568nd#
b244bbf442a0aea3dc397b4d0d751f4716c5891dnd# The contents of this file are subject to the terms of the
95881853170c1ca02b650717fd416a2c2a5e3568nd# Common Development and Distribution License (the "License").
95881853170c1ca02b650717fd416a2c2a5e3568nd# You may not use this file except in compliance with the License.
db878466c5e95073429dda0bdd001f45e9486e16fielding#
db878466c5e95073429dda0bdd001f45e9486e16fielding# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
db878466c5e95073429dda0bdd001f45e9486e16fielding# or http://www.opensolaris.org/os/licensing.
db878466c5e95073429dda0bdd001f45e9486e16fielding# See the License for the specific language governing permissions
db878466c5e95073429dda0bdd001f45e9486e16fielding# and limitations under the License.
db878466c5e95073429dda0bdd001f45e9486e16fielding#
95881853170c1ca02b650717fd416a2c2a5e3568nd# When distributing Covered Code, include this CDDL HEADER in each
95881853170c1ca02b650717fd416a2c2a5e3568nd# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
95881853170c1ca02b650717fd416a2c2a5e3568nd# If applicable, add the following below this CDDL HEADER, with the
95881853170c1ca02b650717fd416a2c2a5e3568nd# fields enclosed by brackets "[]" replaced with your own identifying
95881853170c1ca02b650717fd416a2c2a5e3568nd# information: Portions Copyright [yyyy] [name of copyright owner]
95881853170c1ca02b650717fd416a2c2a5e3568nd#
95881853170c1ca02b650717fd416a2c2a5e3568nd# CDDL HEADER END
95881853170c1ca02b650717fd416a2c2a5e3568nd#
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568nd#
95881853170c1ca02b650717fd416a2c2a5e3568nd# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
95881853170c1ca02b650717fd416a2c2a5e3568nd# Use is subject to license terms.
95881853170c1ca02b650717fd416a2c2a5e3568nd#
95881853170c1ca02b650717fd416a2c2a5e3568nd# ident "%Z%%M% %I% %E% SMI"
95881853170c1ca02b650717fd416a2c2a5e3568nd#
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568nd#
95881853170c1ca02b650717fd416a2c2a5e3568nd# This makefile drives the production of the generic
95881853170c1ca02b650717fd416a2c2a5e3568nd# unix kernel module.
95881853170c1ca02b650717fd416a2c2a5e3568nd#
95881853170c1ca02b650717fd416a2c2a5e3568nd# sparc implementation architecture dependent
95881853170c1ca02b650717fd416a2c2a5e3568nd#
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568nd#
95881853170c1ca02b650717fd416a2c2a5e3568nd# Path to the base of the uts directory tree (usually /usr/src/uts).
95881853170c1ca02b650717fd416a2c2a5e3568nd#
95881853170c1ca02b650717fd416a2c2a5e3568ndUTSBASE = ../..
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568nd#
95881853170c1ca02b650717fd416a2c2a5e3568nd# Define the module and object file sets.
95881853170c1ca02b650717fd416a2c2a5e3568nd#
95881853170c1ca02b650717fd416a2c2a5e3568ndMODULE = genunix
95881853170c1ca02b650717fd416a2c2a5e3568ndGENUNIX = $(OBJS_DIR)/$(MODULE)
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568ndOBJECTS = $(GENUNIX_OBJS:%=$(OBJS_DIR)/%) \
95881853170c1ca02b650717fd416a2c2a5e3568nd $(NOT_YET_KMODS:%=$(OBJS_DIR)/%)
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568ndLINTS = $(GENUNIX_OBJS:%.o=$(LINTS_DIR)/%.ln) \
3801923310ec61f4911e0bb4487a0b05d031db7btakashi $(NOT_YET_KMODS:%.o=$(LINTS_DIR)/%.ln)
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568ndROOTMODULE = $(ROOT_PSM_KERN_DIR)/$(MODULE)
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568ndPLATFORM = sun4v
95881853170c1ca02b650717fd416a2c2a5e3568ndLIBGEN = $(OBJS_DIR)/libgenunix.so
95881853170c1ca02b650717fd416a2c2a5e3568ndLIBSTUBS = $(GENSTUBS_OBJS:%=$(OBJS_DIR)/%)
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568nd#
95881853170c1ca02b650717fd416a2c2a5e3568nd# Include common rules.
95881853170c1ca02b650717fd416a2c2a5e3568nd#
95881853170c1ca02b650717fd416a2c2a5e3568ndinclude $(UTSBASE)/sparc/Makefile.sparc
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568nd#
95881853170c1ca02b650717fd416a2c2a5e3568nd# Define targets
95881853170c1ca02b650717fd416a2c2a5e3568nd#
95881853170c1ca02b650717fd416a2c2a5e3568ndALL_TARGET = $(LIBGEN)
95881853170c1ca02b650717fd416a2c2a5e3568ndLINT_TARGET = $(MODULE).lint
95881853170c1ca02b650717fd416a2c2a5e3568ndINSTALL_TARGET = $(GENUNIX) $(ROOTMODULE)
95881853170c1ca02b650717fd416a2c2a5e3568nd
e6a5e513286e0fc065723a86b3d8a844e193be51humbedooh#
95881853170c1ca02b650717fd416a2c2a5e3568nd# Override defaults
95881853170c1ca02b650717fd416a2c2a5e3568nd#
95881853170c1ca02b650717fd416a2c2a5e3568ndCLEANFILES += $(LIBSTUBS) $(LIBGEN)
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568ndLINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/lint-libs/$(OBJS_DIR)
95881853170c1ca02b650717fd416a2c2a5e3568ndLINT_LIB = $(LINT_LIB_DIR)/llib-lunix.ln
95881853170c1ca02b650717fd416a2c2a5e3568ndGEN_LINT_LIB =
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568ndBINARY =
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568ndCLOBBERFILES += $(GENUNIX)
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568nd#
95881853170c1ca02b650717fd416a2c2a5e3568nd# Non-patch genunix builds merge a version of the ip module called ipctf. This
95881853170c1ca02b650717fd416a2c2a5e3568nd# is to ensure that the common network-related types are included in genunix and
95881853170c1ca02b650717fd416a2c2a5e3568nd# can thus be uniquified out of other modules. We don't want to do this for
95881853170c1ca02b650717fd416a2c2a5e3568nd# patch builds, since we can't guarantee that ip and genunix will be in the same
95881853170c1ca02b650717fd416a2c2a5e3568nd# patch.
95881853170c1ca02b650717fd416a2c2a5e3568nd#
95881853170c1ca02b650717fd416a2c2a5e3568ndIPCTF_TARGET = $(IPCTF)
95881853170c1ca02b650717fd416a2c2a5e3568nd$(PATCH_BUILD)IPCTF_TARGET =
95881853170c1ca02b650717fd416a2c2a5e3568nd
f37877a589391f0c8cf7fe41933039cb199f8896nd#
95881853170c1ca02b650717fd416a2c2a5e3568nd# lint pass one enforcement
95881853170c1ca02b650717fd416a2c2a5e3568nd#
95881853170c1ca02b650717fd416a2c2a5e3568ndCFLAGS += $(CCVERBOSE)
95881853170c1ca02b650717fd416a2c2a5e3568ndCPPFLAGS += -I$(SRC)/common
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568nd#
95881853170c1ca02b650717fd416a2c2a5e3568nd# Default build targets.
95881853170c1ca02b650717fd416a2c2a5e3568nd#
95881853170c1ca02b650717fd416a2c2a5e3568nd.KEEP_STATE:
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568nd.PARALLEL: $(LIBSTUBS)
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568nddef: $(DEF_DEPS)
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568ndall: $(ALL_DEPS)
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568ndclean: $(CLEAN_DEPS)
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568ndclobber: $(CLOBBER_DEPS)
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568ndlint: $(LINT_DEPS)
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568ndmodlintlib: $(MODLINTLIB_DEPS)
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568ndclean.lint: $(CLEAN_LINT_DEPS)
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568ndinstall: $(INSTALL_DEPS)
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568nd$(LIBGEN): $(GENUNIX) $(LIBSTUBS)
95881853170c1ca02b650717fd416a2c2a5e3568nd $(BUILD.SO) $(GENUNIX) $(LIBSTUBS)
95881853170c1ca02b650717fd416a2c2a5e3568nd
95881853170c1ca02b650717fd416a2c2a5e3568nd$(IPCTF_TARGET) ipctf_target: FRC
95881853170c1ca02b650717fd416a2c2a5e3568nd @cd $(IPDRV_DIR); pwd; $(MAKE) ipctf.$(OBJS_DIR)
95881853170c1ca02b650717fd416a2c2a5e3568nd @pwd
$(GENUNIX): $(IPCTF_TARGET) $(OBJECTS)
$(LD) -r $(LDFLAGS) -o $@ $(OBJECTS)
$(CTFMERGE_GENUNIX_MERGE)
$(POST_PROCESS)
$(OBJECTS): $(OBJS_DIR)
#
# Include common targets.
#
include $(UTSBASE)/sparc/Makefile.targ
#
# Include workarounds.
#
include $(UTSBASE)/$(PLATFORM)/Makefile.workarounds
ALL_DEFS += $(WORKAROUND_DEFS)