Makefile revision b5a2d8455dfa3190fc977c4bec53e91c99012767
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# CDDL HEADER START
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# The contents of this file are subject to the terms of the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Common Development and Distribution License (the "License").
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# You may not use this file except in compliance with the License.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# or http://www.opensolaris.org/os/licensing.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# See the License for the specific language governing permissions
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# and limitations under the License.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# When distributing Covered Code, include this CDDL HEADER in each
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# If applicable, add the following below this CDDL HEADER, with the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# fields enclosed by brackets "[]" replaced with your own identifying
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# CDDL HEADER END
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Use is subject to license terms.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# This makefile drives the production of the sha2 crypto kernel module.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# intel architecture dependent
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Path to the base of the uts directory tree (usually /usr/src/uts).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncUTSBASE = ../..
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCOMDIR = $(COMMONBASE)/crypto
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Define the module and object file sets.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncMODULE = sha2
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncLINTS = $(SHA2_OBJS:%.o=$(LINTS_DIR)/%.ln)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncSHA2_OBJS_32 =
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncSHA2_OBJS_64 = sha512-x86_64.o sha256-x86_64.o
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncSHA2_OBJS += $(SHA2_OBJS_$(CLASS))
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncOBJECTS = $(SHA2_OBJS:%=$(OBJS_DIR)/%)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncROOTMODULE = $(ROOT_CRYPTO_DIR)/$(MODULE)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncROOTLINK = $(ROOT_MISC_DIR)/$(MODULE)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Include common rules.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncinclude $(UTSBASE)/intel/Makefile.intel
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Override defaults
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCLEANFILES += sha512-x86_64.s sha256-x86_64.s
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Define targets
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncALL_TARGET = $(BINARY)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncLINT_TARGET = $(MODULE).lint
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOTLINK)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Linkage dependencies
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncLDFLAGS += -dy -Nmisc/kcf
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCFLAGS += -I$(COMDIR)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncLINTFLAGS += -I$(COMDIR)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# For now, disable these lint checks; maintainers should endeavor
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# to investigate and remove these for maximum lint coverage.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Please do not carry these forward to new Makefiles.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncLINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Default build targets.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync.KEEP_STATE:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncdef: $(DEF_DEPS)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncall: $(ALL_DEPS)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncclean: $(CLEAN_DEPS)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncclobber: $(CLOBBER_DEPS)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynclint: $(LINT_DEPS)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncmodlintlib: $(MODLINTLIB_DEPS)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncclean.lint: $(CLEAN_LINT_DEPS)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncinstall: $(INSTALL_DEPS)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync$(ROOTLINK): $(ROOT_MISC_DIR) $(ROOTMODULE)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync -$(RM) $@; ln $(ROOTMODULE) $@
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Include common targets.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncinclude $(UTSBASE)/intel/Makefile.targ
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync$(OBJS_DIR)/%.o: %.s
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync $(COMPILE.s) -o $@ ${@F:.o=.s}
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync $(POST_PROCESS_O)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync$(OBJS_DIR)/%.ln: %.s
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @($(LHEAD) $(LINT.c) ${@F:.ln=.s} $(LTAIL))
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncsha512-x86_64.s: $(COMDIR)/sha2/amd64/sha512-x86_64.pl
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync $(PERL) $? $@
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncsha256-x86_64.s: $(COMDIR)/sha2/amd64/sha512-x86_64.pl
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync $(PERL) $? $@
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync