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 54271Srie# Common Development and Distribution License (the "License"). 64271Srie# 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# 219600SNobutomo.Nakano@Sun.COM# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 220Sstevel@tonic-gate# Use is subject to license terms. 230Sstevel@tonic-gate# 240Sstevel@tonic-gate# Common definitions for all of usr/src/cmd/ssh subdirs 250Sstevel@tonic-gate# 260Sstevel@tonic-gate 270Sstevel@tonic-gate 280Sstevel@tonic-gateTEXT_DOMAIN=SUNW_OST_OSCMD 290Sstevel@tonic-gate 300Sstevel@tonic-gateCFLAGS += $(CCVERBOSE) 314271SrieLDFLAGS += $(MAPFILE.NGB:%=-M%) 320Sstevel@tonic-gate 33*10515SJan.Pechanec@Sun.COMSSH_VERSION=\"Sun_SSH_1.5\" 340Sstevel@tonic-gate 350Sstevel@tonic-gateC99MODE= $(C99_ENABLE) 360Sstevel@tonic-gate 370Sstevel@tonic-gateCPPFLAGS = -DSSH_VERSION=$(SSH_VERSION) \ 380Sstevel@tonic-gate -I../include -I../../include \ 390Sstevel@tonic-gate -D_FILE_OFFSET_BITS=64 \ 400Sstevel@tonic-gate -erroff=E_STATEMENT_NOT_REACHED \ 418192SJohn.Zolnowsky@Sun.COM $(CPPFLAGS.master) 420Sstevel@tonic-gate 430Sstevel@tonic-gateSSH_COMMON_LDLIBS = \ 440Sstevel@tonic-gate -L../libssh/$(MACH) -lssh \ 450Sstevel@tonic-gate -L../libopenbsd-compat/$(MACH) -lopenbsd-compat 460Sstevel@tonic-gate 474271Srie$(PROG): $(MAPFILE.NGB) 484271Srie 490Sstevel@tonic-gate# 500Sstevel@tonic-gate# Some the lint -erroff flags listed below are because of deficiencies in 510Sstevel@tonic-gate# lint not because we are hiding real errors or to avoid massive resync- 520Sstevel@tonic-gate# hindering changes that will not be returned to OpenSSH. 530Sstevel@tonic-gate# 540Sstevel@tonic-gate# OpenSSH has several instances of "do {...} while (0);" - a common 550Sstevel@tonic-gate# idiom in C macros, but it elicits E_CONSTANT_CONDITION from lint. 560Sstevel@tonic-gate# 570Sstevel@tonic-gate# The MD5 macros in <openssl/md5.h> trigger E_EXPR_NULL_EFFECT. 580Sstevel@tonic-gate# 590Sstevel@tonic-gate# Lots of function return values are ignored in OpenSSH. 600Sstevel@tonic-gate# 610Sstevel@tonic-gate# Lots of globals could be static, sometimes due to portable code paths 620Sstevel@tonic-gate# which are dead on Solaris. 630Sstevel@tonic-gate# 640Sstevel@tonic-gateLINTFLAGS += \ 650Sstevel@tonic-gate -erroff=E_FUNC_ARG_UNUSED \ 660Sstevel@tonic-gate -erroff=E_NAME_USED_NOT_DEF2 \ 670Sstevel@tonic-gate -erroff=E_FUNC_DECL_VAR_ARG2 \ 680Sstevel@tonic-gate -erroff=E_INCONS_VAL_TYPE_DECL2 \ 690Sstevel@tonic-gate -erroff=E_INCONS_ARG_DECL2 \ 700Sstevel@tonic-gate -erroff=E_STATIC_UNUSED \ 710Sstevel@tonic-gate -erroff=E_STATEMENT_NOT_REACHED \ 720Sstevel@tonic-gate -erroff=E_FUNC_RET_ALWAYS_IGNOR2 \ 730Sstevel@tonic-gate -erroff=E_FUNC_RET_MAYBE_IGNORED2 \ 740Sstevel@tonic-gate -erroff=E_GLOBAL_COULD_BE_STATIC2 \ 750Sstevel@tonic-gate -erroff=E_CONSTANT_CONDITION \ 760Sstevel@tonic-gate -erroff=E_EXPR_NULL_EFFECT \ 770Sstevel@tonic-gate -errtags=yes 780Sstevel@tonic-gate 790Sstevel@tonic-gateROOTLIBSSH= $(ROOTLIB)/ssh 800Sstevel@tonic-gateROOTLIBSSHPROG= $(PROG:%=$(ROOTLIBSSH)/%) 810Sstevel@tonic-gate 820Sstevel@tonic-gatePOFILE= _messages.po 830Sstevel@tonic-gate 840Sstevel@tonic-gate$(ROOTLIBSSH)/%: % 850Sstevel@tonic-gate $(INS.file) 86