xref: /titanic_50/usr/src/cmd/ssh/Makefile.ssh-common (revision 24da5b34f49324ed742a340010ed5bd3d4e06625)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5*24da5b34Srie# Common Development and Distribution License (the "License").
6*24da5b34Srie# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
21*24da5b34Srie# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
227c478bd9Sstevel@tonic-gate# Use is subject to license terms.
237c478bd9Sstevel@tonic-gate#
247c478bd9Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
257c478bd9Sstevel@tonic-gate#
267c478bd9Sstevel@tonic-gate# Common definitions for all of usr/src/cmd/ssh subdirs
277c478bd9Sstevel@tonic-gate#
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gateinclude $(SRC)/lib/openssl/Makefile.openssl
307c478bd9Sstevel@tonic-gate
317c478bd9Sstevel@tonic-gateTEXT_DOMAIN=SUNW_OST_OSCMD
327c478bd9Sstevel@tonic-gate
337c478bd9Sstevel@tonic-gateCFLAGS += $(CCVERBOSE)
34*24da5b34SrieLDFLAGS += $(MAPFILE.NGB:%=-M%)
357c478bd9Sstevel@tonic-gate
367c478bd9Sstevel@tonic-gateSSH_VERSION=\"Sun_SSH_1.1\"
377c478bd9Sstevel@tonic-gate
387c478bd9Sstevel@tonic-gateC99MODE= $(C99_ENABLE)
397c478bd9Sstevel@tonic-gate
407c478bd9Sstevel@tonic-gateCPPFLAGS = -DSSH_VERSION=$(SSH_VERSION) \
417c478bd9Sstevel@tonic-gate	-I../include -I../../include \
427c478bd9Sstevel@tonic-gate	-D_FILE_OFFSET_BITS=64 \
437c478bd9Sstevel@tonic-gate	-erroff=E_STATEMENT_NOT_REACHED \
447c478bd9Sstevel@tonic-gate	$(OPENSSL_CPPFLAGS) $(CPPFLAGS.master)
457c478bd9Sstevel@tonic-gate
467c478bd9Sstevel@tonic-gateSSH_COMMON_LDLIBS = \
477c478bd9Sstevel@tonic-gate	-L../libssh/$(MACH) -lssh \
487c478bd9Sstevel@tonic-gate	-L../libopenbsd-compat/$(MACH) -lopenbsd-compat
497c478bd9Sstevel@tonic-gate
50*24da5b34Srie$(PROG): $(MAPFILE.NGB)
51*24da5b34Srie
527c478bd9Sstevel@tonic-gate#
537c478bd9Sstevel@tonic-gate# Some the lint -erroff flags listed below are because of deficiencies in
547c478bd9Sstevel@tonic-gate# lint not because we are hiding real errors or to avoid massive resync-
557c478bd9Sstevel@tonic-gate# hindering changes that will not be returned to OpenSSH.
567c478bd9Sstevel@tonic-gate#
577c478bd9Sstevel@tonic-gate# OpenSSH has several instances of "do {...} while (0);" - a common
587c478bd9Sstevel@tonic-gate# idiom in C macros, but it elicits E_CONSTANT_CONDITION from lint.
597c478bd9Sstevel@tonic-gate#
607c478bd9Sstevel@tonic-gate# The MD5 macros in <openssl/md5.h> trigger E_EXPR_NULL_EFFECT.
617c478bd9Sstevel@tonic-gate#
627c478bd9Sstevel@tonic-gate# Lots of function return values are ignored in OpenSSH.
637c478bd9Sstevel@tonic-gate#
647c478bd9Sstevel@tonic-gate# Lots of globals could be static, sometimes due to portable code paths
657c478bd9Sstevel@tonic-gate# which are dead on Solaris.
667c478bd9Sstevel@tonic-gate#
677c478bd9Sstevel@tonic-gateLINTFLAGS += \
687c478bd9Sstevel@tonic-gate	-erroff=E_FUNC_ARG_UNUSED \
697c478bd9Sstevel@tonic-gate	-erroff=E_NAME_USED_NOT_DEF2 \
707c478bd9Sstevel@tonic-gate	-erroff=E_FUNC_DECL_VAR_ARG2 \
717c478bd9Sstevel@tonic-gate	-erroff=E_INCONS_VAL_TYPE_DECL2 \
727c478bd9Sstevel@tonic-gate	-erroff=E_INCONS_ARG_DECL2 \
737c478bd9Sstevel@tonic-gate	-erroff=E_STATIC_UNUSED \
747c478bd9Sstevel@tonic-gate	-erroff=E_STATEMENT_NOT_REACHED \
757c478bd9Sstevel@tonic-gate	-erroff=E_FUNC_RET_ALWAYS_IGNOR2 \
767c478bd9Sstevel@tonic-gate	-erroff=E_FUNC_RET_MAYBE_IGNORED2 \
777c478bd9Sstevel@tonic-gate	-erroff=E_GLOBAL_COULD_BE_STATIC2 \
787c478bd9Sstevel@tonic-gate	-erroff=E_CONSTANT_CONDITION \
797c478bd9Sstevel@tonic-gate	-erroff=E_EXPR_NULL_EFFECT \
807c478bd9Sstevel@tonic-gate	-errtags=yes
817c478bd9Sstevel@tonic-gate
827c478bd9Sstevel@tonic-gateROOTLIBSSH=	$(ROOTLIB)/ssh
837c478bd9Sstevel@tonic-gateROOTLIBSSHPROG=	$(PROG:%=$(ROOTLIBSSH)/%)
847c478bd9Sstevel@tonic-gate
857c478bd9Sstevel@tonic-gatePOFILE= _messages.po
867c478bd9Sstevel@tonic-gate
877c478bd9Sstevel@tonic-gate$(ROOTLIBSSH)/%: %
887c478bd9Sstevel@tonic-gate	$(INS.file)
89