#configureable stuff
PREFIX?=/usr/local
BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/man

#name of executeable
PROG=	sendip

CC=	gcc
CFLAGS=	-pipe -Wall -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings \
	-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \
	-Wnested-externs -Winline
#-g -pg
LDFLAGS=
#-pg
OBJS=sendip.o csum.o protocols.o

all:	$(PROG)

$(PROG):	$(OBJS)
	$(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $@

.PHONY: install clean

install:	$(PROG)
	install -c -m 755 $(PROG) $(BINDIR)/$(PROG)
	install -c -m 644 sendip.1 $(MANDIR)/man1/sendip.1

clean:
	rm -f *.o *~ $(PROG) core gmon.out
