Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Getting rid of useless field
[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         xbt/ex_interface.h \
30         \
31         surf/maxmin_private.h \
32         surf/trace_mgr_private.h \
33         surf/surf_private.h \
34         surf/cpu_private.h \
35         surf/workstation_private.h \
36         surf/surf_timer_private.h \
37         surf/surfxml_parse.c \
38         surf/surfxml.l \
39         surf/surfxml.c \
40         surf/surfxml.dtd \
41         surf/network_private.h \
42         surf/network_dassf_private.h \
43         surf/workstation_KCCFLN05_private.h \
44         \
45         include/surf/maxmin.h \
46         include/surf/trace_mgr.h \
47         include/surf/surf.h \
48         include/surf/surfxml_parse_private.h \
49         \
50         include/xbt/xbt_portability.h \
51         include/xbt/context.h \
52         \
53         msg/private.h \
54         \
55         gras/Transport/transport_interface.h \
56         gras/Virtu/virtu_interface.h          gras/Virtu/virtu_private.h\
57         gras/Virtu/virtu_rl.h                 gras/Virtu/virtu_sg.h \
58         gras/DataDesc/ddt_parse.yy.l          gras/DataDesc/ddt_parse.yy.c \
59         \
60         amok/Bandwidth/bandwidth_private.h
61
62 #        gras_private.h
63
64 #LIBRARY_VERSION= 0:0:0
65 #                 | | |
66 #          +------+ | +---+
67 #          |        |     |
68 #       current:revision:age
69 #          |        |     |
70 #          |        |     +- Increment if interfaces have been added
71 #          |        |        Set to zero if interfaces have been removed or
72 #          |        |        changed
73 #          |        +- Increment if source code has changed
74 #          |           Set to zero if current is incremented
75 #          +- Increment if interfaces have been added, removed or changed
76
77 VERSION_INFO= -release 20050627 -version-info 0:0:0
78 # from `info libtool "Updating version info"` 
79 # and  `info libtool "Release numbers"` 
80 #
81 # A) For stable library (interface wise), you should use --version-info:
82 #
83 # - Begin with C:R:A = 0:0:0 (ie here, VERSION_INFO= -version-info 0:0:0)
84 # - Do not update it before public release (keep numbers small)
85 #
86 # ----------------------------------------------------------------------+
87 # +   Interface     |  code of existing  | Interface | New version info |
88 # | removal/change? | interface changed? | addition? |                  |
89 # +-----------------+--------------------+-----------+------------------+
90 # |      yes        |   must be yes ;)   |           |  C++ : 0   : 0   |
91 # |      no         |        yes         |    yes    |  C   : R++ : A++ |
92 # |      no         |        yes         |    no     |  C   : R++ : A   |
93 # |      no         |        no          |    yes    |  C   : R   : A++ |
94 # |      no         |        no          |    no     |  C   : R   : A   |
95 # +-----------------+--------------------+-----------+------------------+
96 #
97 # B) For rapidely changing library, you should go for the -release flag
98 #
99 #  It modifies the library name, and you thus cannot say that a library
100 #   using this trick is ready for a "stable" release (say, in Debian).
101
102 lib_LTLIBRARIES= libsimgrid.la libgras.la
103 noinst_PROGRAMS=testall
104
105 COMMON_SRC=\
106   \
107   xbt/snprintf.c                                                             \
108   xbt/ex.c                                                                   \
109   \
110   xbt_modinter.h    gras_modinter.h                                          \
111   \
112   xbt/sysdep.c                                                               \
113   xbt/asserts.c                                                              \
114   xbt/log.c         xbt/log_default_appender.c                               \
115   xbt/dynar.c                                                                \
116   xbt/dict.c        xbt/dict_elm.c               xbt/dict_cursor.c           \
117   xbt/dict_multi.c                                                           \
118   xbt/heap.c                                                                 \
119   xbt/fifo.c                                                                 \
120   xbt/swag.c                                                                 \
121   xbt/graph.c                                                                \
122   xbt/set.c                                                                  \
123   xbt/xbt_host.c                                                             \
124   xbt/module.c                                                               \
125   xbt/config.c                                                               \
126   xbt/cunit.c                                                                \
127   xbt/graphxml_parse.c                                                       \
128   \
129   gras/gras.c \
130   \
131   gras/Transport/transport.c          gras/Transport/transport_private.h  \
132   \
133   gras/DataDesc/ddt_create.c          \
134   gras/DataDesc/ddt_convert.c         gras/DataDesc/ddt_exchange.c     \
135   gras/DataDesc/cbps.c                gras/DataDesc/datadesc.c         \
136   gras/DataDesc/datadesc_interface.h  gras/DataDesc/datadesc_private.h \
137   gras/DataDesc/ddt_parse.c           gras/DataDesc/ddt_parse.yy.c         gras/DataDesc/ddt_parse.yy.h \
138   \
139   gras/Msg/msg.c                      gras/Msg/rpc.c                       gras/Msg/timer.c                 \
140   gras/Msg/msg_interface.h            gras/Msg/msg_private.h           \
141   \
142   gras/Virtu/process.c
143
144 RL_SRC= \
145   gras/Transport/rl_transport.c          \
146   gras/Transport/transport_plugin_file.c   gras/Transport/transport_plugin_tcp.c  \
147   \
148   gras/Virtu/rl_emul.c \
149   gras/Virtu/rl_process.c        gras/Virtu/rl_time.c \
150   gras/Virtu/rl_dns.c\
151   \
152   gras/Msg/rl_msg.c
153
154 SG_SRC=  \
155   xbt/context.c                                                                \
156   \
157   surf/maxmin.c                                                              \
158   surf/trace_mgr.c                                                           \
159   surf/surf.c                                                                \
160   surf/surfxml_parse.c                                                          \
161   surf/cpu.c   surf/network.c   surf/workstation.c                           \
162   surf/surf_timer.c                                                               \
163   surf/network_dassf.c                                                       \
164   surf/workstation_KCCFLN05.c  \
165   \
166   msg/msg_config.c \
167   msg/task.c msg/host.c msg/m_process.c msg/gos.c \
168   msg/global.c msg/environment.c msg/deployment.c  \
169   \
170   gras/Transport/sg_transport.c  gras/Transport/transport_plugin_sg.c             \
171   \
172   gras/Virtu/sg_emul.c \
173   gras/Virtu/sg_process.c        gras/Virtu/sg_time.c     \
174   gras/Virtu/sg_dns.c\
175   \
176   gras/Msg/sg_msg.c
177
178 AMOK_SRC= \
179   amok/base.c \
180   amok/Bandwidth/bandwidth.c amok/Bandwidth/saturate.c \
181   amok/HostManagement/hostmanagement.c
182
183 ###
184 ### Testing infrastructure
185 ###
186
187 # Test files must be added both to the TEST_CFILES and TEST_UNITS because
188 # if I compute TEST_UNITS from TEST_CFILES, automake fails to note that they
189 # are generated. Sorry about that.
190
191 # If you add a test unit, you should regenerate simgrid_units_main.c from scratch:
192 # rm -f simgrid_units_main.c *_unit.c ; make testall
193
194 # Suites and tests run in the given order.
195
196 TEST_CFILES=xbt/cunit.c  xbt/ex.c          \
197             xbt/dynar.c xbt/dict.c xbt/set.c xbt/swag.c \
198             xbt/config.c
199 TEST_UNITS= cunit_unit.c ex_unit.c         \
200             dynar_unit.c dict_unit.c set_unit.c swag_unit.c \
201             config_unit.c
202
203 BUILT_SOURCES=../include/surf/surfxml.h surf/surfxml.c \
204               ../include/xbt/graphxml.h xbt/graphxml.c \
205               gras/DataDesc/ddt_parse.yy.c \
206               $(TEST_UNITS) simgrid_units_main.c
207
208 testall_SOURCES= $(TEST_UNITS) simgrid_units_main.c
209 testall_LDADD=libgras.la
210 TESTS=testall
211
212 EXTRA_DIST+=$(testall_SOURCES)
213
214 if MAINTAINER_MODE
215 cunit_unit.c: xbt/cunit.c
216         @top_srcdir@/tools/sg_unit_extractor.pl $^
217 ex_unit.c: xbt/ex.c
218         @top_srcdir@/tools/sg_unit_extractor.pl $^
219 dynar_unit.c: xbt/dynar.c
220         @top_srcdir@/tools/sg_unit_extractor.pl $^
221 dict_unit.c: xbt/dict.c
222         @top_srcdir@/tools/sg_unit_extractor.pl $^
223 set_unit.c: xbt/set.c
224         @top_srcdir@/tools/sg_unit_extractor.pl $^
225 swag_unit.c: xbt/swag.c
226         @top_srcdir@/tools/sg_unit_extractor.pl $^
227 config_unit.c: xbt/config.c
228         @top_srcdir@/tools/sg_unit_extractor.pl $^
229
230 simgrid_units_main.c: $(TEST_UNITS)
231
232 else
233
234 $(TEST_UNITS) simgrid_units_main.c: 
235         @echo "ERROR: Test units not generated."
236         @echo "ERROR: If you are using a CVS checkout, configure with the --enable-maintainer-mode flag"
237         @echo "ERROR: If not, please report the bug to the simgrid-devel mailing list."
238         @exit 1
239
240 endif
241
242 ###
243 ### Regenerate what needs to with flex & flexml
244 ###
245
246
247 gras/DataDesc/ddt_parse.yy.c: gras/DataDesc/ddt_parse.yy.l
248         @LEX@ -o$@ -Pgras_ddt_parse_ $^
249
250 if MAINTAINER_MODE
251 surf/surfxml.c: surf/surfxml.l
252         @LEX@ -o$@ -Psurf_parse_ $^
253 xbt/graphxml.c: xbt/graphxml.l
254         @LEX@ -o$@ -Pxbt_graph_parse_ $^
255
256 if HAVE_FLEXML
257 surf/surfxml.l: surf/surfxml.dtd
258         set -e; cd surf; flexml -b 1000000 -P surfxml -S -L surfxml.dtd
259 ../include/surf/surfxml.h: surf/surfxml.dtd
260         cd ../include/surf; flexml -P surfxml -H -L ../../src/surf/surfxml.dtd
261 xbt/graphxml.l: xbt/graphxml.dtd
262         set -e; cd xbt; flexml -b 1000000 -P graphxml -S -L graphxml.dtd
263 ../include/xbt/graphxml.h: xbt/graphxml.dtd
264         cd ../include/xbt; flexml -P graphxml -H -L ../../src/xbt/graphxml.dtd
265 else
266
267 ../include/surf/surfxml.h surf/surfxml.l: surf/surfxml.dtd
268         @echo "ERROR: src/surf/surfxml.dtd was modified, but the flexml program was not detected"
269         @echo "ERROR: Please install it, or if you didn't modify this file, try this:"
270         @echo "ERROR:   touch src/include/surf/surfxml.h src/surf/surfxml.l"
271         @exit 1
272 ../include/xbt/graphxml.h xbt/graphxml.l: xbt/graphxml.dtd
273         @echo "ERROR: src/xbt/graphxml.dtd was modified, but the flexml program was not detected"
274         @echo "ERROR: Please install it, or if you didn't modify this file, try this:"
275         @echo "ERROR:   touch src/include/xbt/graphxml.h src/xbt/graphxml.l"
276         @exit 1
277 endif
278 endif
279
280 ###
281 ### Declare the library content
282 ###
283
284 libgras_la_SOURCES= $(COMMON_SRC) $(RL_SRC) $(AMOK_SRC)
285 libgras_la_LDFLAGS = $(VERSION_INFO) @GRAS_DEP@ @LD_DYNAMIC_FLAGS@ -lm 
286
287 libsimgrid_la_SOURCES= $(COMMON_SRC) $(SG_SRC) $(AMOK_SRC)
288 libsimgrid_la_LDFLAGS = $(VERSION_INFO) @SIMGRID_DEP@ @LD_DYNAMIC_FLAGS@ -lm
289
290
291
292 include $(top_srcdir)/acmacro/dist-files.mk