
#
# $Id: Makefile,v 1.1 1999/08/10 18:07:51 naamato Exp $
#

# for Solaris
# CC=gcc
# LDFLAGS=-lxnet

# for BSD
CC=gcc -g
LDFLAGS=

all: tools symlinks

tools: hello-badtype hello-badlength hello-badlength2 hello-badatype hello-badcksum hello-badver

hello-badtype: hello-badtype.o socket.o cksum.o common.o
	$(CC) $(LDFLAGS) -o hello-badtype hello-badtype.o common.o socket.o cksum.o
	
hello-badlength: hello-badlength.o socket.o cksum.o common.o
	$(CC) $(LDFLAGS) -o hello-badlength hello-badlength.o common.o socket.o cksum.o

hello-badlength2: hello-badlength2.o socket.o cksum.o common.o
	$(CC) $(LDFLAGS) -o hello-badlength2 hello-badlength.o common.o socket.o cksum.o

hello-badatype: hello-badatype.o socket.o cksum.o common.o
	$(CC) $(LDFLAGS) -o hello-badatype hello-badatype.o common.o socket.o cksum.o

hello-badcksum: hello-badcksum.o socket.o cksum.o common.o
	$(CC) $(LDFLAGS) -o hello-badcksum hello-badcksum.o common.o socket.o cksum.o

hello-badver: hello-badver.o socket.o cksum.o common.o
	$(CC) $(LDFLAGS) -o hello-badver hello-badver.o common.o socket.o cksum.o

symlinks:
	ln -s -f hello-badtype ../hello-badtype
	ln -s -f hello-badlength ../hello-badlength
	ln -s -f hello-badlength2 ../hello-badlength2
	ln -s -f hello-badatype ../hello-badatype
	ln -s -f hello-badcksum ../hello-badcksum
	ln -s -f hello-badver ../hello-badver

clean:
	rm -f *.o
	@for i in hello-badtype hello-badlength hello-badlength2 hello-badatype hello-badcksum hello-badver; do \
		rm -f $$i && rm -f ../$$i ; done
