#
# Makefile for single_rsr_client and single_rsr_server example programs.
#
#
# Requires that the GLOBUS_DEVELOPMENT_PATH variables is set. This 
# environment variable must point to the Globus development directory
# containing the flavor or libraries, etc. that you wish to use when
# building this example.  This environment variable should be set in
# the shell prior to envoking make.  The utility program
# $GLOBUS_PATH/globus-development-path can be used to assist you in
# determining the correct setting. For usage information type
# $GLOBUS_PATH/globus-development-path -help 
#
# For example:
# 
# SH:
#
# Non-threaded: 
#
# GLOBUS_DEVELOPMENT_PATH = `$GLOBUS_PATH/globus-development-path -nothreads`
# export GLOBUS_DEVELOPMENT_PATH
#
# Threaded:
#
# GLOBUS_DEVELOPMENT_PATH = `$GLOBUS_PATH/globus-development-path -threads`
# export GLOBUS_DEVELOPMENT_PATH
#
# CSH:
#
# Non-threaded:
#
# setenv GLOBUS_DEVELOPMENT_PATH \
#	`$GLOBUS_PATH/globus-development-path -nothreads`
# 
# Threaded:
#
# setenv GLOBUS_DEVELOPMENT_PATH \
# 	`$GLOBUS_PATH/globus-development-path -threads`
#


#
# Read the makefile header containing build specific definitions
#

include $(GLOBUS_DEVELOPMENT_PATH)/etc/makefile_header

MY_CFLAGS  = 	-I$(includedir) $(CFLAGS) \
		$(GLOBUS_NEXUS_CFLAGS)
MY_LDFLAGS = 	-L$(libdir) $(LDFLAGS) \
		$(GLOBUS_NEXUS_LDFLAGS)
MY_LIBS    = 	$(GLOBUS_NEXUS_LIBS) \
		$(LIBS)


EXECS = single_rsr_server     \
	single_rsr_client     \
	rsr_with_reply_server \
	rsr_with_reply_client

.c.o:
	$(CC) $(MY_CFLAGS) -c $<

all: $(EXECS)

single_rsr_server: single_rsr_server.o
	$(CC) $(MY_CFLAGS) -o single_rsr_server single_rsr_server.o \
	$(MY_LDFLAGS) $(MY_LIBS) 

single_rsr_client: single_rsr_client.o
	$(CC) $(MY_CFLAGS) -o single_rsr_client single_rsr_client.o \
	$(MY_LDFLAGS) $(MY_LIBS)

rsr_with_reply_server: rsr_with_reply_server.o
	$(CC) $(MY_CFLAGS) -o rsr_with_reply_server rsr_with_reply_server.o \
	$(MY_LDFLAGS) $(MY_LIBS) 

rsr_with_reply_client: rsr_with_reply_client.o
	$(CC) $(MY_CFLAGS) -o rsr_with_reply_client rsr_with_reply_client.o \
	$(MY_LDFLAGS) $(MY_LIBS)

clean:
	$(RM) -rf *.o $(EXECS)






