Makefile revision 7014882c6a3672fd0e5d60200af8643ae53c5928
369N/A#
369N/A# CDDL HEADER START
369N/A#
369N/A# The contents of this file are subject to the terms of the
369N/A# Common Development and Distribution License (the "License").
369N/A# You may not use this file except in compliance with the License.
369N/A#
369N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
369N/A# or http://www.opensolaris.org/os/licensing.
369N/A# See the License for the specific language governing permissions
369N/A# and limitations under the License.
369N/A#
369N/A# When distributing Covered Code, include this CDDL HEADER in each
369N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
369N/A# If applicable, add the following below this CDDL HEADER, with the
369N/A# fields enclosed by brackets "[]" replaced with your own identifying
369N/A# information: Portions Copyright [yyyy] [name of copyright owner]
369N/A#
369N/A# CDDL HEADER END
369N/A#
844N/A#
369N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
369N/A# Use is subject to license terms.
369N/A#
369N/A#
369N/A# This makefile drives the production of the ip driver
369N/A# kernel module.
369N/A#
844N/A# sparc architecture dependent
844N/A#
369N/A#
369N/A# Path to the base of the uts directory tree (usually /usr/src/uts).
369N/A#
369N/AUTSBASE = ../..
369N/A
369N/A#
369N/A# Define the module and object file sets.
369N/A#
369N/AMODULE = ip
369N/AOBJECTS = $(IP_OBJS:%=$(OBJS_DIR)/%)
369N/ALINTS = $(IP_OBJS:%.o=$(LINTS_DIR)/%.ln)
369N/AROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
369N/AROOTLINK = $(ROOT_STRMOD_DIR)/$(MODULE)
369N/ACONF_SRCDIR = $(UTSBASE)/common/inet/ip
369N/A
369N/A#
369N/A# Include common rules.
369N/A#
369N/Ainclude $(UTSBASE)/sparc/Makefile.sparc
369N/A
369N/A#
369N/A# Define targets
369N/A#
369N/AALL_TARGET = $(BINARY) $(SRC_CONFFILE)
369N/ALINT_TARGET = $(MODULE).lint
369N/AINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOTLINK) $(ROOT_CONFFILE)
369N/A
369N/A#
369N/A# lint pass one enforcement
369N/A#
369N/ACFLAGS += $(CCVERBOSE)
369N/ACFLAGS += -xinline=tcp_set_ws_value
369N/A#
369N/A# To get the BPF header files included by ipnet.h
369N/A#
369N/AINC_PATH += -I$(UTSBASE)/common/io/bpf
369N/A
369N/A#
369N/A# For now, disable these lint checks; maintainers should endeavor
369N/A# to investigate and remove these for maximum lint coverage.
369N/A# Please do not carry these forward to new Makefiles.
369N/A#
369N/ALINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
369N/ALINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
369N/ALINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
369N/ALINTTAGS += -erroff=E_STATIC_UNUSED
369N/ALINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
369N/ALINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
369N/A
369N/ACERRWARN += -_gcc=-Wno-parentheses
369N/ACERRWARN += -_gcc=-Wno-unused-label
369N/ACERRWARN += -_gcc=-Wno-unused-function
369N/ACERRWARN += -_gcc=-Wno-unused-variable
369N/ACERRWARN += -_gcc=-Wno-switch
369N/ACERRWARN += -_gcc=-Wno-uninitialized
369N/ACERRWARN += -_gcc=-Wno-type-limits
369N/A
369N/A#
369N/A# Depends on md5 and swrand (for SCTP). SCTP needs to depend on
369N/A# swrand as it needs random numbers early on during boot before
# kCF subsystem can load swrand.
#
LDFLAGS += -dy -Nmisc/md5 -Ncrypto/swrand -Nmisc/hook -Nmisc/neti
#
# Default build targets.
#
.KEEP_STATE:
def: $(DEF_DEPS)
all: $(ALL_DEPS) $(SISCHECK_DEPS)
clean: $(CLEAN_DEPS) $(SISCLEAN_DEPS)
clobber: $(CLOBBER_DEPS) $(SISCLEAN_DEPS)
lint: $(LINT_DEPS)
modlintlib: $(MODLINTLIB_DEPS)
clean.lint: $(CLEAN_LINT_DEPS)
install: $(INSTALL_DEPS) $(SISCHECK_DEPS)
$(ROOTLINK): $(ROOT_STRMOD_DIR) $(ROOTMODULE)
-$(RM) $@; ln $(ROOTMODULE) $@
#
# Include common targets.
#
include $(UTSBASE)/sparc/Makefile.targ
#
# The ip CTF data is merged into the genunix module because these types are
# complex and heavily shared. The genunix build will execute one of the
# rules below to create an archive, ipctf.a, containing the ip objects. The
# real ip will be uniquified against genunix later in the build, and will
# emerge containing very few types.
#
$(OBJS_DIR)/ipctf.a: $(OBJECTS)
-$(RM) $@
$(AR) -r $@ $(OBJECTS)
$(OBJECTS): $(OBJS_DIR)
CLOBBERFILES += $(OBJS_DIR)/ipctf.a
ipctf.obj64: FRC
@BUILD_TYPE=OBJ64 VERSION='$(VERSION)' $(MAKE) obj64/ipctf.a
ipctf.debug64: FRC
@BUILD_TYPE=DBG64 VERSION='$(VERSION)' $(MAKE) debug64/ipctf.a