Makefile revision b885580b43755ee4ea1e280b85428893d2ba9291
229N/A#
229N/A# CDDL HEADER START
229N/A#
229N/A# The contents of this file are subject to the terms of the
229N/A# Common Development and Distribution License (the "License").
229N/A# You may not use this file except in compliance with the License.
229N/A#
229N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
229N/A# or http://www.opensolaris.org/os/licensing.
229N/A# See the License for the specific language governing permissions
229N/A# and limitations under the License.
229N/A#
229N/A# When distributing Covered Code, include this CDDL HEADER in each
229N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
229N/A# If applicable, add the following below this CDDL HEADER, with the
229N/A# fields enclosed by brackets "[]" replaced with your own identifying
229N/A# information: Portions Copyright [yyyy] [name of copyright owner]
229N/A#
229N/A# CDDL HEADER END
229N/A#
5680N/A
229N/A#
5680N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
5680N/A# Use is subject to license terms.
5680N/A#
229N/A
229N/A#
1244N/A# This makefile drives the production of the generic
229N/A# unix kernel module.
229N/A#
618N/A# sparc implementation architecture dependent
229N/A#
1258N/A
229N/A#
5680N/A# Path to the base of the uts directory tree (usually /usr/src/uts).
5685N/A#
229N/AUTSBASE = ../..
229N/A
229N/A#
229N/A# Define the module and object file sets.
229N/A#
229N/AMODULE = genunix
229N/AGENUNIX = $(OBJS_DIR)/$(MODULE)
229N/A
229N/AOBJECTS = $(GENUNIX_OBJS:%=$(OBJS_DIR)/%) \
1522N/A $(NOT_YET_KMODS:%=$(OBJS_DIR)/%)
1522N/A
1522N/ALINTS = $(GENUNIX_OBJS:%.o=$(LINTS_DIR)/%.ln) \
1938N/A $(NOT_YET_KMODS:%.o=$(LINTS_DIR)/%.ln)
1938N/A
4250N/AROOTMODULE = $(ROOT_PSM_KERN_DIR)/$(MODULE)
229N/A
5680N/APLATFORM = sun4u
229N/ALIBGEN = $(OBJS_DIR)/libgenunix.so
3817N/ALIBSTUBS = $(GENSTUBS_OBJS:%=$(OBJS_DIR)/%)
#
# Include common rules.
#
include $(UTSBASE)/sparc/Makefile.sparc
#
# Define targets
#
ALL_TARGET = $(LIBGEN)
LINT_TARGET = $(MODULE).lint
INSTALL_TARGET = $(GENUNIX) $(ROOTMODULE)
#
# Override defaults
#
CLEANFILES += $(LIBSTUBS) $(LIBGEN)
LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/lint-libs/$(OBJS_DIR)
LINT_LIB = $(LINT_LIB_DIR)/llib-lunix.ln
GEN_LINT_LIB =
BINARY =
CLOBBERFILES += $(GENUNIX)
#
# Non-patch genunix builds merge a version of the ip module called ipctf. This
# is to ensure that the common network-related types are included in genunix and
# can thus be uniquified out of other modules. We don't want to do this for
# patch builds, since we can't guarantee that ip and genunix will be in the same
# patch.
#
IPCTF_TARGET = $(IPCTF)
$(PATCH_BUILD)IPCTF_TARGET =
#
# lint pass one enforcement
#
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -I$(SRC)/common
CPPFLAGS += -I$(SRC)/uts/common/fs/zfs
INC_PATH += -I$(UTSBASE)/sun4
#
# For now, disable these lint checks; maintainers should endeavor
# to investigate and remove these for maximum lint coverage.
# Please do not carry these forward to new Makefiles.
#
LINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
LINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
LINTTAGS += -erroff=E_STATIC_UNUSED
LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
#
# Ensure that lint sees 'struct cpu' containing a fully declared
# embedded 'struct machcpu'
#
LINTFLAGS += -D_MACHDEP -I../../sun4 -I../../$(PLATFORM) -I../../sfmmu
# Default build targets.
#
.KEEP_STATE:
.PARALLEL: $(LIBSTUBS)
def: $(DEF_DEPS)
all: $(ALL_DEPS)
clean: $(CLEAN_DEPS)
clobber: $(CLOBBER_DEPS)
lint: $(LINT_DEPS)
modlintlib: $(MODLINTLIB_DEPS)
clean.lint: $(CLEAN_LINT_DEPS)
install: $(INSTALL_DEPS)
install_h:
$(LIBGEN): $(GENUNIX) $(LIBSTUBS)
$(BUILD.SO) $(GENUNIX) $(LIBSTUBS)
$(IPCTF_TARGET) ipctf_target: FRC
@cd $(IPDRV_DIR); pwd; $(MAKE) ipctf.$(OBJS_DIR)
@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 sun4u workarounds.
#
include $(UTSBASE)/sun4u/Makefile.workarounds
ALL_DEFS += $(WORKAROUND_DEFS)