thisconfigdir=.
myfulldir=util/pty
mydir=.
BUILDTOP=$(REL)$(U)$(S)$(U)
RELDIR=../util/pty

SED = sed

LIB=pty
LIBMAJOR=1
LIBMINOR=1

STLIBOBJS= cleanup.o getpty.o init_slave.o open_ctty.o open_slave.o \
	update_utmp.o update_wtmp.o vhangup.o void_assoc.o pty_err.o \
	logwtmp.o init.o sane_hostname.o

STOBJLISTS=OBJS.ST

INSTALLFILE = cp

# for pty-int.h
LOCALINCLUDES=-I. -I$(srcdir)

FILES= Makefile cleanup.c getpty.c init_slave.c open_ctty.c open_slave.c update_utmp.c update_wtmp.c vhangup.c void_assoc.c pty_err.h pty_err.c\
logwtmp.c init.c

CFILES=$(srcdir)/cleanup.c $(srcdir)/getpty.c $(srcdir)/init_slave.c \
	$(srcdir)/open_ctty.c $(srcdir)/open_slave.c \
	$(srcdir)/update_utmp.c $(srcdir)/update_wtmp.c $(srcdir)/vhangup.c \
	$(srcdir)/void_assoc.c $(srcdir)/logwtmp.c \
	$(srcdir)/init.c $(srcdir)/sane_hostname.c


SRCS=pty_err.c $(CFILES)
SHLIB_EXPDEPS = \
	$(TOPLIBD)/libcom_err$(SHLIBEXT)
SHLIB_EXPLIBS= -lcom_err 
SHLIB_DIRS=-L$(TOPLIBD)
SHLIB_RDIRS=$(KRB5_LIBDIR)

DEPLIBS=

#
all-unix:: includes pty_err.h

all-unix:: all-liblinks

dump-utmp: dump-utmp.o
	$(CC) $(LDFLAGS) -o dump-utmp dump-utmp.o
dump-utmp.o: dump-utmp.c

install-unix:: install-libs

clean-unix::
	$(RM) libpty.a $(BUILDTOP)/include/libpty.h pty_err.c pty_err.h
clean-unix:: clean-liblinks clean-libs clean-libobjs

depend::  pty_err.h

install:: libpty.h
	$(INSTALL_DATA) $(srcdir)/libpty.h  $(DESTDIR)$(KRB5_INCDIR)/libpty.h

clean-mac::
	$(RM) libpty.a
	$(RM) $(LIBOBJS)

## 

includes:: libpty.h
	if cmp $(srcdir)/libpty.h \
	$(BUILDTOP)/include/libpty.h >/dev/null 2>&1; then :; \
	else \
		(set -x; $(RM) $(BUILDTOP)/include/libpty.h; \
		 $(CP) $(srcdir)/libpty.h \
			$(BUILDTOP)/include/libpty.h) ; \
	fi

clean-unix::
	$(RM) $(BUILDTOP)/include/libpty.h



clean-unix:: clean-liblinks clean-libs clean-libobjs clean-files

clean-mac:: clean-files

clean-files::
	rm -f *~ \#* *.bak \
		*.otl *.aux *.toc *.PS *.dvi *.x9700 *.ps \
		*.cp *.fn *.ky *.log *.pg *.tp *.vr \
		*.o profiled/?*.o libcom_err.a libcom_err_p.a \
		com_err.o compile_et \
		et.ar TAGS y.tab.c lex.yy.c error_table.c \
		et_lex.lex.c \
		test1.h test1.c test2.h test2.c test_et \
		eddep makedep *.ln

pty_err.o: pty_err.c
pty_err.h: pty_err.et
pty_err.c: pty_err.et
