# $Id: Makefile.in,v 1.2 2000/02/06 07:00:24 lha Exp $

srcdir		= @srcdir@
VPATH		= @srcdir@

CC		= @CC@
LN_S		= @LN_S@

INSTALL		= @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA	= @INSTALL_DATA@
MKINSTALLDIRS 	= @top_srcdir@/mkinstalldirs

prefix 		= @prefix@
exec_prefix 	= @exec_prefix@
libdir 		= @libdir@
libexecdir 	= @libexecdir@
bindir 		= @bindir@
sbindir		= @sbindir@
transform	= @program_transform_name@
EXECSUFFIX	= @EXECSUFFIX@

APPL_BIN	= perf
PROGS		= $(APPL_BIN)

DEFS		= @DEFS@

SHELL		= /bin/sh

CFLAGS		= @CFLAGS@

ETAGS		= etags
INCLUDES	= -I$(srcdir)/../../fs \
		  -I$(srcdir)/../../../include \
		  -I$(srcdir)/../../../appl/lib \
		  -I$(srcdir) \
		  -I$(srcdir)/../../.. \
		  -I../../../include \
		  -I../../../rxdef \
		  @KRB4_INC_FLAGS@ \
		  -I.

DEFINES		=
REALCFLAGS	= $(INCLUDES) @KRB4_INC_FLAGS@ $(DEFINES) $(CFLAGS) $(X_CFLAGS)
RXKAD_LIBS	= @RXKAD_LIBS@
LIB_tgetent     = @LIB_tgetent@
LIBS		= -L../../../lib/sl -lsl \
		  @LIB_readline@ \
		  -L../../../util -lutil \
		  -L../../../rx -lrx \
		  -L../../../lwp -llwp @PLWP_LIB_FLAGS@ \
		  -L../../../appl/lib -larlalib \
		  -L../../../lib/ko -lko \
		  -L../../../rxdef -lrxdefclient \
		  -L../../../lib/roken \
		  @MILKO_RXKAD_LIBS2@ \
		  @KRB4_LIB_FLAGS@ \
		  -L../../../util -lutil \
		  -lroken @LIBS@

LIBDEPENDS	= ../../../util/libutil.a ../../../lib/sl/libsl.a \
		  ../../../lib/roken/libroken.a

PERF_SRCS	= perf.c
SRCS		= $(PERF_SRCS)
PERF_OBJS	= perf.o
HDRS		= perf.h

all:		$(PROGS)

.PHONY: all install uninstall depend tags clean

.c.o:
		$(CC) -c $(CPPFLAGS) $(DEFS) -I$(srcdir) -I. $(REALCFLAGS) $<

install: all
		$(MKINSTALLDIRS) $(DESTDIR)$(sbindir)
		PROG_BIN='$(APPL_BIN)'; for x in $$PROG_BIN; do \
			f=`echo $$x | sed '$(transform)'`; \
			$(INSTALL_PROGRAM) $$x $(DESTDIR)$(sbindir)/$$f; \
		done

uninstall:
		PROG_BIN='$(APPL_BIN)'; for x in $$PROG_BIN; do \
			f=`echo $$x | sed '$(transform)'`; \
			rm -f $(DESTDIR)$(sbindir)/$$f; \
		done

perf:		$(PERF_OBJS) $(LIBDEPENDS)
		$(CC) $(LDFLAGS) -o $@ $(PERF_OBJS) $(LIBS)

Makefile:	Makefile.in ../../../config.status
		cd ../../..; CONFIG_FILES=milko/appl/perf/Makefile CONFIG_HEADERS= $(SHELL) config.status

depend:		$(CFILES)
		$(MAKEDEPEND) -- $(REALCFLAGS) -- $^

tags:		TAGS

TAGS:		$(SRCS) $(HDRS)
		$(ETAGS) -t $(SRCS) $(HDRS)

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

mostlyclean:	clean

distclean:	clean
		rm -f Makefile config.status

realclean:	distclean
		rm -f TAGS
