10Sstevel@tonic-gate# 20Sstevel@tonic-gate# CDDL HEADER START 30Sstevel@tonic-gate# 40Sstevel@tonic-gate# The contents of this file are subject to the terms of the 5*4271Srie# Common Development and Distribution License (the "License"). 6*4271Srie# You may not use this file except in compliance with the License. 70Sstevel@tonic-gate# 80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate# See the License for the specific language governing permissions 110Sstevel@tonic-gate# and limitations under the License. 120Sstevel@tonic-gate# 130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate# 190Sstevel@tonic-gate# CDDL HEADER END 200Sstevel@tonic-gate# 21*4271Srie# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 220Sstevel@tonic-gate# Use is subject to license terms. 230Sstevel@tonic-gate# 240Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 250Sstevel@tonic-gate# 260Sstevel@tonic-gate# Common definitions for all of usr/src/cmd/ssh subdirs 270Sstevel@tonic-gate# 280Sstevel@tonic-gate 290Sstevel@tonic-gateinclude $(SRC)/lib/openssl/Makefile.openssl 300Sstevel@tonic-gate 310Sstevel@tonic-gateTEXT_DOMAIN=SUNW_OST_OSCMD 320Sstevel@tonic-gate 330Sstevel@tonic-gateCFLAGS += $(CCVERBOSE) 34*4271SrieLDFLAGS += $(MAPFILE.NGB:%=-M%) 350Sstevel@tonic-gate 360Sstevel@tonic-gateSSH_VERSION=\"Sun_SSH_1.1\" 370Sstevel@tonic-gate 380Sstevel@tonic-gateC99MODE= $(C99_ENABLE) 390Sstevel@tonic-gate 400Sstevel@tonic-gateCPPFLAGS = -DSSH_VERSION=$(SSH_VERSION) \ 410Sstevel@tonic-gate -I../include -I../../include \ 420Sstevel@tonic-gate -D_FILE_OFFSET_BITS=64 \ 430Sstevel@tonic-gate -erroff=E_STATEMENT_NOT_REACHED \ 440Sstevel@tonic-gate $(OPENSSL_CPPFLAGS) $(CPPFLAGS.master) 450Sstevel@tonic-gate 460Sstevel@tonic-gateSSH_COMMON_LDLIBS = \ 470Sstevel@tonic-gate -L../libssh/$(MACH) -lssh \ 480Sstevel@tonic-gate -L../libopenbsd-compat/$(MACH) -lopenbsd-compat 490Sstevel@tonic-gate 50*4271Srie$(PROG): $(MAPFILE.NGB) 51*4271Srie 520Sstevel@tonic-gate# 530Sstevel@tonic-gate# Some the lint -erroff flags listed below are because of deficiencies in 540Sstevel@tonic-gate# lint not because we are hiding real errors or to avoid massive resync- 550Sstevel@tonic-gate# hindering changes that will not be returned to OpenSSH. 560Sstevel@tonic-gate# 570Sstevel@tonic-gate# OpenSSH has several instances of "do {...} while (0);" - a common 580Sstevel@tonic-gate# idiom in C macros, but it elicits E_CONSTANT_CONDITION from lint. 590Sstevel@tonic-gate# 600Sstevel@tonic-gate# The MD5 macros in <openssl/md5.h> trigger E_EXPR_NULL_EFFECT. 610Sstevel@tonic-gate# 620Sstevel@tonic-gate# Lots of function return values are ignored in OpenSSH. 630Sstevel@tonic-gate# 640Sstevel@tonic-gate# Lots of globals could be static, sometimes due to portable code paths 650Sstevel@tonic-gate# which are dead on Solaris. 660Sstevel@tonic-gate# 670Sstevel@tonic-gateLINTFLAGS += \ 680Sstevel@tonic-gate -erroff=E_FUNC_ARG_UNUSED \ 690Sstevel@tonic-gate -erroff=E_NAME_USED_NOT_DEF2 \ 700Sstevel@tonic-gate -erroff=E_FUNC_DECL_VAR_ARG2 \ 710Sstevel@tonic-gate -erroff=E_INCONS_VAL_TYPE_DECL2 \ 720Sstevel@tonic-gate -erroff=E_INCONS_ARG_DECL2 \ 730Sstevel@tonic-gate -erroff=E_STATIC_UNUSED \ 740Sstevel@tonic-gate -erroff=E_STATEMENT_NOT_REACHED \ 750Sstevel@tonic-gate -erroff=E_FUNC_RET_ALWAYS_IGNOR2 \ 760Sstevel@tonic-gate -erroff=E_FUNC_RET_MAYBE_IGNORED2 \ 770Sstevel@tonic-gate -erroff=E_GLOBAL_COULD_BE_STATIC2 \ 780Sstevel@tonic-gate -erroff=E_CONSTANT_CONDITION \ 790Sstevel@tonic-gate -erroff=E_EXPR_NULL_EFFECT \ 800Sstevel@tonic-gate -errtags=yes 810Sstevel@tonic-gate 820Sstevel@tonic-gateROOTLIBSSH= $(ROOTLIB)/ssh 830Sstevel@tonic-gateROOTLIBSSHPROG= $(PROG:%=$(ROOTLIBSSH)/%) 840Sstevel@tonic-gate 850Sstevel@tonic-gatePOFILE= _messages.po 860Sstevel@tonic-gate 870Sstevel@tonic-gate$(ROOTLIBSSH)/%: % 880Sstevel@tonic-gate $(INS.file) 89