Print this page
6662791 Need a SHA1 implementation optimized for 64-bit x86
@@ -19,14 +19,14 @@
# CDDL HEADER END
#
#
# uts/intel/sha1/Makefile
#
-# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "@(#)Makefile 1.6 06/11/02 SMI"
+# ident "@(#)Makefile 1.7 08/03/02 SMI"
#
# This makefile drives the production of the sha1 crypto kernel module.
#
# intel architecture dependent
#
@@ -33,17 +33,21 @@
#
# Path to the base of the uts directory tree (usually /usr/src/uts).
#
UTSBASE = ../..
+COMDIR = $(COMMONBASE)/crypto/sha1
#
# Define the module and object file sets.
#
MODULE = sha1
-OBJECTS = $(SHA1_OBJS:%=$(OBJS_DIR)/%)
LINTS = $(SHA1_OBJS:%.o=$(LINTS_DIR)/%.ln)
+SHA1_OBJS_32 =
+SHA1_OBJS_64 = sha1-x86_64.o
+SHA1_OBJS += $(SHA1_OBJS_$(CLASS))
+OBJECTS = $(SHA1_OBJS:%=$(OBJS_DIR)/%)
ROOTMODULE = $(ROOT_CRYPTO_DIR)/$(MODULE)
ROOTLINK = $(ROOT_MISC_DIR)/$(MODULE)
#
# Include common rules.
@@ -51,10 +55,11 @@
include $(UTSBASE)/intel/Makefile.intel
#
# Override defaults
#
+CLEANFILES += sha1-x86_64.s
#
# For now, disable these lint checks; maintainers should endeavor
# to investigate and remove these for maximum lint coverage.
# Please do not carry these forward to new Makefiles.
@@ -96,5 +101,15 @@
#
# Include common targets.
#
include $(UTSBASE)/intel/Makefile.targ
+
+$(OBJS_DIR)/sha1-x86_64.o: sha1-x86_64.s
+ $(COMPILE.s) -o $@ ${@F:.o=.s}
+ $(POST_PROCESS_O)
+
+$(OBJS_DIR)/sha1-x86_64.ln: sha1-x86_64.s
+ @($(LHEAD) $(LINT.c) ${@F:.ln=.s} $(LTAIL))
+
+sha1-x86_64.s: $(COMDIR)/amd64/sha1-x86_64.pl
+ $(PERL) $? $@