# $Id: Makefile.in,v 1.12 1997/11/09 09:04:04 assar Exp $

SHELL = /bin/sh

srcdir = @srcdir@
VPATH = @srcdir@

top_builddir = ../..

CC = @CC@
AR = ar
DEFS = @DEFS@
CFLAGS = @CFLAGS@
LD_FLAGS = @LD_FLAGS@
INSTALL = @INSTALL@
LIBS = @LIBS@
MKINSTALLDIRS = @top_srcdir@/mkinstalldirs

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

PROG_BIN	= sample_client$(EXECSUFFIX) \
		  simple_client$(EXECSUFFIX)
PROG_LIBEXEC	= sample_server$(EXECSUFFIX) \
		  simple_server$(EXECSUFFIX)
PROGS = $(PROG_BIN) $(PROG_LIBEXEC)

OBJECTS = sample_client.o sample_server.o simple_client.o simple_server.o
SOURCES = sample_client.c sample_server.c simple_client.c simple_server.c

all: $(PROGS)

Wall:
	make CFLAGS="-g -Wall -Wno-comment -Wmissing-prototypes -Wmissing-declarations -D__USE_FIXED_PROTOTYPES__"

.c.o:
	$(CC) -c $(CPPFLAGS) $(DEFS) -I../../include -I$(srcdir) $(CFLAGS) $<

install: all

uninstall:

TAGS: $(SOURCES)
	etags $(SOURCES)

check:

clean:
	rm -f *.a *.o $(PROGS)

mostlyclean: clean

distclean: clean
	rm -f Makefile *.tab.c *~

realclean: distclean
	rm -f TAGS

dist: $(DISTFILES)
	for file in $(DISTFILES); do \
	  ln $$file ../`cat ../.fname`/lib \
	    || cp -p $$file ../`cat ../.fname`/lib; \
	done

KLIB=-L../../lib/krb -lkrb -L../../lib/des -ldes
LIBROKEN=-L../../lib/roken -lroken

sample_client$(EXECSUFFIX): sample_client.o
	$(CC) $(LD_FLAGS) $(LDFLAGS) -o $@ sample_client.o $(KLIB) $(LIBROKEN) $(LIBS) $(LIBROKEN)

simple_client$(EXECSUFFIX): simple_client.o
	$(CC) $(LD_FLAGS) $(LDFLAGS) -o $@ simple_client.o $(KLIB) $(LIBROKEN) $(LIBS) $(LIBROKEN)

sample_server$(EXECSUFFIX): sample_server.o
	$(CC) $(LD_FLAGS) $(LDFLAGS) -o $@ sample_server.o $(KLIB) $(LIBROKEN) $(LIBS) $(LIBROKEN)

simple_server$(EXECSUFFIX): simple_server.o
	$(CC) $(LD_FLAGS) $(LDFLAGS) -o $@ simple_server.o $(KLIB) $(LIBROKEN) $(LIBS) $(LIBROKEN)

$(OBJECTS): ../../include/config.h
