# Copyright 1999, 2000, 2001, 2002 by Paul Mattes.
#  Permission to use, copy, modify, and distribute this software and its
#  documentation for any purpose and without fee is hereby granted,
#  provided that the above copyright notice appear in all copies and that
#  both that copyright notice and this permission notice appear in
#  supporting documentation.
#
# pr3287 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 file LICENSE for more details.

# Makefile for pr3287

RM = rm -f
CC = @CC@

all: pr3287

prefix = @prefix@
exec_prefix = @exec_prefix@
MANDIR = @mandir@
BINDIR = @bindir@

#CDEBUGFLAGS = -g -Wall

XCPPFLAGS = @CPPFLAGS@ @XANSI@ @XPRECOMP@
CFLAGS = @CFLAGS@ $(XCPPFLAGS) $(CDEBUGFLAGS)
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
INSTALL = @INSTALL@

SRCS = pr3287.c ctlr.c trace_ds.c tables.c telnet.c sf.c charset.c see.c
OBJECTS = pr3287.o ctlr.o trace_ds.o tables.o telnet.o sf.o charset.o see.o

version.o: version.txt mkversion.sh
	@chmod +x mkversion.sh version.txt
	sh ./mkversion.sh $(CC) pr3287

pr3287: $(OBJECTS) version.o
	$(CC) -o $@ $(OBJECTS) version.o $(LDFLAGS) $(LIBS)

install: pr3287
	[ -d $(DESTDIR)$(BINDIR) ] || \
		mkdir -p $(DESTDIR)$(BINDIR)
	$(INSTALL) pr3287 $(DESTDIR)$(BINDIR)/pr3287

install.man:
	[ -d $(DESTDIR)$(MANDIR)/man1 ] || \
		mkdir -p $(DESTDIR)$(MANDIR)/man1
	$(INSTALL) pr3287.man $(DESTDIR)$(MANDIR)/man1/pr3287.1

clean:
	$(RM) pr3287 *.o

depend:
	gccmakedep $(XCPPFLAGS) -s "# DO NOT DELETE" $(SRCS)

# -------------------------------------------------------------------------
# dependencies generated by makedepend

# DO NOT DELETE
