# Copyright 2000, International Business Machines Corporation and others.
# All Rights Reserved.
# 
# This software has been released under the terms of the IBM Public
# License.  For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html

srcdir=@srcdir@
include @TOP_OBJDIR@/src/config/Makefile.config

# This set of definitions tests the lwp RX library
#   include @TOP_OBJDIR@/src/config/Makefile.lwp
#   LIBS=${TOP_LIBDIR}/librx.a ${TOP_LIBDIR}/liblwp.a

# This set of definitions tests the pthread one
include @TOP_OBJDIR@/src/config/Makefile.pthread
LIBS=$(TOP_LIBDIR)/libafsauthent.a $(TOP_LIBDIR)/libafsrpc.a \
     $(TOP_LIBDIR)/util.a

all: sample_client sample_server

sample_client: sample_client.o ${LIBS} sample.cs.o
	$(AFS_LDRULE) sample_client.o sample.cs.o ${LIBS}

sample_server: sample_server.o sample.ss.o ${LIBS}
	$(AFS_LDRULE) sample_server.o sample.ss.o ${LIBS}

sample_client.o:	sample.h
sample_server.o:	sample.h
sample.cs.c: sample.xg
	$(RXGEN) -A -x -C -o $@ sample.xg
sample.ss.c: sample.xg
	$(RXGEN) -A -x -S -o $@ sample.xg
sample.h: sample.xg
	$(RXGEN) -A -x -h -o $@ sample.xg

clean:
	rm -f *.o sample.cs.c sample.ss.c sample_client sample_server
