
RXGEN 	= ../../rxgen/rxgen
srcdir  = @srcdir@
VPATH	= @srcdir@
SHELL   = /bin/sh


INC = -I$(srcdir)/../../arlad \
	-I$(srcdir)/../../lwp \
	-I$(srcdir)/. \
	-I$(srcdir)/../.. \
	-I. \
	-I$(srcdir)/../../util \
	-I../../include \
	-I$(srcdir)/../../include \
	-I$(srcdir)/../../rxkad \
	-I../../rxdef \
	-I$(srcdir)/../../rx 

INCLUDES=$(INC) @KRB_INC_FLAGS@
CFLAGS 	= -g $(INCLUDES) @DEFS@

SRC	= dumbclient.c
OBJ	= $(SRC:.c=.o)
CC	= gcc

RXKADLIB	= @RXKAD_LIBS@
REALRXKADLIB	= -L../../rxkad $(RXKADLIB)
KAFS_LIBS	= @AIX_EXTRA_KAFS@ @KAFS_LIBS@
LIBS	= -L../../rxdef -lrxdefclient -L../../rx -L../../lwp -lrx -llwp -L../../util -lutil $(REALRXKADLIB) $(KAFS_LIBS) @LIBS@

all: 	dumbclient

dumbclient:	$(OBJ)
	echo $(RXKADLIB)
	gcc -o dumbclient $(OBJ) $(LIBS)

%.cs.c %.ss.c %.xdr.c %.h: $(srcdir)/../../arlad/%.xg
	rm -f $(<F)
	ln -s $(srcdir)/$< 
	test -f common.h || ln -s $(srcdir)/../../arlad/common.h
	$(RXGEN) $(<F)
	rm -f $(<F)

clean:
	rm -f *.o *~ core

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