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