TESTS=test_rl test_sg
EXTRA_DIST=bandwidth_deployment.txt $(TESTS)
-if HAVE_SG
- check_PROGRAMS=bandwidth_maestro bandwidth_sensor bandwidth_simulator
+noinst_PROGRAMS=bandwidth_maestro bandwidth_sensor bandwidth_simulator
- bandwidth_simulator_SOURCES= _bandwidth_simulator.c bandwidth.c
- bandwidth_simulator_LDADD= $(top_builddir)/src/libgrassg.la $(top_builddir)/src/amok/libamok.la @LIBS_SimGrid@
-else
- check_PROGRAMS=bandwidth_maestro bandwidth_sensor
-endif
+bandwidth_simulator_SOURCES= _bandwidth_simulator.c bandwidth.c
+bandwidth_simulator_LDADD= $(top_builddir)/src/libsimgrid.la $(top_builddir)/src/amok/libamok.la
bandwidth_maestro_SOURCES= _bandwidth_maestro.c bandwidth.c
-bandwidth_sensor_SOURCES= _bandwidth_sensor.c bandwidth.c
+bandwidth_maestro_LDADD= $(top_builddir)/src/libgras.la $(top_builddir)/src/amok/libamok.la
-bandwidth_maestro_LDADD= $(top_builddir)/src/libgrasrl.la $(top_builddir)/src/amok/libamok.la
-bandwidth_sensor_LDADD= $(top_builddir)/src/libgrasrl.la $(top_builddir)/src/amok/libamok.la
+bandwidth_sensor_SOURCES= _bandwidth_sensor.c bandwidth.c
+bandwidth_sensor_LDADD= $(top_builddir)/src/libgras.la $(top_builddir)/src/amok/libamok.la
# cleanup temps
-MAINTAINERCLEANFILES=_bandwidth_simulator.c _bandwidth_maestro.c _bandwidth_sensor.c
+CLEANFILES=_bandwidth_simulator.c _bandwidth_maestro.c _bandwidth_sensor.c \
+ bandwidth.Makefile.local bandwidth.Makefile.remote bandwidth.deploy.sh
+
+MOSTLYCLEANFILES = bandwidth.trace
# generate temps
-_bandwidth_maestro.c _bandwidth_sensor.c _bandwidth_simulator.c: bandwidth_deployment.txt
- $(top_srcdir)/examples/gras_stub_generator bandwidth bandwidth_deployment.txt >/dev/null
+NAME=bandwidth
+PROCESSES= maestro sensor
+
+$(foreach proc, $(PROCESSES), _$(NAME)_$(proc).c) _$(NAME)_simulator.c: $(srcdir)/$(NAME)_deployment.xml ../../../tools/gras/gras_stub_generator@EXEEXT@
+ [ x@EXEEXT@ = x ] || exenv=wine; $$exenv ../../../tools/gras/gras_stub_generator@EXEEXT@ $(NAME) $(srcdir)/$(NAME)_deployment.xml >/dev/null
+
+../../../tools/gras/gras_stub_generator@EXEEXT@:
+ make -C ../../../tools/gras/ gras_stub_generator@EXEEXT@
+
+include $(top_srcdir)/acmacro/dist-files.mk
xbt_error_t errcode;
sensor_data_t g;
- xbt_init(&argc,argv);
+ gras_init(&argc, argv, NULL);
g=gras_userdata_new(s_sensor_data_t);
amok_bw_init();
int msg_size=64;
gras_socket_t peer;
- xbt_init(&argc,argv);
+ gras_init(&argc, argv, NULL);
g=gras_userdata_new(s_maestro_data_t);
amok_bw_init();
- gras_os_sleep(1,0);
+ gras_os_sleep(1.0);
if ((errcode=gras_socket_server(6000,&(g->sock)))) {
ERROR1("Maestro: Error %s encountered while opening the server socket",xbt_error_name(errcode));
--- /dev/null
+<?xml version='1.0'?>
+<!DOCTYPE platform_description SYSTEM "surfxml.dtd">
+<platform_description>
+ <process host="Tremblay" function="sensor">
+ <argument value="4000"/> <!-- port number -->
+ </process>
+ <process host="Ginette" function="sensor">
+ <argument value="4000"/> <!-- port number -->
+ </process>
+ <process host="Fafard" function="maestro">
+ <argument value="Tremblay"/> <!-- server host -->
+ <argument value="4000"/> <!-- port number -->
+ <argument value="Ginette"/> <!-- server host -->
+ <argument value="4000"/> <!-- port number -->
+ </process>
+</platform_description>
#! @BASH@
-if test -x ./bandwidth_simulator ; then
- exec ./bandwidth_simulator @srcdir@/../WAN_3.platform.txt @srcdir@/bandwidth_deployment.txt
+if [ x@EXEEXT@ = x ] ; then
+ exenv="libtool --mode=execute valgrind"
+else
+ exenv=wine
fi
-exit 77
+exec $exenv ./bandwidth_simulator@EXEEXT@ @top_srcdir@/examples/msg/small_platform.xml @srcdir@/bandwidth_deployment.xml $@