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