thisconfigdir=./..
myfulldir=kadmin/v5passwdd
mydir=v5passwdd
BUILDTOP=$(REL)$(U)$(S)$(U)
PROG_LIBPATH=-L$(TOPLIBD)
PROG_RPATH=$(KRB5_LIBDIR)

COMMON_SRCS = adm_rw.c
COMMON_OBJS = adm_rw.o
SERV_SRCS = main.c srv_net.c proto_serv.c 
SERV_OBJS = main.o srv_net.o proto_serv.o 
CLI_SRCS = kpasswd.c adm_conn.c
CLI_OBJS = kpasswd.o adm_conn.o

SRCS=$(SERV_SRCS) $(COMMON_SRCS) $(CLI_SRCS)
OBJS=$(SERV_OBJS) $(COMMON_OBJS) $(CLI_OBJS)

SERV = v5passwdd
CLI = v5passwd

all:: $(SERV) $(CLI)

$(SERV): $(SERV_OBJS) $(COMMON_OBJS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS)
	$(CC_LINK) -o $(SERV) $(SERV_OBJS) $(COMMON_OBJS) \
		$(KADMSRV_LIBS) $(KRB5_BASE_LIBS)


$(CLI): $(CLI_OBJS) $(COMMON_OBJS) $(KADMCLNT_DEPLIBS) $(KRB5_BASE_DEPLIBS)
	$(CC_LINK) -o $(CLI) $(CLI_OBJS) $(COMMON_OBJS) \
		$(KADMCLNT_LIBS) $(KRB5_BASE_LIBS)

install::
	for f in v5passwd; do \
	  $(INSTALL_PROGRAM) $$f \
		$(DESTDIR)$(CLIENT_BINDIR)$(S)`echo $$f|sed '$(transform)'`; \
	  $(INSTALL_DATA) $(srcdir)$(S)$$f.M \
		${DESTDIR}$(CLIENT_MANDIR)$(S)`echo $$f|sed '$(transform)'`.1; \
	done
	for f in v5passwdd; do \
	  $(INSTALL_PROGRAM) $$f \
		$(DESTDIR)$(SERVER_BINDIR)$(S)`echo $$f|sed '$(transform)'`; \
	done

clean::
	$(RM) $(SERV) $(CLI)

