Fix the library linking declaration
[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.1-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 GUI
95 SUBDIRS += external_objects_java
96 endif
97
98 if XCOS
99 SUBDIRS += scicos_blocks
100 endif
101
102 SUBDIRS += scicos
103
104 if MPI
105 SUBDIRS += mpi
106 endif
107
108 SUBDIRS += .
109
110 # javasci should be compile at the end because it needs libscilab.la
111 # Don't forget that the order in subdirs does matter !!!
112 if JAVASCI
113 SUBDIRS += javasci
114 endif
115
116 #### Basic files ####
117 libscilab_la_rootdir = $(mydatadir)
118
119 # libscilab is the full library with the GUI
120 # libscilab-cli is for scilab-cli (without GUI)
121 pkglib_LTLIBRARIES = libscilab-cli.la libscilab.la
122 libscilab_la_SOURCES =
123
124 libscilab_la_LDFLAGS = $(AM_LDFLAGS) $(SCI_LDFLAGS)
125
126
127 GUI_LIBS = $(top_builddir)/modules/gui/libscigui.la \
128         $(top_builddir)/modules/renderer/libscirenderer.la \
129         $(top_builddir)/modules/graphics/libscigraphics.la \
130         $(top_builddir)/modules/graphic_export/libscigraphic_export.la \
131         $(top_builddir)/modules/console/libsciconsole.la \
132         $(top_builddir)/modules/action_binding/libsciaction_binding.la \
133         $(top_builddir)/modules/jvm/libscijvm.la \
134         $(top_builddir)/modules/graphic_objects/libscigraphic_objects.la \
135         $(top_builddir)/modules/scinotes/libsciscinotes.la \
136         $(top_builddir)/modules/ui_data/libsciui_data.la \
137         $(top_builddir)/modules/history_browser/libscihistory_browser.la \
138         $(top_builddir)/modules/commons/libscicommons.la \
139         $(top_builddir)/modules/tclsci/libscitclsci.la \
140         $(top_builddir)/modules/preferences/libscipreferences.la \
141         $(top_builddir)/modules/external_objects_java/libsciexternal_objects_java.la \
142         $(top_builddir)/modules/helptools/libscihelptools.la
143
144 NO_GUI_LIBS = $(top_builddir)/modules/gui/libscigui-disable.la \
145         $(top_builddir)/modules/graphics/libscigraphics-disable.la \
146         $(top_builddir)/modules/graphic_export/libscigraphic_export-disable.la \
147         $(top_builddir)/modules/console/libsciconsole-minimal.la \
148         $(top_builddir)/modules/action_binding/libsciaction_binding-disable.la \
149         $(top_builddir)/modules/jvm/libscijvm-disable.la \
150         $(top_builddir)/modules/xcos/libscixcos-disable.la \
151         $(top_builddir)/modules/graphic_objects/libscigraphic_objects-disable.la \
152         $(top_builddir)/modules/scinotes/libsciscinotes-disable.la \
153         $(top_builddir)/modules/ui_data/libsciui_data-disable.la \
154         $(top_builddir)/modules/history_browser/libscihistory_browser-disable.la \
155         $(top_builddir)/modules/commons/libscicommons-disable.la
156
157
158 ENGINE_LIBS =   $(top_builddir)/modules/fileio/libscifileio.la \
159         $(top_builddir)/modules/mexlib/libmex.la \
160         $(top_builddir)/modules/functions/libscifunctions.la \
161         $(top_builddir)/modules/parameters/libsciparameters.la \
162         $(top_builddir)/modules/boolean/libsciboolean.la \
163         $(top_builddir)/modules/cacsd/libscicacsd.la \
164         $(top_builddir)/modules/core/libscicore.la \
165         $(top_builddir)/modules/call_scilab/libscicall_scilab.la \
166         $(top_builddir)/modules/api_scilab/libsciapi_scilab.la \
167         $(top_builddir)/modules/data_structures/libscidata_structures.la \
168         $(top_builddir)/modules/differential_equations/libscidifferential_equations.la \
169         $(top_builddir)/modules/double/libscidouble.la \
170         $(top_builddir)/modules/elementary_functions/libscielementary_functions.la \
171         $(top_builddir)/modules/integer/libsciinteger.la \
172         $(top_builddir)/modules/intersci/libsciintersci.la \
173         $(top_builddir)/modules/io/libsciio.la \
174         $(top_builddir)/modules/linear_algebra/libscilinear_algebra.la \
175         $(top_builddir)/modules/localization/libscilocalization.la \
176         $(top_builddir)/modules/polynomials/libscipolynomials.la \
177         $(top_builddir)/modules/special_functions/libscispecial_functions.la \
178         $(top_builddir)/modules/time/libscitime.la \
179         $(top_builddir)/modules/windows_tools/libsciwindows_tools.la \
180         $(top_builddir)/modules/sparse/libscisparse.la \
181         $(top_builddir)/modules/completion/libscicompletion.la \
182         $(top_builddir)/modules/history_manager/libscihistory_manager.la \
183         $(top_builddir)/modules/output_stream/libscioutput_stream.la \
184         $(top_builddir)/modules/string/libscistring.la \
185         $(top_builddir)/modules/hdf5/libscihdf5.la \
186         $(top_builddir)/modules/fftw/libscifftw.la \
187         $(top_builddir)/modules/statistics/libscistatistics.la \
188         $(top_builddir)/modules/dynamic_link/libscidynamic_link.la \
189         $(top_builddir)/modules/xml/libscixml.la \
190         $(top_builddir)/modules/external_objects/libsciexternal_objects.la \
191         $(top_builddir)/modules/preferences/libscipreferences-cli.la
192
193 # These libraries are loaded dynamically from Scilab.
194 ENGINE_LIBS_DYNAMIC_LOAD = \
195         $(top_builddir)/modules/optimization/libscioptimization.la \
196         $(top_builddir)/modules/signal_processing/libscisignal_processing.la \
197         $(top_builddir)/modules/interpolation/libsciinterpolation.la \
198         $(top_builddir)/modules/symbolic/libscisymbolic.la \
199         $(top_builddir)/modules/arnoldi/libsciarnoldi.la \
200         $(top_builddir)/modules/randlib/libscirandlib.la \
201         $(top_builddir)/modules/xcos/libscixcos.la \
202         $(top_builddir)/modules/scicos_blocks/libsciscicos_blocks.la \
203         $(top_builddir)/modules/scicos/libsciscicos.la \
204         $(top_builddir)/modules/sound/libscisound.la \
205         $(top_builddir)/modules/spreadsheet/libscispreadsheet.la \
206         $(top_builddir)/modules/umfpack/libsciumfpack.la \
207         $(top_builddir)/modules/matio/libscimatio.la \
208         $(top_builddir)/modules/parallel/libsciparallel.la
209
210 if MPI
211 ENGINE_LIBS += $(top_builddir)/modules/mpi/libscimpi.la
212 endif
213
214 # Core modules
215
216 libscilab_la_LIBADD =
217
218 if GUI
219 libscilab_la_LIBADD += $(GUI_LIBS)      $(top_builddir)/modules/types/libscitypes.la
220 else
221 libscilab_la_LIBADD += $(NO_GUI_LIBS)
222 endif
223
224 libscilab_la_LIBADD += $(top_builddir)/modules/libscilab-cli.la
225
226 # Core modules
227 libscilab_la_LIBADD += $(OTHER_LIBS) $(EXTERNAL_LIBS)
228
229 if FORCE_LINK
230 # This should never be used in production. It forces the explicit link
231 # between libscilab and some "on-the-fly" loaded libraries.
232 # It has been added to make sure that the full link is correctly done
233 # and all symbols resolved.
234 libscilab_la_LIBADD += $(ENGINE_LIBS_DYNAMIC_LOAD)
235 endif
236
237 libscilab_la_LIBADD += $(LAPACK_LIBS) $(BLAS_LIBS)
238
239 ################## libscilab-cli  ##################
240
241 libscilab_cli_la_SOURCES =
242
243 libscilab_cli_la_LDFLAGS = $(AM_LDFLAGS) $(SCI_LDFLAGS)
244
245 # Core modules
246 libscilab_cli_la_LIBADD = $(ENGINE_LIBS) $(NO_GUI_LIBS) $(OTHER_LIBS) $(EXTERNAL_LIBS) $(LAPACK_LIBS) $(BLAS_LIBS)
247
248 .NOTPARALLEL: libscilab-cli.la libscilab.la