Improve the order of declaration (the --enable-force-full-link option was breaking...
[scilab.git] / scilab / modules / Makefile.am
1 #
2 # Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 # Copyright (C) INRIA - 2006-2008 - Sylvestre Ledru
4 # Copyright (C) DIGITEO - 2009 - Sylvestre Ledru
5 #
6 # This file must be used under the terms of the CeCILL.
7 # This source file is licensed as described in the file COPYING, which
8 # you should have received as part of this distribution.  The terms
9 # are also available at
10 # http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11 #
12
13 # The order DOES matter !!!
14
15 # core is the main module of Scilab. All the compilation deps has been removed
16 # since it already linked almost the whole world
17
18
19 SUBDIRS = \
20 prebuildjava \
21 fileio \
22 mexlib \
23 functions \
24 parameters \
25 boolean \
26 cacsd \
27 signal_processing \
28 core \
29 call_scilab \
30 api_scilab \
31 data_structures \
32 differential_equations \
33 double \
34 elementary_functions \
35 integer \
36 intersci \
37 io \
38 linear_algebra \
39 localization \
40 polynomials \
41 special_functions \
42 time \
43 windows_tools \
44 sparse \
45 completion \
46 history_manager \
47 output_stream \
48 string \
49 hdf5 \
50 fftw \
51 statistics \
52 dynamic_link \
53 console \
54 arnoldi \
55 spreadsheet \
56 tclsci \
57 commons \
58 jvm \
59 action_binding \
60 graphic_objects \
61 renderer \
62 graphic_export \
63 gui \
64 graphics \
65 optimization \
66 symbolic \
67 randlib \
68 interpolation \
69 sound \
70 overloading \
71 m2sci \
72 development_tools \
73 compatibility_functions \
74 helptools \
75 umfpack \
76 demo_tools \
77 genetic_algorithms \
78 simulated_annealing \
79 matio \
80 atoms \
81 hdf5 \
82 graph\
83 xcos \
84 scinotes \
85 parallel \
86 modules_manager \
87 ui_data \
88 history_browser \
89 preferences \
90 xml \
91 types \
92 external_objects
93
94 if XCOS
95 SUBDIRS += scicos_blocks
96 endif
97
98 SUBDIRS += scicos
99
100 SUBDIRS += .
101
102 # javasci should be compile at the end because it needs libscilab.la
103 # Don't forget that the order in subdirs does matter !!!
104 if JAVASCI
105 SUBDIRS += javasci
106 endif
107
108 #### Basic files ####
109 libscilab_la_rootdir = $(mydatadir)
110
111 # libscilab is the full library with the GUI
112 # libscilab-cli is for scilab-cli (without GUI)
113 pkglib_LTLIBRARIES = libscilab-cli.la libscilab.la
114 libscilab_la_SOURCES =
115
116 libscilab_la_LDFLAGS = $(LAPACK_LIBS) $(BLAS_LIBS) $(AM_LDFLAGS)
117
118
119 GUI_LIBS = $(top_builddir)/modules/gui/libscigui.la \
120         $(top_builddir)/modules/renderer/libscirenderer.la \
121         $(top_builddir)/modules/graphics/libscigraphics.la \
122         $(top_builddir)/modules/graphic_export/libscigraphic_export.la \
123         $(top_builddir)/modules/console/libsciconsole.la \
124         $(top_builddir)/modules/action_binding/libsciaction_binding.la \
125         $(top_builddir)/modules/jvm/libscijvm.la \
126         $(top_builddir)/modules/graphic_objects/libscigraphic_objects.la \
127         $(top_builddir)/modules/scinotes/libsciscinotes.la \
128         $(top_builddir)/modules/ui_data/libsciui_data.la \
129         $(top_builddir)/modules/history_browser/libscihistory_browser.la \
130         $(top_builddir)/modules/commons/libscicommons.la \
131         $(top_builddir)/modules/tclsci/libscitclsci.la \
132         $(top_builddir)/modules/preferences/libscipreferences.la
133
134 NO_GUI_LIBS = $(top_builddir)/modules/gui/libscigui-disable.la \
135         $(top_builddir)/modules/graphics/libscigraphics-disable.la \
136         $(top_builddir)/modules/graphic_export/libscigraphic_export-disable.la \
137         $(top_builddir)/modules/console/libsciconsole-minimal.la \
138         $(top_builddir)/modules/action_binding/libsciaction_binding-disable.la \
139         $(top_builddir)/modules/jvm/libscijvm-disable.la \
140         $(top_builddir)/modules/xcos/libscixcos-disable.la \
141         $(top_builddir)/modules/graphic_objects/libscigraphic_objects-disable.la \
142         $(top_builddir)/modules/scinotes/libsciscinotes-disable.la \
143         $(top_builddir)/modules/ui_data/libsciui_data-disable.la \
144         $(top_builddir)/modules/history_browser/libscihistory_browser-disable.la \
145         $(top_builddir)/modules/commons/libscicommons-disable.la
146
147
148 ENGINE_LIBS =   $(top_builddir)/modules/fileio/libscifileio.la \
149         $(top_builddir)/modules/mexlib/libmex.la \
150         $(top_builddir)/modules/functions/libscifunctions.la \
151         $(top_builddir)/modules/parameters/libsciparameters.la \
152         $(top_builddir)/modules/boolean/libsciboolean.la \
153         $(top_builddir)/modules/cacsd/libscicacsd.la \
154         $(top_builddir)/modules/core/libscicore.la \
155         $(top_builddir)/modules/call_scilab/libscicall_scilab.la \
156         $(top_builddir)/modules/api_scilab/libsciapi_scilab.la \
157         $(top_builddir)/modules/data_structures/libscidata_structures.la \
158         $(top_builddir)/modules/differential_equations/libscidifferential_equations.la \
159         $(top_builddir)/modules/double/libscidouble.la \
160         $(top_builddir)/modules/elementary_functions/libscielementary_functions.la \
161         $(top_builddir)/modules/integer/libsciinteger.la \
162         $(top_builddir)/modules/intersci/libsciintersci.la \
163         $(top_builddir)/modules/io/libsciio.la \
164         $(top_builddir)/modules/linear_algebra/libscilinear_algebra.la \
165         $(top_builddir)/modules/localization/libscilocalization.la \
166         $(top_builddir)/modules/polynomials/libscipolynomials.la \
167         $(top_builddir)/modules/special_functions/libscispecial_functions.la \
168         $(top_builddir)/modules/time/libscitime.la \
169         $(top_builddir)/modules/windows_tools/libsciwindows_tools.la \
170         $(top_builddir)/modules/sparse/libscisparse.la \
171         $(top_builddir)/modules/completion/libscicompletion.la \
172         $(top_builddir)/modules/history_manager/libscihistory_manager.la \
173         $(top_builddir)/modules/output_stream/libscioutput_stream.la \
174         $(top_builddir)/modules/string/libscistring.la \
175         $(top_builddir)/modules/hdf5/libscihdf5.la \
176         $(top_builddir)/modules/fftw/libscifftw.la \
177         $(top_builddir)/modules/statistics/libscistatistics.la \
178         $(top_builddir)/modules/dynamic_link/libscidynamic_link.la \
179         $(top_builddir)/modules/xml/libscixml.la \
180         $(top_builddir)/modules/external_objects/libsciexternal_objects.la \
181         $(top_builddir)/modules/preferences/libscipreferences-cli.la
182
183 # These libraries are loaded dynamically from Scilab.
184 ENGINE_LIBS_DYNAMIC_LOAD = \
185         $(top_builddir)/modules/optimization/libscioptimization.la \
186         $(top_builddir)/modules/signal_processing/libscisignal_processing.la \
187         $(top_builddir)/modules/interpolation/libsciinterpolation.la \
188         $(top_builddir)/modules/symbolic/libscisymbolic.la \
189         $(top_builddir)/modules/arnoldi/libsciarnoldi.la \
190         $(top_builddir)/modules/randlib/libscirandlib.la \
191         $(top_builddir)/modules/xcos/libscixcos.la \
192         $(top_builddir)/modules/scicos_blocks/libsciscicos_blocks.la \
193         $(top_builddir)/modules/scicos/libsciscicos.la \
194         $(top_builddir)/modules/sound/libscisound.la \
195         $(top_builddir)/modules/spreadsheet/libscispreadsheet.la \
196         $(top_builddir)/modules/umfpack/libsciumfpack.la \
197         $(top_builddir)/modules/matio/libscimatio.la \
198         $(top_builddir)/modules/helptools/libscihelptools.la \
199         $(top_builddir)/modules/parallel/libsciparallel.la
200
201
202 # Core modules
203
204 libscilab_la_LIBADD =
205
206 if GUI
207 libscilab_la_LIBADD += $(GUI_LIBS)      $(top_builddir)/modules/types/libscitypes.la
208 else
209 libscilab_la_LIBADD += $(NO_GUI_LIBS)
210 endif
211
212 # Core modules
213 libscilab_la_LIBADD += $(OTHER_LIBS) $(EXTERNAL_LIBS)
214
215 if FORCE_LINK
216 # This should never be used in production. It forces the explicit link
217 # between libscilab and some "on-the-fly" loaded libraries.
218 # It has been added to make sure that the full link is correctly done
219 # and all symbols resolved.
220 libscilab_la_LIBADD += $(ENGINE_LIBS_DYNAMIC_LOAD)
221 endif
222
223 libscilab_la_LIBADD += $(top_builddir)/modules/libscilab-cli.la
224
225 ################## libscilab-cli  ##################
226
227 libscilab_cli_la_SOURCES =
228
229 libscilab_cli_la_LDFLAGS = $(LAPACK_LIBS) $(BLAS_LIBS) $(AM_LDFLAGS)
230
231 # Core modules
232 libscilab_cli_la_LIBADD = $(ENGINE_LIBS) $(NO_GUI_LIBS) $(OTHER_LIBS) $(EXTERNAL_LIBS)
233
234 .NOTPARALLEL: libscilab-cli.la libscilab.la