Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
c10bcf2e8b2da23b1025f48999623befe2550e94
[simgrid.git] / src / Makefile.am
1 SUBDIRS= . amok
2
3 AM_CFLAGS= -g
4 #AM_CFLAGS= -DNDEBUG 
5
6 # -DNLOG   cuts absolutely all logs at compilation time.
7 # -DNDEBUG cuts asserts and logs at "trace" and "debug" levels.
8
9 # -g -ffast-math -funroll-loops -O3 -fno-strict-aliasing
10 # Those should be added by configure when using gcc
11 # fast-math is nasty when using IEEE floating point semantic
12 # strict-aliasing breaks my type-punning bad habit.
13
14
15 MAINTAINERCLEANFILES=Makefile.in
16 INCLUDES= -I$(top_srcdir)/include \
17           @CFLAGS_SimGrid@
18 EXTRA_DIST= \
19         \
20         portable.h \
21         \
22         xbt/dict_private.h \
23         xbt/heap_private.h \
24         xbt/fifo_private.h \
25         xbt/context_private.h xbt/context_win32.h xbt/context_win32.c\
26         \
27         surf/maxmin_private.h \
28         surf/trace_mgr_private.h \
29         surf/surf_private.h \
30         surf/cpu_private.h \
31         surf/workstation_private.h \
32         surf/surf_parse.l surf/surf_parse.h \
33         surf/network_private.h \
34         \
35         gras/Transport/transport_interface.h \
36         gras/Virtu/virtu_interface.h \
37         gras/Virtu/virtu_rl.h \
38         gras/Virtu/virtu_sg.h \
39         gras/DataDesc/ddt_parse.yy.l gras/DataDesc/ddt_parse.yy.c
40
41 #        gras_private.h
42
43 #LIBRARY_VERSION= 0:0:0
44 #                 | | |
45 #          +------+ | +---+
46 #          |        |     |
47 #       current:revision:age
48 #          |        |     |
49 #          |        |     +- Increment if interfaces have been added
50 #          |        |        Set to zero if interfaces have been removed or
51 #          |        |        changed
52 #          |        +- Increment if source code has changed
53 #          |           Set to zero if current is incremented
54 #          +- Increment if interfaces have been added, removed or changed
55
56 VERSION_INFO= -release 20040722 -version-info 0:0:0
57 # from `info libtool "Updating version info"` 
58 # and  `info libtool "Release numbers"` 
59 #
60 # A) For stable library (interface wise), you should use --version-info:
61 #
62 # - Begin with C:R:A = 0:0:0 (ie here, VERSION_INFO= -version-info 0:0:0)
63 # - Do not update it before public release (keep numbers small)
64 #
65 # ----------------------------------------------------------------------+
66 # +   Interface     |  code of existing  | Interface | New version info |
67 # | removal/change? | interface changed? | addition? |                  |
68 # +-----------------+--------------------+-----------+------------------+
69 # |      yes        |   must be yes ;)   |           |  C++ : 0   : 0   |
70 # |      no         |        yes         |    yes    |  C   : R++ : A++ |
71 # |      no         |        yes         |    no     |  C   : R++ : A   |
72 # |      no         |        no          |    yes    |  C   : R   : A++ |
73 # |      no         |        no          |    no     |  C   : R   : A   |
74 # +-----------------+--------------------+-----------+------------------+
75 #
76 # B) For rapidely changing library, you should go for the -release flag
77 #
78 #  It modifies the library name, and you thus cannot say that a library
79 #   using this trick is ready for a "stable" release (say, in Debian).
80
81 if HAVE_SG
82  lib_LTLIBRARIES= libgrasrl.la libgrassg.la
83 else
84  lib_LTLIBRARIES= libgrasrl.la
85 endif
86
87
88 COMMON_S=\
89   \
90   xbt_modinter.h    gras_modinter.h                                            \
91   \
92   xbt/sysdep.c                                                                 \
93   xbt/log.c         xbt/log_default_appender.c   xbt/error.c                 \
94   xbt/dynar.c                                                                  \
95   xbt/dict.c        xbt/dict_elm.c               xbt/dict_cursor.c           \
96   xbt/heap.c                                                                    \
97   xbt/fifo.c                                                                    \
98   xbt/swag.c                                                                   \
99   xbt/set.c                                                                    \
100   xbt/module.c                                                                 \
101   xbt/config.c                                                                 \
102   xbt/context.c                                                                \
103   \
104   surf/maxmin.c                                                              \
105   surf/trace_mgr.c                                                           \
106   surf/surf.c                                                                \
107   surf/surf_parse.c                                                          \
108   surf/cpu.c   surf/network.c   surf/workstation.c                           \
109   \
110   gras/gras.c \
111   \
112   gras/Transport/transport.c          gras/Transport/transport_private.h   gras/Transport/transport_plugin_buf.c  \
113   \
114   gras/DataDesc/ddt_create.c          \
115   gras/DataDesc/ddt_convert.c         gras/DataDesc/ddt_exchange.c     \
116   gras/DataDesc/cbps.c                gras/DataDesc/datadesc.c         \
117   gras/DataDesc/datadesc_interface.h  gras/DataDesc/datadesc_private.h \
118   gras/DataDesc/ddt_parse.c           gras/DataDesc/ddt_parse.yy.c         gras/DataDesc/ddt_parse.yy.h \
119   \
120   gras/Msg/msg.c                      gras/Msg/msg_interface.h             gras/Msg/msg_private.h \
121   \
122   gras/Virtu/process.c
123
124 gras/DataDesc/ddt_parse.yy.c: gras/DataDesc/ddt_parse.yy.l
125         @LEX@ -o$@ -Pgras_ddt_parse_ $^
126
127 surf/surf_parse.c: surf/surf_parse.l
128         @LEX@ -o$@ -Psurf_parse_ $^
129
130 libgrasrl_la_SOURCES= $(COMMON_S) \
131   gras/Transport/rl_transport.c  gras/Transport/transport_plugin_tcp.c  gras/Transport/transport_plugin_file.c      \
132   \
133   gras/Virtu/rl_process.c        gras/Virtu/rl_time.c                   gras/Virtu/rl_conditional.c
134 libgrasrl_la_LDFLAGS = $(VERSION_INFO) @GRAS_WINSOCK_DEP@
135
136 if HAVE_SG
137   libgrassg_la_SOURCES= $(COMMON_S) \
138     gras/Transport/sg_transport.c  gras/Transport/transport_plugin_sg.c             \
139     \
140     gras/Virtu/sg_process.c        gras/Virtu/sg_time.c                 gras/Virtu/sg_conditional.c
141   libgrassg_la_LDFLAGS = $(VERSION_INFO)
142 endif