X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/52a6d53cd52c33f42545da84bb52a1acc63ee648..6953fd6644e9592d95edc854f126a7be5eeca43b:/src/Makefile.am diff --git a/src/Makefile.am b/src/Makefile.am index 8aea21d847..e2bc59d614 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -66,6 +66,7 @@ EXTRA_DIST= \ \ simdag/private.h \ simdag/dax.dtd \ + simdag/dax_dtd.l \ simdag/dax_dtd.h \ simdag/dax_dtd.c \ \ @@ -194,10 +195,6 @@ SURF_SRC= \ surf/cpu_im.c \ xbt/xbt_sg_stubs.c -if CONTEXT_THREADS - SURF_SRC += xbt/xbt_os_thread.c -endif - GTNETS_SRC= \ surf/gtnets/gtnets_simulator.cc \ surf/gtnets/gtnets_topology.cc \ @@ -216,18 +213,20 @@ SIMIX_SRC= \ simix/smx_network.c if CONTEXT_THREADS - SURF_SRC += simix/smx_context_thread.c + SURF_SRC += xbt/xbt_os_thread.c simix/smx_context_thread.c + EXTRA_DIST += simix/smx_context_sysv.c else SURF_SRC += simix/smx_context_sysv.c + EXTRA_DIST += xbt/xbt_os_thread.c simix/smx_context_thread.c endif SMPI_SRC= \ smpi/smpi_base.c \ + smpi/smpi_comm.c \ + smpi/smpi_group.c \ smpi/smpi_bench.c \ smpi/smpi_global.c \ smpi/smpi_mpi.c \ - smpi/smpi_sender.c \ - smpi/smpi_receiver.c \ smpi/smpi_util.c \ smpi/smpi_coll.c \ smpi/smpi_mpi_dt.c @@ -241,7 +240,6 @@ JMSG_C_SRC = \ simix/smx_context_java.c \ java/jxbt_utilities.c java/jxbt_utilities.h \ java/jmsg.c java/jmsg.h \ - java/jmsg_channel.c java/jmsg_channel.h \ java/jmsg_host.c java/jmsg_host.h \ java/jmsg_process.c java/jmsg_process.h \ java/jmsg_task.c java/jmsg_task.h \ @@ -250,6 +248,9 @@ JMSG_C_SRC = \ JMSG_JAVA_SRC = \ java/simgrid/msg/MsgException.java \ java/simgrid/msg/JniException.java \ + java/simgrid/msg/TransferFailureException.java \ + java/simgrid/msg/HostFailureException.java \ + java/simgrid/msg/TimeoutException.java \ java/simgrid/msg/NativeException.java \ java/simgrid/msg/HostNotFoundException.java \ java/simgrid/msg/ProcessNotFoundException.java \ @@ -260,7 +261,6 @@ JMSG_JAVA_SRC = \ java/simgrid/msg/Task.java \ \ java/simgrid/msg/MsgNative.java \ - java/simgrid/msg/DTDResolver.java \ java/simgrid/msg/ApplicationHandler.java \ \ java/simgrid/msg/Sem.java @@ -330,7 +330,13 @@ endif ### Declare the library content ### -lib_LTLIBRARIES= libsimgrid.la libgras.la libsmpi.la +if HAVE_RUBY + libruby=simgrid_ruby.la +else + libruby= +endif + +lib_LTLIBRARIES= libsimgrid.la libgras.la libsmpi.la $(libruby) gras_sources=$(XBT_SRC) $(GRAS_COMMON_SRC) $(GRAS_RL_SRC) $(AMOK_SRC) simgrid_sources=$(XBT_SRC) $(SURF_SRC) $(GTNETS_USED) \ @@ -350,6 +356,12 @@ libsmpi_la_LIBADD = libsimgrid.la libsmpi_la_SOURCES = $(SMPI_SRC) libsmpi_la_LDFLAGS = $(VERSION_INFO) @SMPI_DEP@ @LD_DYNAMIC_FLAGS@ -lm +if HAVE_RUBY +simgrid_ruby_la_LIBADD = libsimgrid.la +simgrid_ruby_la_SOURCES = bindings/ruby/simgrid_ruby.c +simgrid_ruby_la_LDFLAGS = $(VERSION_INFO) @LD_DYNAMIC_FLAGS@ -lm -module +endif + # Windows users (at least, MSVC ones) need a def file. if IS_WINDOWS libgras_la_LDFLAGS += -Wl,--output-def,libgras.def @@ -371,39 +383,64 @@ clean-local: jardir = $(prefix)/jar jar_DATA = simgrid.jar -simgrid.jar: $(JMSG_JAVA_SRC) $(srcdir)/surf/simgrid.dtd +simgrid.jar: $(JMSG_JAVA_SRC) [ -e .classes ] || mkdir .classes - $(JAVAC) -d .classes $(foreach file,$(JMSG_JAVA_SRC),$(srcdir)/$(file)) + $(JAVAC) -d .classes -source 6 $(foreach file,$(JMSG_JAVA_SRC),$(srcdir)/$(file)) [ -e .classes/surf ] || mkdir .classes/surf - cp $(srcdir)/surf/simgrid.dtd .classes/surf $(JAR) cvf simgrid.jar -C .classes . else EXTRA_DIST+=$(JMSG_C_SRC) $(JMSG_JAVA_SRC) $(MSG_SRC) endif +LUA_SRC= simix/smx_context_lua.c bindings/lua/Msglua.c +if HAVE_LUA + simgrid_sources += $(LUA_SRC) +else + EXTRA_DIST += $(LUA_SRC) +endif + +RUBY_SRC= simix/smx_context_ruby.c \ + bindings/ruby/rb_msg_process.c \ + bindings/ruby/rb_msg_host.c \ + bindings/ruby/rb_msg_task.c \ + bindings/ruby/rb_application_handler.c +if HAVE_RUBY + simgrid_sources += $(RUBY_SRC) +else + EXTRA_DIST += $(RUBY_SRC) +endif ## ## Compile the libs -CLEANFILES= +CLEANFILES=supernovae_sg.c supernovae_gras.c supernovae_smpi.c +BUILT_SOURCES= + +# Cannot let automake autocompute the content of dist from +# lib*_la_SOURCES variables since it would include supernovae files, +# which are only generated sometimes, not always. +# So, use nodist_lib*_la_SOURCES variables and add stuff to EXTRA_DIST manually + +EXTRA_DIST+=$(simgrid_sources) $(gras_sources) + if SUPERNOVAE_MODE - simgrid_fragile_sources=gras/DataDesc/ddt_parse.yy.c surf/surfxml_parse.c xbt/graphxml_parse.c simdag/sd_daxloader.c gras_fragile_sources=gras/DataDesc/ddt_parse.yy.c xbt/graphxml_parse.c +BUILT_SOURCES+=supernovae_sg.c supernovae_gras.c supernovae_smpi.c supernovae_sg.c: Makefile.am - ./mk_supernovae.sh supernovae_sg.c $(filter-out $(simgrid_fragile_sources),$(simgrid_sources)) + @top_srcdir@/src/mk_supernovae.sh supernovae_sg.c $(filter-out $(simgrid_fragile_sources),$(simgrid_sources)) supernovae_gras.c: Makefile.am - ./mk_supernovae.sh supernovae_gras.c $(filter-out $(gras_fragile_sources),$(gras_sources)) + @top_srcdir@/src/mk_supernovae.sh supernovae_gras.c $(filter-out $(gras_fragile_sources),$(gras_sources)) supernovae_smpi.c: Makefile.am - ./mk_supernovae.sh supernovae_smpi.c $(filter-out $(smpi_fragile_sources),$(smpi_sources)) -CLEANFILES+=supernovae_sg.c supernovae_gras.c supernovae_smpi.c + @top_srcdir@/src/mk_supernovae.sh supernovae_smpi.c $(filter-out $(smpi_fragile_sources),$(smpi_sources)) -libsimgrid_la_SOURCES = supernovae_sg.c $(simgrid_fragile_sources) -libgras_la_SOURCES = supernovae_gras.c $(gras_fragile_sources) +nodist_libsimgrid_la_SOURCES = supernovae_sg.c $(simgrid_fragile_sources) +nodist_libgras_la_SOURCES = supernovae_gras.c $(gras_fragile_sources) else -libsimgrid_la_SOURCES = $(simgrid_sources) -libgras_la_SOURCES=$(gras_sources) +nodist_libsimgrid_la_SOURCES = $(simgrid_sources) +nodist_libgras_la_SOURCES = $(gras_sources) endif + if GRAMINE_MODE else ### @@ -429,7 +466,7 @@ TEST_UNITS= @builddir@/cunit_unit.c @builddir@/ex_unit.c \ @builddir@/xbt_str_unit.c @builddir@/xbt_strbuff_unit.c @builddir@/xbt_sha_unit.c\ @builddir@/config_unit.c @builddir@/xbt_synchro_unit.c -BUILT_SOURCES=../include/surf/simgrid_dtd.h surf/simgrid_dtd.c \ +BUILT_SOURCES+=../include/surf/simgrid_dtd.h surf/simgrid_dtd.c \ ../include/xbt/graphxml.h xbt/graphxml.c \ simdag/dax_dtd.h simdag/dax_dtd.c \ gras/DataDesc/ddt_parse.yy.c \ @@ -519,20 +556,20 @@ simdag/dax_dtd.h: simdag/dax.dtd else $(top_srcdir)/include/surf/simgrid_dtd.h surf/simgrid_dtd.l: $(top_srcdir)/src/surf/simgrid.dtd - @echo "ERROR: src/surf/simgrid.dtd was modified, but the flexml program was not detected" - @echo "ERROR: Please install it, or if you didn't modify this file, try this:" - @echo "ERROR: touch include/surf/simgrid_dtd.h src/surf/simgrid_dtd.l" - @exit 1 + @echo "WARNING: src/surf/simgrid.dtd seem to be modified, but the flexml program was not detected" + @echo "WARNING: Please install it if you did modify this file." + @echo "WARNING: For now, I'll ignore the change" + touch $(top_srcdir)/include/surf/simgrid_dtd.h $(top_srcdir)/src/surf/simgrid_dtd.l $(top_srcdir)/include/xbt/graphxml.h xbt/graphxml.l: $(top_srcdir)/src/xbt/graphxml.dtd - @echo "ERROR: src/xbt/graphxml.dtd was modified, but the flexml program was not detected" - @echo "ERROR: Please install it, or if you didn't modify this file, try this:" - @echo "ERROR: touch include/xbt/graphxml.h src/xbt/graphxml.l" - @exit 1 -simdag/dax_dtd.h simdag/dax_dtd.l: simdag/dax_dtd.dtd - @echo "ERROR: src/simdag/dax.dtd was modified, but the flexml program was not detected" - @echo "ERROR: Please install it, or if you didn't modify this file, try this:" - @echo "ERROR: touch src/simdag/dax_dtd.h src/simdag/dax_dtd.l" - @exit 1 + @echo "WARNING: src/xbt/graphxml.dtd seem to be modified, but the flexml program was not detected" + @echo "WARNING: Please install it if you did modify this file." + @echo "WARNING: For now, I'll ignore the change" + touch $(top_srcdir)/include/xbt/graphxml.h $(top_srcdir)/src/xbt/graphxml.l" +simdag/dax_dtd.h simdag/dax_dtd.l: simdag/dax.dtd + @echo "WARNING: src/simdag/dax.dtd seem to be modified, but the flexml program was not detected" + @echo "WARNING: Please install it if you did modify this file." + @echo "WARNING: For now, I'll ignore the change" + touch $(top_srcdir)/src/simdag/dax_dtd.h $(top_srcdir)/src/simdag/dax_dtd.l endif endif endif