# $Id: Makefile,v 1.26.2.2 2000/08/25 09:32:02 tls Exp $
#
# Copyright 1999 RedBack Networks, Incorporated.
# All rights reserved.
#
# This software is not in the public domain.  It is distributed 
# under the terms of the license in the file LICENSE in the
# same directory as this file.  If you have received a copy of this
# software without the LICENSE file (which means that whoever gave
# you this software violated its license) you may obtain a copy from
# http://www.panix.com/~tls/LICENSE.txt
#

CC=gcc
CFLAGS= -Wall -g -I. -I/usr/pkg/include -Werror
DEFINES=#-DUNSAFE_DEBUG
LIBS= -L /usr/pkg/lib -R /usr/pkg/lib -lutil -lcrypt -lz -lcrypto

SRCS=ssh_auth.c ssh_cipher.c ssh_util.c sshd_auth.c sshd_iactive.c \
	sshd_intro.c sshd_main.c sshd_prep.c sshd_server.c \
	ssh_none.c ssh_logging.c ssh_packet.c \
	ssh_rsakeys.c ssh_buffer.c ssh_parse.c ssh_global.c ssh_deattack.c \
	ssh_sys_posix.c ssh_sys_bsd44+.c \
	ssh_crypto_openssl.c

OBJS=${SRCS:.c=.o}

KEYGENOBJS=ssh_logging.o ssh_rsakeys.o ssh-keygen.o ssh_util.o \
	ssh_parse.o ssh_global.o ssh_buffer.o \
	ssh_crypto_openssl.o \
	ssh_sys_bsd44+.o \
	ssh_sys_posix.o

all: sshd ssh-keygen

.SUFFIX: .c .o

.c.o:
	$(CC) -c $(CFLAGS) $(DEFINES) $< -o $@


clean:
	rm -f *.o a.out sshd ssh-keygen

cleandir: clean
	rm -f .depend *.core

depend:
	mkdep -a ${CFLAGS} ${DEFINES} ${SRCS}

sshd: ${OBJS}
	${CC} -o sshd ${CFLAGS} ${OBJS} ${LIBS}

ssh-keygen: ${KEYGENOBJS}
	${CC} -o ssh-keygen ${CFLAGS} ${KEYGENOBJS} ${LIBS}

install: sshd
	echo unimpl.


