xref: /titanic_41/usr/src/cmd/ssh/Makefile.ssh-common (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
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 2004 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)
39C99LMODE=
40
41CPPFLAGS = -DSSH_VERSION=$(SSH_VERSION) \
42	-I../include -I../../include \
43	-D_FILE_OFFSET_BITS=64 \
44	-erroff=E_STATEMENT_NOT_REACHED \
45	$(OPENSSL_CPPFLAGS) $(CPPFLAGS.master)
46
47SSH_COMMON_LDLIBS = \
48	-L../libssh/$(MACH) -lssh \
49	-L../libopenbsd-compat/$(MACH) -lopenbsd-compat
50
51#
52# Some the lint -erroff flags listed below are because of deficiencies in
53# lint not because we are hiding real errors or to avoid massive resync-
54# hindering changes that will not be returned to OpenSSH.
55#
56# OpenSSH has several instances of "do {...} while (0);" - a common
57# idiom in C macros, but it elicits E_CONSTANT_CONDITION from lint.
58#
59# The MD5 macros in <openssl/md5.h> trigger E_EXPR_NULL_EFFECT.
60#
61# Lots of function return values are ignored in OpenSSH.
62#
63# Lots of globals could be static, sometimes due to portable code paths
64# which are dead on Solaris.
65#
66LINTFLAGS += \
67	-erroff=E_FUNC_ARG_UNUSED \
68	-erroff=E_NAME_USED_NOT_DEF2 \
69	-erroff=E_FUNC_DECL_VAR_ARG2 \
70	-erroff=E_INCONS_VAL_TYPE_DECL2 \
71	-erroff=E_INCONS_ARG_DECL2 \
72	-erroff=E_STATIC_UNUSED \
73	-erroff=E_STATEMENT_NOT_REACHED \
74	-erroff=E_FUNC_RET_ALWAYS_IGNOR2 \
75	-erroff=E_FUNC_RET_MAYBE_IGNORED2 \
76	-erroff=E_GLOBAL_COULD_BE_STATIC2 \
77	-erroff=E_CONSTANT_CONDITION \
78	-erroff=E_EXPR_NULL_EFFECT \
79	-errtags=yes
80
81ROOTLIBSSH=	$(ROOTLIB)/ssh
82ROOTLIBSSHPROG=	$(PROG:%=$(ROOTLIBSSH)/%)
83
84POFILE= _messages.po
85
86$(ROOTLIBSSH)/%: %
87	$(INS.file)
88