#
# $Id$
#
# :ts=4
#
# AmigaOS wrapper routines for GNU CVS, using the AmiTCP V3 API
# and the SAS/C V6.58 compiler.
#
# Written and adapted by Olaf `Olsen' Barthel <olsen@sourcery.han.de>
#                        Jens Langner <Jens.Langner@htw-dresden.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#

TARGET = ssh.lib

# Programs

CC  = sc
OML = oml
CP  = copy
RM  = delete quiet

# ignored warnings are:
#  51 C++ comment detected                                 -- we agreed to use them
#  61 undefined struct/union tag "tag-name"                -- in include files
# 120 Integral type mismatch: possible portability problem -- should be used somewhen
# 148 use of incomplete struct/union/enum tag "name"       -- in include files
# 165 use of narrow type in prototype                      -- very unlikely portability problem
# 178 indirect call without indirection operator           -- only old-style support
# 212 item "name" already declared                         -- in include files
# 306 .. function inlined                                  -- disturbs

# Compiler/Linker flags

CPU      =  68020
DEFS     =  DEFINE=_SSH
WARN     =  WARN=ALL IGNORE=51,61,120,148,165,178,212,306
INCDIRS  =  IDIR=/include IDIR=/netinclude IDIR=/
CFLAGS   =  OPT OPTTIME OPTSCHEDULE CPU=$(CPU) UTILLIB COMMENTNEST STRUCTUREEQUIVALENCE \
            STRINGMERGE NOSTACKCHECK $(DEFS) $(WARN) $(INCDIRS) DEBUG=LINE

OBJS     =  blowfish.o crc.o des.o md5.o rsa.o ssh_protocol.o

#

default: $(TARGET)

# Default rule

.c.o:
  @echo "*e[32mCompiling $*.c*e[0m"
  @$(CC) $(CFLAGS) $<

#

$(TARGET): $(OBJS)
  @echo "*e[32mLinking $*.lib*e[0m"
  @$(OML) $@ r $(OBJS)

# leaves TARGET
clean:
  -$(RM) $(OBJS)

#
cleanall: clean
  -$(RM) $(TARGET)

