##
##  The SSH variable must point to an ssh distribution that has already
##  been built for this architecture.
##
SSH = ../ssh-1.2.12

CC = gcc
CFLAGS = -g -O -Wall -Wno-implicit
SHELL = /bin/sh

GMP = $(SSH)/gmp-1.3.2

INC = -I$(SSH) -I$(GMP)

PROGS = ssh-keyscan make-host-list

all: $(PROGS)
.PHONY: all

ssh-keyscan: ssh-keyscan.c
	$(CC) $(CFLAGS) $(INC) -o ssh-keyscan ssh-keyscan.c -L$(GMP) -lgmp

make-host-list: make-host-list.pl
	rm -f make-host-list make-host-list~
	echo '#!'`which perl` | cat - make-host-list.pl > make-host-list~
	chmod +x make-host-list~
	mv -f make-host-list~ make-host-list

.PHONY: clean
clean:
	rm -f *~ *.o $(PROGS)
