Makefile revision f4b3ec61df05330d25f55a36b975b4d7519fdeb1
0N/A#
3909N/A# CDDL HEADER START
0N/A#
0N/A# The contents of this file are subject to the terms of the
0N/A# Common Development and Distribution License (the "License").
0N/A# You may not use this file except in compliance with the License.
2362N/A#
0N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2362N/A# or http://www.opensolaris.org/os/licensing.
0N/A# See the License for the specific language governing permissions
0N/A# and limitations under the License.
0N/A#
0N/A# When distributing Covered Code, include this CDDL HEADER in each
0N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0N/A# If applicable, add the following below this CDDL HEADER, with the
0N/A# fields enclosed by brackets "[]" replaced with your own identifying
0N/A# information: Portions Copyright [yyyy] [name of copyright owner]
0N/A#
0N/A# CDDL HEADER END
0N/A#
2362N/A#
2362N/A# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
2362N/A# Use is subject to license terms.
0N/A#
0N/A#ident "%Z%%M% %I% %E% SMI"
0N/A#
0N/A# This makefile drives the production of the ip driver
0N/A# kernel module.
0N/A#
0N/A# sparc architecture dependent
0N/A#
0N/A
0N/A#
0N/A# Path to the base of the uts directory tree (usually /usr/src/uts).
0N/A#
0N/AUTSBASE = ../..
0N/A
0N/A#
0N/A# Define the module and object file sets.
0N/A#
0N/AMODULE = ip
0N/AOBJECTS = $(IP_OBJS:%=$(OBJS_DIR)/%)
0N/ALINTS = $(IP_OBJS:%.o=$(LINTS_DIR)/%.ln)
0N/AROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
3280N/AROOTLINK = $(ROOT_STRMOD_DIR)/$(MODULE)
3280N/ACONF_SRCDIR = $(UTSBASE)/common/inet/ip
3280N/A
3280N/A#
3280N/A# Include common rules.
3280N/A#
3280N/Ainclude $(UTSBASE)/sparc/Makefile.sparc
3280N/A
3280N/A#
0N/A# Define targets
0N/A#
0N/AALL_TARGET = $(BINARY) $(SRC_CONFFILE)
0N/ALINT_TARGET = $(MODULE).lint
0N/AINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOTLINK) $(ROOT_CONFFILE)
0N/A
0N/A#
4632N/A# lint pass one enforcement
4639N/A#
4632N/ACFLAGS += $(CCVERBOSE)
4632N/ACFLAGS += -xinline=tcp_set_ws_value
4632N/A
0N/A#
4635N/A# For now, disable these lint checks; maintainers should endeavor
0N/A# to investigate and remove these for maximum lint coverage.
0N/A# Please do not carry these forward to new Makefiles.
4635N/A#
4635N/ALINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
0N/ALINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
0N/ALINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
0N/ALINTTAGS += -erroff=E_STATIC_UNUSED
0N/ALINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
0N/ALINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
2157N/A
1237N/A#
2157N/A# Depends on md5 and swrand (for SCTP). SCTP needs to depend on
3876N/A# swrand as it needs random numbers early on during boot before
3876N/A# kCF subsystem can load swrand.
3876N/A#
3876N/ALDFLAGS += -dy -Nmisc/md5 -Ncrypto/swrand -Nmisc/hook -Nmisc/neti
3876N/A
3876N/A#
3876N/A# Default build targets.
3876N/A#
2157N/A.KEEP_STATE:
4639N/A
3876N/Adef: $(DEF_DEPS)
2157N/A
3510N/Aall: $(ALL_DEPS)
2157N/A
4028N/Aclean: $(CLEAN_DEPS)
4028N/A
4028N/Aclobber: $(CLOBBER_DEPS)
4028N/A
4028N/Alint: $(LINT_DEPS)
2157N/A
0N/Amodlintlib: $(MODLINTLIB_DEPS)
0N/A
0N/Aclean.lint: $(CLEAN_LINT_DEPS)
0N/A
install: $(INSTALL_DEPS)
$(ROOTLINK): $(ROOT_STRMOD_DIR) $(ROOTMODULE)
-$(RM) $@; ln $(ROOTMODULE) $@
sis_check: sis_check.obj sis_check.debug
sis_check.obj: $(ALL_DEPS)
@$(GREP) -v '#' $(MODULE).objt-symbols.obj64 |$(GREP) . |$(SORT) -u \
> $(MODULE).symbols.tmp
@$(NM) obj64/$(MODULE) |$(GREP) OBJT |$(GREP) -v UNDEF | \
$(CUT) -d'|' -f8 |$(GREP) -v '^___const_' |$(SORT) -u \
> $(MODULE).symbols.tmp.new
-@$(DIFF) $(MODULE).symbols.tmp $(MODULE).symbols.tmp.new
sis_check.debug: $(ALL_DEPS)
@$(GREP) -v '#' $(MODULE).objt-symbols.debug64 |$(GREP) . |$(SORT) -u \
> $(MODULE).symbols.dbg.tmp
@$(NM) -n debug64/$(MODULE) |$(GREP) OBJT |$(GREP) -v UNDEF | \
$(CUT) -d'|' -f8 |$(GREP) -v '^___const_' |$(SORT) -u \
> $(MODULE).symbols.dbg.tmp.new
-@$(DIFF) $(MODULE).symbols.dbg.tmp $(MODULE).symbols.dbg.tmp.new
#
# 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