# $Id: Makefile.in,v 1.4.10.2 2000/10/11 19:20:01 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@
transform	= @program_transform_name@
EXECSUFFIX	= @EXECSUFFIX@

APPL_BIN	= pts

DEFS		= @DEFS@

SHELL		= /bin/sh

CFLAGS		= @CFLAGS@
X_CFLAGS	= @X_CFLAGS@

ETAGS		= etags
MAKEDEPEND	= makedepend
RXKADINC	= -I$(srcdir)/../../rxkad
INCLUDES	= -I$(srcdir)/../.. \
		  -I$(srcdir)/../../include \
		  -I$(srcdir)/../lib \
		  -I../../include \
		  -I../../rxdef \
		  -I. \
		  $(KERNEL_INCLUDE) \
		  -I$(srcdir)/../../xfs/include \
		  -I$(srcdir)/../../arlad \
		  $(RXKADINC) 

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

LIBDEPENDS	= ../../rxdef/librxdefclient.a ../../rx/librx.a ../../lwp/liblwp.a \
		  ../../util/libutil.a ../../lib/sl/libsl.a ../../lib/roken/libroken.a \
		  ../../lib/ko/libko.a

PROGS		= pts
PTS_SRCS	= pts.c
SRCS		= $(PTS_SRCS)
PTS_OBJS	= pts.o
HDRS		= 

all:		$(PROGS)

.PHONY: all install uninstall depend tags clean

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

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

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

pts:		$(PTS_OBJS) $(LIBDEPENDS)
		$(CC) $(LDFLAGS) -o $@ $(PTS_OBJS) $(LIBS)

Makefile:	Makefile.in ../../config.status
		cd ../..; CONFIG_FILES=appl/pts/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

mostlyclean:	clean

distclean:	clean
		rm -f Makefile config.status

realclean:	distclean
		rm -f TAGS
