xref: /titanic_41/usr/src/cmd/ssh/Makefile.ssh-common (revision dd49f125507979bb2ab505a8daf2a46d1be27051)
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# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22# Use is subject to license terms.
23#
24# Common definitions for all of usr/src/cmd/ssh subdirs
25#
26
27
28TEXT_DOMAIN=SUNW_OST_OSCMD
29
30CFLAGS += $(CCVERBOSE)
31LDFLAGS += $(MAPFILE.NGB:%=-M%)
32
33SSH_VERSION=\"Sun_SSH_1.5\"
34
35C99MODE= $(C99_ENABLE)
36
37CPPFLAGS = -DSSH_VERSION=$(SSH_VERSION) \
38	-I../include -I../../include \
39	-D_FILE_OFFSET_BITS=64 \
40	-erroff=E_STATEMENT_NOT_REACHED \
41	$(CPPFLAGS.master)
42
43SSH_COMMON_LDLIBS = \
44	-L../libssh/$(MACH) -lssh \
45	-L../libopenbsd-compat/$(MACH) -lopenbsd-compat
46
47$(PROG): $(MAPFILE.NGB)
48
49#
50# Some the lint -erroff flags listed below are because of deficiencies in
51# lint not because we are hiding real errors or to avoid massive resync-
52# hindering changes that will not be returned to OpenSSH.
53#
54# OpenSSH has several instances of "do {...} while (0);" - a common
55# idiom in C macros, but it elicits E_CONSTANT_CONDITION from lint.
56#
57# The MD5 macros in <openssl/md5.h> trigger E_EXPR_NULL_EFFECT.
58#
59# Lots of function return values are ignored in OpenSSH.
60#
61# Lots of globals could be static, sometimes due to portable code paths
62# which are dead on Solaris.
63#
64LINTFLAGS += \
65	-erroff=E_FUNC_ARG_UNUSED \
66	-erroff=E_NAME_USED_NOT_DEF2 \
67	-erroff=E_FUNC_DECL_VAR_ARG2 \
68	-erroff=E_INCONS_VAL_TYPE_DECL2 \
69	-erroff=E_INCONS_ARG_DECL2 \
70	-erroff=E_STATIC_UNUSED \
71	-erroff=E_STATEMENT_NOT_REACHED \
72	-erroff=E_FUNC_RET_ALWAYS_IGNOR2 \
73	-erroff=E_FUNC_RET_MAYBE_IGNORED2 \
74	-erroff=E_GLOBAL_COULD_BE_STATIC2 \
75	-erroff=E_CONSTANT_CONDITION \
76	-erroff=E_EXPR_NULL_EFFECT \
77	-errtags=yes
78
79ROOTLIBSSH=	$(ROOTLIB)/ssh
80ROOTLIBSSHPROG=	$(PROG:%=$(ROOTLIBSSH)/%)
81
82POFILE= _messages.po
83
84$(ROOTLIBSSH)/%: %
85	$(INS.file)
86