X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/95a9adeef48546cce979a75954d9fbe86e0e79cf..ee1ae984b7ed9175a5b9901f1c81c4155da13585:/src/Makefile.am diff --git a/src/Makefile.am b/src/Makefile.am index 73fbd03537..ce1844335b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS+= -g +AM_CFLAGS+= -g @GTNETS_CFLAGS@ #AM_CFLAGS= -DNDEBUG # -DNLOG cuts absolutely all logs at compilation time. @@ -56,19 +56,11 @@ EXTRA_DIST= \ \ simdag/private.h \ \ - gras/Transport/transport_interface.h \ - gras/Virtu/virtu_interface.h gras/Virtu/virtu_private.h\ - gras/Virtu/virtu_rl.h gras/Virtu/virtu_sg.h \ - gras/DataDesc/ddt_parse.yy.l gras/DataDesc/ddt_parse.yy.c \ - \ amok/Bandwidth/bandwidth_private.h \ amok/amok_modinter.h - -if USE_SIMIX - EXTRA_DIST+=include/simix/simix.h include/simix/datatypes.h simix/msg_simix_private.h -endif - -# gras_private.h + \ + include/simix/simix.h include/simix/datatypes.h \ + simix/msg_simix_private.h #LIBRARY_VERSION= 0:0:0 # | | | @@ -83,7 +75,7 @@ endif # | Set to zero if current is incremented # +- Increment if interfaces have been added, removed or changed -VERSION_INFO= -version-info 1:0:0 +VERSION_INFO= -version-info 2:0:0 # from `info libtool "Updating version info"` # and `info libtool "Release numbers"` # @@ -108,18 +100,24 @@ VERSION_INFO= -version-info 1:0:0 # It modifies the library name, and you thus cannot say that a library # using this trick is ready for a "stable" release (say, in Debian). -lib_LTLIBRARIES= libsimgrid.la libgras.la +lib_LTLIBRARIES= libsimgrid.la libgras.la + +################################################ +# Declaration of the different modules content # +################################################ -COMMON_SRC=\ +XBT_SRC=\ \ - xbt/snprintf.c xbt/getline.c xbt/trim.c \ + xbt/snprintf.c xbt/xbt_str.c \ xbt/ex.c \ \ xbt_modinter.h gras_modinter.h \ + xbt/xbt_virtu.c \ \ xbt/sysdep.c \ xbt/asserts.c \ - xbt/log.c xbt/log_default_appender.c \ + xbt/log.c xbt/xbt_log_appender_file.c \ + xbt/xbt_log_layout_simple.c xbt/xbt_log_layout_format.c \ xbt/mallocator.c \ xbt/dynar.c \ xbt/dict.c xbt/dict_elm.c xbt/dict_cursor.c \ @@ -134,39 +132,9 @@ COMMON_SRC=\ xbt/xbt_main.c \ xbt/config.c \ xbt/cunit.c \ - xbt/graphxml_parse.c \ - \ - gras/gras.c \ - \ - gras/Transport/transport.c gras/Transport/transport_private.h \ - \ - gras/DataDesc/ddt_create.c \ - gras/DataDesc/ddt_convert.c gras/DataDesc/ddt_exchange.c \ - gras/DataDesc/cbps.c gras/DataDesc/datadesc.c \ - gras/DataDesc/datadesc_interface.h gras/DataDesc/datadesc_private.h \ - gras/DataDesc/ddt_parse.c gras/DataDesc/ddt_parse.yy.c gras/DataDesc/ddt_parse.yy.h \ - \ - gras/Msg/msg.c gras/Msg/rpc.c gras/Msg/timer.c \ - gras/Msg/msg_interface.h gras/Msg/msg_private.h \ - \ - gras/Virtu/process.c gras/Virtu/gras_module.c - -RL_SRC= \ - gras/rl_stubs.c xbt/xbt_thread.c \ - \ - gras/Transport/rl_transport.c \ - gras/Transport/transport_plugin_file.c gras/Transport/transport_plugin_tcp.c \ - \ - gras/Virtu/rl_emul.c \ - gras/Virtu/rl_process.c gras/Virtu/rl_time.c \ - gras/Virtu/rl_dns.c\ - \ - gras/Msg/rl_msg.c + xbt/graphxml_parse.c -SG_SRC= \ - gras/sg_stubs.c \ - xbt/context.c \ - \ +SURF_SRC= \ surf/maxmin.c \ surf/lagrange.c \ surf/trace_mgr.c \ @@ -175,22 +143,16 @@ SG_SRC= \ surf/cpu.c surf/network.c surf/workstation.c \ surf/surf_timer.c \ surf/network_dassf.c \ - surf/workstation_KCCFLN05.c \ - \ - simdag/sd_global.c simdag/sd_link.c simdag/sd_task.c \ - simdag/sd_workstation.c \ - \ - gras/Transport/sg_transport.c gras/Transport/transport_plugin_sg.c \ - \ - gras/Virtu/sg_emul.c \ - gras/Virtu/sg_process.c gras/Virtu/sg_time.c \ - gras/Virtu/sg_dns.c\ - \ - gras/Msg/sg_msg.c + surf/workstation_KCCFLN05.c -if HAVE_SDP - SG_SRC+= surf/sdp.c -endif +GTNETS_SRC= \ + surf/gtnets/gtnets_simulator.cc \ + surf/gtnets/gtnets_topology.cc \ + surf/gtnets/gtnets_interface.cc \ + surf/network_gtnets.c + +# Separated because we don't want it in libsimgrid4java +CTX_SRC= xbt/context.c SIMIX_SRC= \ simix/smx_global.c \ @@ -206,30 +168,79 @@ MSG_SRC= msg/msg_config.c \ msg/task.c msg/host.c msg/m_process.c msg/gos.c \ msg/global.c msg/environment.c msg/deployment.c -MSG_SIMIX_SRC= msg_simix/msg_simix_config.c \ - msg_simix/msg_simix_task.c \ - msg_simix/msg_simix_host.c \ - msg_simix/msg_simix_process.c \ - msg_simix/msg_simix_gos.c \ - msg_simix/msg_simix_global.c \ - msg_simix/msg_simix_environment.c \ - msg_simix/msg_simix_deployment.c - -if USE_SIMIX - SG_SRC+=$(SIMIX_SRC) - SG_SRC+=$(MSG_SIMIX_SRC) - EXTRA_DIST+=$(MSG_SRC) -else - EXTRA_DIST+=$(SIMIX_SRC) - EXTRA_DIST+=$(MSG_SIMIX_SRC) - SG_SRC+=$(MSG_SRC) -endif +SIMDAG_SRC= simdag/sd_global.c simdag/sd_link.c simdag/sd_task.c simdag/sd_workstation.c + +GRAS_COMMON_SRC= \ + gras/gras.c \ + gras/Transport/transport.c gras/Transport/transport_private.h \ + gras/Msg/msg.c gras/Msg/rpc.c gras/Msg/timer.c \ + gras/Msg/msg_interface.h gras/Msg/msg_private.h \ + \ + gras/Virtu/process.c gras/Virtu/gras_module.c \ + \ + gras/DataDesc/ddt_create.c \ + gras/DataDesc/ddt_convert.c gras/DataDesc/ddt_exchange.c \ + gras/DataDesc/cbps.c gras/DataDesc/datadesc.c \ + gras/DataDesc/datadesc_interface.h gras/DataDesc/datadesc_private.h \ + gras/DataDesc/ddt_parse.c gras/DataDesc/ddt_parse.yy.c gras/DataDesc/ddt_parse.yy.h + +GRAS_RL_SRC= \ + gras/rl_stubs.c xbt/xbt_thread.c \ + \ + gras/Transport/rl_transport.c \ + gras/Transport/transport_plugin_file.c gras/Transport/transport_plugin_tcp.c \ + \ + gras/Virtu/rl_emul.c \ + gras/Virtu/rl_process.c gras/Virtu/rl_time.c \ + gras/Virtu/rl_dns.c\ + \ + gras/Msg/rl_msg.c + +GRAS_SG_SRC= gras/Transport/sg_transport.c gras/Transport/transport_plugin_sg.c \ + \ + gras/Virtu/sg_emul.c \ + gras/Virtu/sg_process.c gras/Virtu/sg_time.c \ + gras/Virtu/sg_dns.c\ + \ + gras/sg_stubs.c \ + gras/Msg/sg_msg.c AMOK_SRC= \ amok/amok_base.c \ amok/Bandwidth/bandwidth.c amok/Bandwidth/saturate.c \ amok/PeerManagement/peermanagement.c +############################## +# Deal with optional modules # +############################## + +if USE_GTNETS + GTNETS_USED=$(GTNETS_SRC) +else + GTNETS_USED= + EXTRA_DIST+=$(GTNETS_SRC) +endif + +if HAVE_SDP + SDP_SRC= surf/sdp.c +else + SDP_SRC= + EXTRA_DIST+=surf/sdp.c +endif + +### +### Declare the library content +### + +libgras_la_SOURCES= $(XBT_SRC) $(GRAS_COMMON_SRC) $(GRAS_RL_SRC) $(AMOK_SRC) +libgras_la_LDFLAGS = -no-undefined $(VERSION_INFO) @GRAS_DEP@ @LD_DYNAMIC_FLAGS@ -lm + +libsimgrid_la_SOURCES = $(XBT_SRC) $(SURF_SRC) $(GTNETS_USED) $(SDP_SRC) \ + $(SIMIX_SRC) $(CTX_SRC) \ + $(MSG_SRC) $(SIMDAG_SRC) \ + $(GRAS_COMMON_SRC) $(GRAS_SG_SRC) $(AMOK_SRC) +libsimgrid_la_LDFLAGS = -no-undefined $(VERSION_INFO) @GTNETS_LDFLAGS@ @SIMGRID_DEP@ @LD_DYNAMIC_FLAGS@ -lm + if GRAMINE_MODE else ### @@ -248,10 +259,12 @@ else noinst_PROGRAMS=testall TEST_CFILES=xbt/cunit.c xbt/ex.c \ xbt/dynar.c xbt/dict.c xbt/set.c xbt/swag.c \ - xbt/config.c + xbt/xbt_str.c \ + xbt/config.c TEST_UNITS= ./cunit_unit.c ./ex_unit.c \ ./dynar_unit.c ./dict_unit.c ./set_unit.c ./swag_unit.c \ - ./config_unit.c + ./xbt_str_unit.c \ + ./config_unit.c BUILT_SOURCES=../include/surf/surfxml.h surf/surfxml.c \ ../include/xbt/graphxml.h xbt/graphxml.c \ @@ -261,6 +274,7 @@ BUILT_SOURCES=../include/surf/surfxml.h surf/surfxml.c \ testall_SOURCES= $(TEST_UNITS) simgrid_units_main.c testall_LDADD=libgras.la TESTS=testall +TESTS_ENVIRONMENT=$(SG_TEST_EXENV) EXTRA_DIST+=$(testall_SOURCES) @@ -269,6 +283,8 @@ if MAINTAINER_MODE @top_srcdir@/tools/sg_unit_extractor.pl $^ ./ex_unit.c: xbt/ex.c @top_srcdir@/tools/sg_unit_extractor.pl $^ +./xbt_str_unit.c: xbt/xbt_str.c + @top_srcdir@/tools/sg_unit_extractor.pl $^ ./dynar_unit.c: xbt/dynar.c @top_srcdir@/tools/sg_unit_extractor.pl $^ ./dict_unit.c: xbt/dict.c @@ -336,16 +352,4 @@ endif endif endif -### -### Declare the library content -### - -libgras_la_SOURCES= $(COMMON_SRC) $(RL_SRC) $(AMOK_SRC) -libgras_la_LDFLAGS = -no-undefined $(VERSION_INFO) @GRAS_DEP@ @LD_DYNAMIC_FLAGS@ -lm - -libsimgrid_la_SOURCES= $(COMMON_SRC) $(SG_SRC) $(AMOK_SRC) -libsimgrid_la_LDFLAGS = -no-undefined $(VERSION_INFO) @SIMGRID_DEP@ @LD_DYNAMIC_FLAGS@ -lm - - - include $(top_srcdir)/acmacro/dist-files.mk