X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3c9feb6ee162497152386c3b5d193a500604e414..31f8acb14aacb4488c5ffc83648647291f8f18f0:/src/Makefile.am diff --git a/src/Makefile.am b/src/Makefile.am index 788309d6db..8fe533dc1b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -66,8 +66,11 @@ EXTRA_DIST= \ \ simdag/private.h \ simdag/dax.dtd \ + simdag/dax_dtd.h \ + simdag/dax_dtd.c \ \ gras/DataDesc/ddt_parse.yy.l \ + gras/DataDesc/ddt_parse.yy.h \ gras/Virtu/virtu_rl.h \ gras/Virtu/virtu_sg.h \ gras/Virtu/virtu_interface.h \ @@ -85,7 +88,9 @@ EXTRA_DIST= \ smpi/private.h \ smpi/smpi_coll_private.h \ smpi/smpi_mpi_dt_private.h \ - smpi/README + smpi/README \ + \ + mk_supernovae.sh #LIBRARY_VERSION= 0:0:0 # | | | @@ -153,7 +158,7 @@ XBT_SRC=\ xbt/set.c \ xbt/xbt_matrix.c \ \ - xbt/xbt_queue.c \ + xbt/xbt_queue.c xbt/xbt_synchro.c \ \ xbt/xbt_peer.c \ \ @@ -261,7 +266,8 @@ JMSG_JAVA_SRC = \ java/simgrid/msg/Sem.java -SIMDAG_SRC= simdag/sd_global.c simdag/sd_link.c simdag/sd_task.c simdag/sd_workstation.c \ +SIMDAG_SRC= simdag/sd_global.c simdag/sd_link.c \ + simdag/sd_task.c simdag/sd_workstation.c \ simdag/sd_daxloader.c GRAS_COMMON_SRC= \ @@ -278,7 +284,7 @@ GRAS_COMMON_SRC= \ 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/DataDesc/ddt_parse.c gras/DataDesc/ddt_parse.yy.c GRAS_RL_SRC= \ gras/rl_stubs.c xbt/xbt_os_thread.c \ @@ -326,12 +332,14 @@ endif lib_LTLIBRARIES= libsimgrid.la libgras.la libsmpi.la -libgras_la_SOURCES= $(XBT_SRC) $(GRAS_COMMON_SRC) $(GRAS_RL_SRC) $(AMOK_SRC) +gras_sources=$(XBT_SRC) $(GRAS_COMMON_SRC) $(GRAS_RL_SRC) $(AMOK_SRC) +simgrid_sources=$(XBT_SRC) $(SURF_SRC) $(GTNETS_USED) \ + $(SIMIX_SRC) $(MSG_SRC) $(SIMDAG_SRC) \ + $(GRAS_COMMON_SRC) $(GRAS_SG_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) \ - $(SIMIX_SRC) $(MSG_SRC) $(SIMDAG_SRC) \ - $(GRAS_COMMON_SRC) $(GRAS_SG_SRC) $(AMOK_SRC) libsimgrid_la_LDFLAGS = -no-undefined $(VERSION_INFO) @SIMGRID_DEP@ @LD_DYNAMIC_FLAGS@ -lm # -Wl,--entry -Wl,simgrid_version @@ -355,7 +363,7 @@ endif EXTRA_DIST+=$(JMSG_JAVA_SRC) if HAVE_JAVA -libsimgrid_la_SOURCES += $(JMSG_C_SRC) # add the binding support to the library +simgrid_sources += $(JMSG_C_SRC) # add the binding support to the library clean-local: -rm -rf .classes simgrid.jar @@ -373,6 +381,38 @@ else EXTRA_DIST+=$(JMSG_C_SRC) $(JMSG_JAVA_SRC) $(MSG_SRC) endif +## +## Compile the libs +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 + @top_srcdir@/src/mk_supernovae.sh supernovae_sg.c $(filter-out $(simgrid_fragile_sources),$(simgrid_sources)) +supernovae_gras.c: Makefile.am + @top_srcdir@/src/mk_supernovae.sh supernovae_gras.c $(filter-out $(gras_fragile_sources),$(gras_sources)) +supernovae_smpi.c: Makefile.am + @top_srcdir@/src/mk_supernovae.sh supernovae_smpi.c $(filter-out $(smpi_fragile_sources),$(smpi_sources)) + +nodist_libsimgrid_la_SOURCES = supernovae_sg.c $(simgrid_fragile_sources) +nodist_libgras_la_SOURCES = supernovae_gras.c $(gras_fragile_sources) +else +nodist_libsimgrid_la_SOURCES = $(simgrid_sources) +nodist_libgras_la_SOURCES = $(gras_sources) +endif + + if GRAMINE_MODE else ### @@ -391,14 +431,14 @@ 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/xbt_str.c xbt/xbt_sha.c \ - xbt/config.c + xbt/xbt_str.c xbt/xbt_strbuff.c xbt/xbt_sha.c \ + xbt/config.c xbt/xbt_synchro.c TEST_UNITS= @builddir@/cunit_unit.c @builddir@/ex_unit.c \ @builddir@/dynar_unit.c @builddir@/dict_unit.c @builddir@/set_unit.c @builddir@/swag_unit.c \ @builddir@/xbt_str_unit.c @builddir@/xbt_strbuff_unit.c @builddir@/xbt_sha_unit.c\ - @builddir@/config_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 \ @@ -412,10 +452,9 @@ TESTS_ENVIRONMENT=$(SG_TEST_EXENV) EXTRA_DIST+=$(testall_SOURCES) if MAINTAINER_MODE -CLEANFILES=$(TEST_UNITS) +CLEANFILES+=$(TEST_UNITS) -$(TEST_UNITS): xbt/cunit.c xbt/ex.c xbt/xbt_str.c xbt/xbt_strbuff.c xbt/xbt_sha.c\ - xbt/dynar.c xbt/dict.c xbt/set.c xbt/swag.c xbt/config.c +$(TEST_UNITS): $(TEST_CFILES) @top_srcdir@/tools/sg_unit_extractor.pl $^ @builddir@/simgrid_units_main.c: $(TEST_UNITS) @@ -480,9 +519,10 @@ $(top_srcdir)/include/xbt/graphxml.h: $(srcdir)/xbt/graphxml.dtd sed 's/XBT_PUBLIC_DATA(\([^)]*\)) *\([^(]*\)(/XBT_PUBLIC(\1) \2(/' -i $@ simdag/dax_dtd.l: simdag/dax.dtd - set -e; flexml -b 1000000 -P dax_ --sysid=dax.dtd -S $@ -L $^ + set -e; flexml -b 1000000 --root-tags adag -P dax_ --sysid=dax.dtd -S $@ -L $^ + sed -i 's/SET(DOCTYPE)/SET(ROOT_dax__adag)/' simdag/dax_dtd.l # DOCTYPE not mandatory simdag/dax_dtd.h: simdag/dax.dtd - set -e; flexml -P dax_ --sysid=dax.dtd -H $@ -L $^ + set -e; flexml --root-tags adag -P dax_ --sysid=dax.dtd -H $@ -L $^ sed 's/extern *\([^ ]*[ \*]*\)/XBT_PUBLIC_DATA(\1) /' -i $@ sed 's/XBT_PUBLIC_DATA(\([^)]*\)) *\([^(]*\)(/XBT_PUBLIC(\1) \2(/' -i $@ else @@ -497,7 +537,7 @@ $(top_srcdir)/include/xbt/graphxml.h xbt/graphxml.l: $(top_srcdir)/src/xbt/graph @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 +simdag/dax_dtd.h simdag/dax_dtd.l: simdag/dax.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"