Makefile revision 7014882c6a3672fd0e5d60200af8643ae53c5928
5563N/A#
5563N/A# CDDL HEADER START
5563N/A#
5563N/A# The contents of this file are subject to the terms of the
5563N/A# Common Development and Distribution License (the "License").
5563N/A# You may not use this file except in compliance with the License.
5563N/A#
5563N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5563N/A# or http://www.opensolaris.org/os/licensing.
5563N/A# See the License for the specific language governing permissions
5563N/A# and limitations under the License.
5563N/A#
5563N/A# When distributing Covered Code, include this CDDL HEADER in each
5563N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5563N/A# If applicable, add the following below this CDDL HEADER, with the
5563N/A# fields enclosed by brackets "[]" replaced with your own identifying
5563N/A# information: Portions Copyright [yyyy] [name of copyright owner]
5563N/A#
5563N/A# CDDL HEADER END
5563N/A#
5563N/A
5563N/A#
5563N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
5563N/A# Use is subject to license terms.
5563N/A#
5563N/A
5563N/A#
5563N/A# This makefile drives the production of the generic
5563N/A# unix kernel module.
5563N/A#
5563N/A# x86 implementation architecture dependent
5563N/A#
5563N/A
5563N/A#
5563N/A# Path to the base of the uts directory tree (usually /usr/src/uts).
5563N/A#
5563N/AUTSBASE = ../..
5563N/A
5563N/A#
5563N/A# Define the module and object file sets.
5563N/A#
5563N/AMODULE = genunix
5563N/AGENUNIX = $(OBJS_DIR)/$(MODULE)
5563N/A
5563N/AOBJECTS = $(GENUNIX_OBJS:%=$(OBJS_DIR)/%) \
5563N/A $(NOT_YET_KMODS:%=$(OBJS_DIR)/%)
5563N/A
5563N/ALINTS = $(GENUNIX_OBJS:%.o=$(LINTS_DIR)/%.ln) \
5563N/A $(NOT_YET_KMODS:%.o=$(LINTS_DIR)/%.ln)
5563N/A
5563N/AROOTMODULE = $(ROOT_KERN_DIR)/$(MODULE)
5563N/A
5563N/ALIBGEN = $(OBJS_DIR)/libgenunix.so
5563N/ALIBSTUBS = $(GENSTUBS_OBJS:%=$(OBJS_DIR)/%)
5563N/A
5563N/A#
5563N/A# Include common rules.
5563N/A#
5563N/Ainclude $(UTSBASE)/intel/Makefile.intel
5563N/A
5563N/A#
5563N/A# Define targets
5563N/A#
5563N/AALL_TARGET = $(LIBGEN)
5563N/ALINT_TARGET = $(MODULE).lint
5563N/AINSTALL_TARGET = $(GENUNIX) $(ROOTMODULE)
5563N/A
5563N/A#
5563N/A# Overrides
5563N/A#
5563N/ACLEANFILES += $(LIBSTUBS) $(LIBGEN)
5563N/ABINARY =
5563N/A
5563N/A#
5563N/A# Non-patch genunix builds merge a version of the ip module called ipctf. This
5563N/A# is to ensure that the common network-related types are included in genunix and
5563N/A# can thus be uniquified out of other modules. We don't want to do this for
5563N/A# patch builds, since we can't guarantee that ip and genunix will be in the same
5563N/A# patch.
5563N/A#
5563N/AIPCTF_TARGET = $(IPCTF)
5563N/A$(PATCH_BUILD)IPCTF_TARGET =
5563N/A
5563N/ACPPFLAGS += -I$(SRC)/common
5563N/ACPPFLAGS += -I$(SRC)/uts/common/fs/zfs
5563N/A
5563N/ACPPFLAGS += -I$(UTSBASE)/i86pc
5563N/A
5563N/A#
5563N/A# For now, disable these lint checks; maintainers should endeavor
5563N/A# to investigate and remove these for maximum lint coverage.
5563N/A# Please do not carry these forward to new Makefiles.
5563N/A#
5563N/ALINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
5563N/ALINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
5563N/ALINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
5563N/ALINTTAGS += -erroff=E_STATIC_UNUSED
5563N/ALINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
5563N/ALINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
5563N/A
5563N/ACERRWARN += -_gcc=-Wno-unused-label
5563N/ACERRWARN += -_gcc=-Wno-unused-variable
5563N/ACERRWARN += -_gcc=-Wno-unused-value
5563N/ACERRWARN += -_gcc=-Wno-unused-function
5563N/ACERRWARN += -_gcc=-Wno-parentheses
5563N/ACERRWARN += -_gcc=-Wno-switch
5563N/ACERRWARN += -_gcc=-Wno-type-limits
5563N/ACERRWARN += -_gcc=-Wno-uninitialized
5563N/ACERRWARN += -_gcc=-Wno-clobbered
5563N/ACERRWARN += -_gcc=-Wno-empty-body
5563N/A
5563N/A#
5563N/A# Ensure that lint sees 'struct cpu' containing a fully declared
# embedded 'struct machcpu'
#
LINTFLAGS += -D_MACHDEP -I../../i86pc
#
# Default build targets.
#
.KEEP_STATE:
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)
$(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)
#
# Include common targets.
#
include $(UTSBASE)/intel/Makefile.targ
#
# Software workarounds for hardware "features".
#
include $(UTSBASE)/i86pc/Makefile.workarounds
ALL_DEFS += $(WORKAROUND_DEFS)
#
# Override.
#
$(MODULE).lint := GEN_LINT_LIB =