xref: /titanic_44/usr/src/cmd/ssh/Makefile.ssh-common (revision bc913c4cbc9594e8ca0a031ba908f496ef40bbca)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27# Common definitions for all of usr/src/cmd/ssh subdirs
28#
29
30include $(SRC)/lib/openssl/Makefile.openssl
31
32TEXT_DOMAIN=SUNW_OST_OSCMD
33
34CFLAGS += $(CCVERBOSE)
35
36SSH_VERSION=\"Sun_SSH_1.1\"
37
38C99MODE= $(C99_ENABLE)
39
40CPPFLAGS = -DSSH_VERSION=$(SSH_VERSION) \
41	-I../include -I../../include \
42	-D_FILE_OFFSET_BITS=64 \
43	-erroff=E_STATEMENT_NOT_REACHED \
44	$(OPENSSL_CPPFLAGS) $(CPPFLAGS.master)
45
46SSH_COMMON_LDLIBS = \
47	-L../libssh/$(MACH) -lssh \
48	-L../libopenbsd-compat/$(MACH) -lopenbsd-compat
49
50#
51# Some the lint -erroff flags listed below are because of deficiencies in
52# lint not because we are hiding real errors or to avoid massive resync-
53# hindering changes that will not be returned to OpenSSH.
54#
55# OpenSSH has several instances of "do {...} while (0);" - a common
56# idiom in C macros, but it elicits E_CONSTANT_CONDITION from lint.
57#
58# The MD5 macros in <openssl/md5.h> trigger E_EXPR_NULL_EFFECT.
59#
60# Lots of function return values are ignored in OpenSSH.
61#
62# Lots of globals could be static, sometimes due to portable code paths
63# which are dead on Solaris.
64#
65LINTFLAGS += \
66	-erroff=E_FUNC_ARG_UNUSED \
67	-erroff=E_NAME_USED_NOT_DEF2 \
68	-erroff=E_FUNC_DECL_VAR_ARG2 \
69	-erroff=E_INCONS_VAL_TYPE_DECL2 \
70	-erroff=E_INCONS_ARG_DECL2 \
71	-erroff=E_STATIC_UNUSED \
72	-erroff=E_STATEMENT_NOT_REACHED \
73	-erroff=E_FUNC_RET_ALWAYS_IGNOR2 \
74	-erroff=E_FUNC_RET_MAYBE_IGNORED2 \
75	-erroff=E_GLOBAL_COULD_BE_STATIC2 \
76	-erroff=E_CONSTANT_CONDITION \
77	-erroff=E_EXPR_NULL_EFFECT \
78	-errtags=yes
79
80ROOTLIBSSH=	$(ROOTLIB)/ssh
81ROOTLIBSSHPROG=	$(PROG:%=$(ROOTLIBSSH)/%)
82
83POFILE= _messages.po
84
85$(ROOTLIBSSH)/%: %
86	$(INS.file)
87