xref: /illumos-gate/usr/src/uts/intel/sha1/Makefile (revision 48bc00d6)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# uts/intel/sha1/Makefile
23#
24# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27#
28#	This makefile drives the production of the sha1 crypto kernel module.
29#
30#	intel architecture dependent
31#
32
33#
34#	Path to the base of the uts directory tree (usually /usr/src/uts).
35#
36UTSBASE	= ../..
37COMDIR = $(COMMONBASE)/crypto
38
39#
40#	Define the module and object file sets.
41#
42MODULE		= sha1
43LINTS		= $(SHA1_OBJS:%.o=$(LINTS_DIR)/%.ln)
44SHA1_OBJS_32	=
45SHA1_OBJS_64	= sha1-x86_64.o
46SHA1_OBJS	+= $(SHA1_OBJS_$(CLASS))
47OBJECTS		= $(SHA1_OBJS:%=$(OBJS_DIR)/%)
48ROOTMODULE	= $(ROOT_CRYPTO_DIR)/$(MODULE)
49ROOTLINK	= $(ROOT_MISC_DIR)/$(MODULE)
50
51#
52#	Include common rules.
53#
54include $(UTSBASE)/intel/Makefile.intel
55
56#
57#	Override defaults
58#
59CLEANFILES += sha1-x86_64.s
60
61#
62# Linkage dependencies
63#
64LDFLAGS += -dy -Nmisc/kcf
65
66CFLAGS += -I$(COMDIR)
67LINTFLAGS	+= -I$(COMDIR)
68
69#
70# For now, disable these lint checks; maintainers should endeavor
71# to investigate and remove these for maximum lint coverage.
72# Please do not carry these forward to new Makefiles.
73#
74LINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
75LINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
76
77
78#
79#	Define targets
80#
81ALL_TARGET	= $(BINARY)
82LINT_TARGET	= $(MODULE).lint
83INSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOTLINK)
84
85#
86#	Default build targets.
87#
88.KEEP_STATE:
89
90def:		$(DEF_DEPS)
91
92all:		$(ALL_DEPS)
93
94clean:		$(CLEAN_DEPS)
95
96clobber:	$(CLOBBER_DEPS)
97
98lint:		$(LINT_DEPS)
99
100modlintlib:	$(MODLINTLIB_DEPS)
101
102clean.lint:	$(CLEAN_LINT_DEPS)
103
104install:	$(INSTALL_DEPS)
105
106$(ROOTLINK):	$(ROOT_MISC_DIR) $(ROOTMODULE)
107	-$(RM) $@; ln $(ROOTMODULE) $@
108
109#
110#	Include common targets.
111#
112include $(UTSBASE)/intel/Makefile.targ
113
114$(OBJS_DIR)/sha1-x86_64.o: sha1-x86_64.s
115	$(COMPILE.s) -o $@ ${@F:.o=.s}
116	$(POST_PROCESS_O)
117
118$(OBJS_DIR)/sha1-x86_64.ln: sha1-x86_64.s
119	@($(LHEAD) $(LINT.c) ${@F:.ln=.s} $(LTAIL))
120
121sha1-x86_64.s: $(COMDIR)/sha1/amd64/sha1-x86_64.pl
122	$(PERL) $? $@
123