Print this page
5072961 Need an optimized MD5 implementation for amd64

@@ -19,14 +19,14 @@
 # CDDL HEADER END
 #
 #
 # uts/intel/md5/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.9     06/11/02 SMI"
+#ident  "@(#)Makefile   1.10    08/01/02 SMI"
 #
 #       This makefile drives the production of the md5 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/md5
 
 #
 #       Define the module and object file sets.
 #
 MODULE          = md5
-OBJECTS         = $(MD5_OBJS:%=$(OBJS_DIR)/%)
 LINTS           = $(MD5_OBJS:%.o=$(LINTS_DIR)/%.ln)
+MD5_OBJS_32     =
+MD5_OBJS_64     = md5_amd64.o
+MD5_OBJS        += $(MD5_OBJS_$(CLASS))
+OBJECTS         = $(MD5_OBJS:%=$(OBJS_DIR)/%)
 ROOTMODULE      = $(ROOT_CRYPTO_DIR)/$(MODULE)
 ROOTLINK        = $(ROOT_MISC_DIR)/$(MODULE)
 
 #
 #       Include common rules.

@@ -51,12 +55,12 @@
 include $(UTSBASE)/intel/Makefile.intel
 
 #
 #       Override defaults
 #
+CLEANFILES += md5_amd64.s
 
-
 #
 #       Define targets
 #
 ALL_TARGET      = $(BINARY)
 LINT_TARGET     = $(MODULE).lint

@@ -101,5 +105,15 @@
 
 #
 #       Include common targets.
 #
 include $(UTSBASE)/intel/Makefile.targ
+
+md5_amd64.s: $(COMDIR)/amd64/md5_amd64.pl
+        $(PERL) $? $@
+
+$(OBJS_DIR)/md5_amd64.o: md5_amd64.s
+        $(COMPILE.s) -o $@ md5_amd64.s
+        $(POST_PROCESS_O)
+
+$(OBJS_DIR)/md5_amd64.ln: md5_amd64.s
+        @($(LHEAD) $(LINT.c) md5_amd64.s $(LTAIL))