Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
There is a new process in can
[simgrid.git] / src / Makefile.am
1 AM_CFLAGS= -g
2 #AM_CFLAGS= -DNDEBUG 
3
4 # -DNLOG   cuts absolutely all logs at compilation time.
5 # -DNDEBUG cuts asserts and logs at "trace" and "debug" levels.
6
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.
11
12
13 MAINTAINERCLEANFILES=Makefile.in
14 INCLUDES= -I$(top_srcdir)/include -I$(top_srcdir)/src/include 
15 EXTRA_DIST= \
16         \
17         portable.h \
18         \
19         xbt/dynar_private.h \
20         xbt/dict_private.h \
21         xbt/heap_private.h \
22         xbt/fifo_private.h \
23         xbt/graph_private.h \
24         xbt/graphxml_parse.c \
25         xbt/graphxml.l \
26         xbt/graphxml.c \
27         xbt/graphxml.dtd \
28         xbt/context_private.h xbt/context_win32.h xbt/context_win32.c\
29         \
30         surf/maxmin_private.h \
31         surf/trace_mgr_private.h \
32         surf/surf_private.h \
33         surf/cpu_private.h \
34         surf/workstation_private.h \
35         surf/surf_timer_private.h \
36         surf/surfxml_parse.c \
37         surf/surfxml.l \
38         surf/surfxml.c \
39         surf/surfxml.dtd \
40         surf/network_private.h \
41         surf/network_dassf_private.h \
42         surf/workstation_KCCFLN05_private.h \
43         \
44         include/surf/maxmin.h \
45         include/surf/trace_mgr.h \
46         include/surf/surf.h \
47         include/surf/surfxml_parse_private.h \
48         \
49         include/xbt/xbt_portability.h \
50         include/xbt/context.h \
51         \
52         msg/private.h \
53         \
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 \
58         \
59         amok/Bandwidth/bandwidth_private.h
60
61 #        gras_private.h
62
63 #LIBRARY_VERSION= 0:0:0
64 #                 | | |
65 #          +------+ | +---+
66 #          |        |     |
67 #       current:revision:age
68 #          |        |     |
69 #          |        |     +- Increment if interfaces have been added
70 #          |        |        Set to zero if interfaces have been removed or
71 #          |        |        changed
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
75
76 VERSION_INFO= -release 20050627 -version-info 0:0:0
77 # from `info libtool "Updating version info"` 
78 # and  `info libtool "Release numbers"` 
79 #
80 # A) For stable library (interface wise), you should use --version-info:
81 #
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)
84 #
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 # +-----------------+--------------------+-----------+------------------+
95 #
96 # B) For rapidely changing library, you should go for the -release flag
97 #
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).
100
101 lib_LTLIBRARIES= libsimgrid.la libgras.la
102 noinst_PROGRAMS=testall
103
104 COMMON_SRC=\
105   \
106   xbt/snprintf.c                                                             \
107   xbt/ex.c                                                                   \
108   \
109   xbt_modinter.h    gras_modinter.h                                          \
110   \
111   xbt/sysdep.c                                                               \
112   xbt/asserts.c                                                              \
113   xbt/log.c         xbt/log_default_appender.c                               \
114   xbt/dynar.c                                                                \
115   xbt/dict.c        xbt/dict_elm.c               xbt/dict_cursor.c           \
116   xbt/dict_multi.c                                                           \
117   xbt/heap.c                                                                 \
118   xbt/fifo.c                                                                 \
119   xbt/swag.c                                                                 \
120   xbt/graph.c                                                                \
121   xbt/set.c                                                                  \
122   xbt/module.c                                                               \
123   xbt/config.c                                                               \
124   xbt/cunit.c                                                                \
125   xbt/graphxml_parse.c                                                          \
126   \
127   gras/gras.c \
128   \
129   gras/Transport/transport.c          gras/Transport/transport_private.h  \
130   \
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 \
136   \
137   gras/Msg/msg.c                      gras/Msg/rpc.c                       gras/Msg/timer.c                 \
138   gras/Msg/msg_interface.h            gras/Msg/msg_private.h           \
139   \
140   gras/Virtu/process.c
141
142 RL_SRC= \
143   gras/Transport/rl_transport.c          \
144   gras/Transport/transport_plugin_file.c   gras/Transport/transport_plugin_tcp.c  \
145   \
146   gras/Virtu/rl_emul.c \
147   gras/Virtu/rl_process.c        gras/Virtu/rl_time.c \
148   gras/Virtu/rl_dns.c\
149   \
150   gras/Msg/rl_msg.c
151
152 SG_SRC=  \
153   xbt/context.c                                                                \
154   \
155   surf/maxmin.c                                                              \
156   surf/trace_mgr.c                                                           \
157   surf/surf.c                                                                \
158   surf/surfxml_parse.c                                                          \
159   surf/cpu.c   surf/network.c   surf/workstation.c                           \
160   surf/surf_timer.c                                                               \
161   surf/network_dassf.c                                                       \
162   surf/workstation_KCCFLN05.c  \
163   \
164   msg/msg_config.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  \
167   \
168   gras/Transport/sg_transport.c  gras/Transport/transport_plugin_sg.c             \
169   \
170   gras/Virtu/sg_emul.c \
171   gras/Virtu/sg_process.c        gras/Virtu/sg_time.c     \
172   gras/Virtu/sg_dns.c\
173   \
174   gras/Msg/sg_msg.c
175
176 AMOK_SRC= \
177   amok/base.c \
178   amok/Bandwidth/bandwidth.c amok/Bandwidth/saturate.c
179
180 ###
181 ### Testing infrastructure
182 ###
183
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.
187
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
190
191 # Suites and tests run in the given order.
192
193 TEST_CFILES=xbt/cunit.c  xbt/ex.c          \
194             xbt/dynar.c xbt/dict.c xbt/set.c xbt/swag.c \
195             xbt/config.c
196 TEST_UNITS= cunit_unit.c ex_unit.c         \
197             dynar_unit.c dict_unit.c set_unit.c swag_unit.c \
198             config_unit.c
199
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
204
205 testall_SOURCES= $(TEST_UNITS) simgrid_units_main.c
206 testall_LDADD=libgras.la
207 TESTS=testall
208
209 EXTRA_DIST+=$(testall_SOURCES)
210
211 if MAINTAINER_MODE
212 cunit_unit.c: xbt/cunit.c
213         @top_srcdir@/tools/sg_unit_extractor.pl $^
214 ex_unit.c: xbt/ex.c
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 $^
226
227 simgrid_units_main.c: $(TEST_UNITS)
228
229 else
230
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."
235         @exit 1
236
237 endif
238
239 ###
240 ### Regenerate what needs to with flex & flexml
241 ###
242
243
244 gras/DataDesc/ddt_parse.yy.c: gras/DataDesc/ddt_parse.yy.l
245         @LEX@ -o$@ -Pgras_ddt_parse_ $^
246
247 if MAINTAINER_MODE
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_ $^
252
253 if HAVE_FLEXML
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
262 else
263
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"
268         @exit 1
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"
273         @exit 1
274 endif
275 endif
276
277 ###
278 ### Declare the library content
279 ###
280
281 libgras_la_SOURCES= $(COMMON_SRC) $(RL_SRC) $(AMOK_SRC)
282 libgras_la_LDFLAGS = $(VERSION_INFO) @GRAS_DEP@ @LD_DYNAMIC_FLAGS@ -lm 
283
284 libsimgrid_la_SOURCES= $(COMMON_SRC) $(SG_SRC) $(AMOK_SRC)
285 libsimgrid_la_LDFLAGS = $(VERSION_INFO) @SIMGRID_DEP@ @LD_DYNAMIC_FLAGS@ -lm
286
287
288
289 include $(top_srcdir)/acmacro/dist-files.mk