Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
added SMPI_DEP to configure.ac and src/Makefile.am
[simgrid.git] / src / Makefile.am
index a1b3162..5ea1193 100644 (file)
@@ -304,7 +304,7 @@ libsimgrid_la_LDFLAGS = -no-undefined $(VERSION_INFO) @SIMGRID_DEP@ @LD_DYNAMIC_
 # library (no idea why it works under linux, but it fails under windows)
 libsmpi_la_LIBADD = libsimgrid.la
 libsmpi_la_SOURCES = $(SMPI_SRC)
-libsmpi_la_LDFLAGS = $(VERSION_INFO) @LD_DYNAMIC_FLAGS@ -lm
+libsmpi_la_LDFLAGS = $(VERSION_INFO) @SMPI_DEP@ @LD_DYNAMIC_FLAGS@ -lm
 
 
 ##
@@ -358,10 +358,12 @@ 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@/config_unit.c 
+CLEANFILES=$(TEST_UNITS)
 
 BUILT_SOURCES=../include/surf/surfxml.h surf/surfxml.c \
               ../include/xbt/graphxml.h xbt/graphxml.c \
-              gras/DataDesc/ddt_parse.yy.c 
+              gras/DataDesc/ddt_parse.yy.c \
+             $(TEST_UNITS) @builddir@/simgrid_units_main.c
 
 testall_SOURCES= $(TEST_UNITS) @builddir@/simgrid_units_main.c
 testall_LDADD=libgras.la
@@ -392,8 +394,12 @@ if MAINTAINER_MODE
        @top_srcdir@/tools/sg_unit_extractor.pl @srcdir@/xbt/cunit.c
 
 clean-units:
-       rm -f simgrid_units_main.c *_unit.c
-
+       rm -f simgrid_units_main.c *_unit.c @srcdir@/simgrid_units_main.c @srcdir@/*_unit.c
+       for n in $(TEST_UNITS) ; do \
+         dep=`echo $$n|sed -e 's|.c$$|.Po|' -e 's|[^/]*/||' -e 's|^|.deps/|'`; \
+          echo "Removing dependency tracker of $$n ($$dep @srcdir@/$$dep)"; \
+         rm -vf $$dep @srcdir@/$$dep; touch $$dep; \
+        done
 else
 
 $(TEST_UNITS) simgrid_units_main.c clean-units: