xref: /illumos-gate/usr/src/uts/intel/ecc/Makefile (revision 82d0151a)
1f9fbec18Smcpowers#
2f9fbec18Smcpowers# CDDL HEADER START
3f9fbec18Smcpowers#
4f9fbec18Smcpowers# The contents of this file are subject to the terms of the
5f9fbec18Smcpowers# Common Development and Distribution License (the "License").
6f9fbec18Smcpowers# You may not use this file except in compliance with the License.
7f9fbec18Smcpowers#
8f9fbec18Smcpowers# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9f9fbec18Smcpowers# or http://www.opensolaris.org/os/licensing.
10f9fbec18Smcpowers# See the License for the specific language governing permissions
11f9fbec18Smcpowers# and limitations under the License.
12f9fbec18Smcpowers#
13f9fbec18Smcpowers# When distributing Covered Code, include this CDDL HEADER in each
14f9fbec18Smcpowers# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15f9fbec18Smcpowers# If applicable, add the following below this CDDL HEADER, with the
16f9fbec18Smcpowers# fields enclosed by brackets "[]" replaced with your own identifying
17f9fbec18Smcpowers# information: Portions Copyright [yyyy] [name of copyright owner]
18f9fbec18Smcpowers#
19f9fbec18Smcpowers# CDDL HEADER END
20f9fbec18Smcpowers#
21f9fbec18Smcpowers#
22cd277642SGarrett D'Amore# Copyright 2014 Garrett D'Amore <garrett@damore.org>
23cd277642SGarrett D'Amore#
24b5a2d845SHai-May Chao# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25f9fbec18Smcpowers# Use is subject to license terms.
26f9fbec18Smcpowers#
27b6b206fcSJohn Levon# Copyright (c) 2018, Joyent, Inc.
28f9fbec18Smcpowers
29f9fbec18Smcpowers#
30f9fbec18Smcpowers#	Path to the base of the uts directory tree (usually /usr/src/uts).
31f9fbec18Smcpowers#
32f9fbec18SmcpowersUTSBASE	= ../..
33f9fbec18SmcpowersCOM1_DIR = $(COMMONBASE)/mpi
34b5a2d845SHai-May ChaoCOM2_DIR = $(COMMONBASE)/crypto
35f9fbec18Smcpowers
36f9fbec18Smcpowers#
37f9fbec18Smcpowers#	Define the module and object file sets.
38f9fbec18Smcpowers#
39f9fbec18SmcpowersMODULE		= ecc
40f9fbec18SmcpowersOBJECTS		= $(ECCPROV_OBJS:%=$(OBJS_DIR)/%)
41f9fbec18SmcpowersROOTMODULE	= $(ROOT_CRYPTO_DIR)/$(MODULE)
42f9fbec18Smcpowers
43f9fbec18Smcpowers#
44f9fbec18Smcpowers#	Include common rules.
45f9fbec18Smcpowers#
46f9fbec18Smcpowersinclude $(UTSBASE)/intel/Makefile.intel
47f9fbec18Smcpowers
48f9fbec18Smcpowers#
49f9fbec18Smcpowers#	Define targets
50f9fbec18Smcpowers#
51f9fbec18SmcpowersALL_TARGET	= $(BINARY)
52f9fbec18SmcpowersINSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
53f9fbec18Smcpowers
54f9fbec18Smcpowers#
55f9fbec18Smcpowers# Linkage dependencies
56f9fbec18Smcpowers#
57*82d0151aSRichard LoweLDFLAGS += -Nmisc/kcf
58f9fbec18Smcpowers
59b5a2d845SHai-May ChaoCPPFLAGS	+= -I$(COM1_DIR) -I$(COM2_DIR)
60f9fbec18Smcpowers
61f9fbec18SmcpowersCFLAGS		+= -DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B
62f9fbec18Smcpowers
63f9fbec18Smcpowers
647014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-switch
657014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-label
66d3b5f563SJohn LevonCERRWARN	+= $(CNOWARN_UNINIT)
677014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-type-limits
687014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-empty-body
697014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-variable
707014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-parentheses
717014882cSRichard Lowe
72b6b206fcSJohn Levon# false positive
73b6b206fcSJohn Levon$(OBJS_DIR)/ecdecode.o := SMOFF += assign_vs_compare
74b6b206fcSJohn Levon$(OBJS_DIR)/ec.o := SMOFF += assign_vs_compare
75b6b206fcSJohn Levon
76b6b206fcSJohn LevonSMOFF += indenting,all_func_returns
77b6b206fcSJohn Levon
78f9fbec18Smcpowers#
79f9fbec18Smcpowers#	Default build targets.
80f9fbec18Smcpowers#
81f9fbec18Smcpowers.KEEP_STATE:
82f9fbec18Smcpowers
83f9fbec18Smcpowersdef:		$(DEF_DEPS)
84f9fbec18Smcpowers
85f9fbec18Smcpowersall:		$(ALL_DEPS)
86f9fbec18Smcpowers
87f9fbec18Smcpowersclean:		$(CLEAN_DEPS)
88f9fbec18Smcpowers
89f9fbec18Smcpowersclobber:	$(CLOBBER_DEPS)
90f9fbec18Smcpowers
91f9fbec18Smcpowersinstall:	$(INSTALL_DEPS)
92f9fbec18Smcpowers
93f9fbec18Smcpowers#
94f9fbec18Smcpowers#	Include common targets.
95f9fbec18Smcpowers#
96f9fbec18Smcpowersinclude $(UTSBASE)/intel/Makefile.targ
97f9fbec18Smcpowers
98f9fbec18Smcpowersinclude Makefile.$(CLASS)
99