4 # -DNLOG cuts absolutely all logs at compilation time.
5 # -DNDEBUG cuts asserts and logs at "trace" and "debug" levels.
7 # -g -ffast-math -funroll-loops -O3 -fno-strict-aliasing
8 # Those should be added by configure when using gcc
9 # fast-math is nasty when using IEEE floating point semantic
10 # strict-aliasing breaks my type-punning bad habit.
13 MAINTAINERCLEANFILES=Makefile.in
14 INCLUDES= -I$(top_srcdir)/include -I$(top_srcdir)/src/include
24 xbt/graphxml_parse.c \
28 xbt/context_private.h xbt/context_win32.h xbt/context_win32.c\
30 surf/maxmin_private.h \
31 surf/trace_mgr_private.h \
34 surf/workstation_private.h \
35 surf/surf_timer_private.h \
36 surf/surfxml_parse.c \
40 surf/network_private.h \
41 surf/network_dassf_private.h \
42 surf/workstation_KCCFLN05_private.h \
44 include/surf/maxmin.h \
45 include/surf/trace_mgr.h \
47 include/surf/surfxml_parse_private.h \
49 include/xbt/xbt_portability.h \
50 include/xbt/context.h \
54 gras/Transport/transport_interface.h \
55 gras/Virtu/virtu_interface.h gras/Virtu/virtu_private.h\
56 gras/Virtu/virtu_rl.h gras/Virtu/virtu_sg.h \
57 gras/DataDesc/ddt_parse.yy.l gras/DataDesc/ddt_parse.yy.c \
59 amok/Bandwidth/bandwidth_private.h
63 #LIBRARY_VERSION= 0:0:0
67 # current:revision:age
69 # | | +- Increment if interfaces have been added
70 # | | Set to zero if interfaces have been removed or
72 # | +- Increment if source code has changed
73 # | Set to zero if current is incremented
74 # +- Increment if interfaces have been added, removed or changed
76 VERSION_INFO= -release 20050627 -version-info 0:0:0
77 # from `info libtool "Updating version info"`
78 # and `info libtool "Release numbers"`
80 # A) For stable library (interface wise), you should use --version-info:
82 # - Begin with C:R:A = 0:0:0 (ie here, VERSION_INFO= -version-info 0:0:0)
83 # - Do not update it before public release (keep numbers small)
85 # ----------------------------------------------------------------------+
86 # + Interface | code of existing | Interface | New version info |
87 # | removal/change? | interface changed? | addition? | |
88 # +-----------------+--------------------+-----------+------------------+
89 # | yes | must be yes ;) | | C++ : 0 : 0 |
90 # | no | yes | yes | C : R++ : A++ |
91 # | no | yes | no | C : R++ : A |
92 # | no | no | yes | C : R : A++ |
93 # | no | no | no | C : R : A |
94 # +-----------------+--------------------+-----------+------------------+
96 # B) For rapidely changing library, you should go for the -release flag
98 # It modifies the library name, and you thus cannot say that a library
99 # using this trick is ready for a "stable" release (say, in Debian).
101 lib_LTLIBRARIES= libsimgrid.la libgras.la
102 noinst_PROGRAMS=testall
109 xbt_modinter.h gras_modinter.h \
113 xbt/log.c xbt/log_default_appender.c \
115 xbt/dict.c xbt/dict_elm.c xbt/dict_cursor.c \
125 xbt/graphxml_parse.c \
129 gras/Transport/transport.c gras/Transport/transport_private.h \
131 gras/DataDesc/ddt_create.c \
132 gras/DataDesc/ddt_convert.c gras/DataDesc/ddt_exchange.c \
133 gras/DataDesc/cbps.c gras/DataDesc/datadesc.c \
134 gras/DataDesc/datadesc_interface.h gras/DataDesc/datadesc_private.h \
135 gras/DataDesc/ddt_parse.c gras/DataDesc/ddt_parse.yy.c gras/DataDesc/ddt_parse.yy.h \
137 gras/Msg/msg.c gras/Msg/rpc.c gras/Msg/timer.c \
138 gras/Msg/msg_interface.h gras/Msg/msg_private.h \
143 gras/Transport/rl_transport.c \
144 gras/Transport/transport_plugin_file.c gras/Transport/transport_plugin_tcp.c \
146 gras/Virtu/rl_emul.c \
147 gras/Virtu/rl_process.c gras/Virtu/rl_time.c \
158 surf/surfxml_parse.c \
159 surf/cpu.c surf/network.c surf/workstation.c \
161 surf/network_dassf.c \
162 surf/workstation_KCCFLN05.c \
165 msg/task.c msg/host.c msg/m_process.c msg/gos.c \
166 msg/global.c msg/environment.c msg/deployment.c \
168 gras/Transport/sg_transport.c gras/Transport/transport_plugin_sg.c \
170 gras/Virtu/sg_emul.c \
171 gras/Virtu/sg_process.c gras/Virtu/sg_time.c \
178 amok/Bandwidth/bandwidth.c amok/Bandwidth/saturate.c
181 ### Testing infrastructure
184 # Test files must be added both to the TEST_CFILES and TEST_UNITS because
185 # if I compute TEST_UNITS from TEST_CFILES, automake fails to note that they
186 # are generated. Sorry about that.
188 # If you add a test unit, you should regenerate simgrid_units_main.c from scratch:
189 # rm -f simgrid_units_main.c *_unit.c ; make testall
191 # Suites and tests run in the given order.
193 TEST_CFILES=xbt/cunit.c xbt/ex.c \
194 xbt/dynar.c xbt/dict.c xbt/set.c xbt/swag.c \
196 TEST_UNITS= cunit_unit.c ex_unit.c \
197 dynar_unit.c dict_unit.c set_unit.c swag_unit.c \
200 BUILT_SOURCES=../include/surf/surfxml.h surf/surfxml.c \
201 ../include/xbt/graphxml.h xbt/graphxml.c \
202 gras/DataDesc/ddt_parse.yy.c \
203 $(TEST_UNITS) simgrid_units_main.c
205 testall_SOURCES= $(TEST_UNITS) simgrid_units_main.c
206 testall_LDADD=libgras.la
209 EXTRA_DIST+=$(testall_SOURCES)
212 cunit_unit.c: xbt/cunit.c
213 @top_srcdir@/tools/sg_unit_extractor.pl $^
215 @top_srcdir@/tools/sg_unit_extractor.pl $^
216 dynar_unit.c: xbt/dynar.c
217 @top_srcdir@/tools/sg_unit_extractor.pl $^
218 dict_unit.c: xbt/dict.c
219 @top_srcdir@/tools/sg_unit_extractor.pl $^
220 set_unit.c: xbt/set.c
221 @top_srcdir@/tools/sg_unit_extractor.pl $^
222 swag_unit.c: xbt/swag.c
223 @top_srcdir@/tools/sg_unit_extractor.pl $^
224 config_unit.c: xbt/config.c
225 @top_srcdir@/tools/sg_unit_extractor.pl $^
227 simgrid_units_main.c: $(TEST_UNITS)
231 $(TEST_UNITS) simgrid_units_main.c:
232 @echo "ERROR: Test units not generated."
233 @echo "ERROR: If you are using a CVS checkout, configure with the --enable-maintainer-mode flag"
234 @echo "ERROR: If not, please report the bug to the simgrid-devel mailing list."
240 ### Regenerate what needs to with flex & flexml
244 gras/DataDesc/ddt_parse.yy.c: gras/DataDesc/ddt_parse.yy.l
245 @LEX@ -o$@ -Pgras_ddt_parse_ $^
248 surf/surfxml.c: surf/surfxml.l
249 @LEX@ -o$@ -Psurf_parse_ $^
250 xbt/graphxml.c: xbt/graphxml.l
251 @LEX@ -o$@ -Pxbt_graph_parse_ $^
254 surf/surfxml.l: surf/surfxml.dtd
255 set -e; cd surf; flexml -b 1000000 -P surfxml -S -L surfxml.dtd
256 ../include/surf/surfxml.h: surf/surfxml.dtd
257 cd ../include/surf; flexml -P surfxml -H -L ../../src/surf/surfxml.dtd
258 xbt/graphxml.l: xbt/graphxml.dtd
259 set -e; cd xbt; flexml -b 1000000 -P graphxml -S -L graphxml.dtd
260 ../include/xbt/graphxml.h: xbt/graphxml.dtd
261 cd ../include/xbt; flexml -P graphxml -H -L ../../src/xbt/graphxml.dtd
264 ../include/surf/surfxml.h surf/surfxml.l: surf/surfxml.dtd
265 @echo "ERROR: src/surf/surfxml.dtd was modified, but the flexml program was not detected"
266 @echo "ERROR: Please install it, or if you didn't modify this file, try this:"
267 @echo "ERROR: touch src/include/surf/surfxml.h src/surf/surfxml.l"
269 ../include/xbt/graphxml.h xbt/graphxml.l: xbt/graphxml.dtd
270 @echo "ERROR: src/xbt/graphxml.dtd was modified, but the flexml program was not detected"
271 @echo "ERROR: Please install it, or if you didn't modify this file, try this:"
272 @echo "ERROR: touch src/include/xbt/graphxml.h src/xbt/graphxml.l"
278 ### Declare the library content
281 libgras_la_SOURCES= $(COMMON_SRC) $(RL_SRC) $(AMOK_SRC)
282 libgras_la_LDFLAGS = $(VERSION_INFO) @GRAS_DEP@ @LD_DYNAMIC_FLAGS@ -lm
284 libsimgrid_la_SOURCES= $(COMMON_SRC) $(SG_SRC) $(AMOK_SRC)
285 libsimgrid_la_LDFLAGS = $(VERSION_INFO) @SIMGRID_DEP@ @LD_DYNAMIC_FLAGS@ -lm
289 include $(top_srcdir)/acmacro/dist-files.mk