x_choices: use "xchoicesi" as an helper gateway
[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 # Copyright (C) 2012 - 2016 - Scilab Enterprises
7 #
8 # This file is hereby licensed under the terms of the GNU GPL v2.0,
9 # pursuant to article 5.3.4 of the CeCILL v.2.1.
10 # This file was originally licensed under the terms of the CeCILL v2.1,
11 # and continues to be available under such terms.
12 # For more information, see the COPYING file which you should have received
13 # along with this program.
14 #
15
16 # The order DOES matter !!!
17
18 # core is the main module of Scilab. All the compilation deps has been removed
19 # since it already linked almost the whole world
20
21 SUBDIRS = \
22 prebuildjava \
23 threads \
24 output_stream \
25 arnoldi \
26 elementary_functions \
27 functions_manager \
28 fileio \
29 mexlib \
30 functions \
31 parameters \
32 boolean \
33 cacsd \
34 signal_processing \
35 core \
36 call_scilab \
37 api_scilab \
38 data_structures \
39 differential_equations \
40 elementary_functions \
41 integer \
42 io \
43 linear_algebra \
44 localization \
45 polynomials \
46 special_functions \
47 time \
48 windows_tools \
49 sparse \
50 completion \
51 history_manager \
52 output_stream \
53 string \
54 hdf5 \
55 fftw \
56 statistics \
57 dynamic_link \
58 console \
59 arnoldi \
60 spreadsheet \
61 tclsci \
62 commons \
63 jvm \
64 types \
65 action_binding \
66 graphic_objects \
67 renderer \
68 gui \
69 graphic_export \
70 graphics \
71 optimization \
72 randlib \
73 interpolation \
74 sound \
75 overloading \
76 m2sci \
77 development_tools \
78 compatibility_functions \
79 helptools \
80 umfpack \
81 demo_tools \
82 genetic_algorithms \
83 simulated_annealing \
84 parameters \
85 matio \
86 atoms \
87 hdf5 \
88 graph \
89 ast \
90 scinotes \
91 parallel \
92 modules_manager \
93 ui_data \
94 history_browser \
95 preferences \
96 xml \
97 external_objects \
98 slint \
99 coverage
100
101 if GUI
102 SUBDIRS += external_objects_java
103 endif
104
105 if XCOS
106 SUBDIRS += scicos_blocks scicos xcos
107 else
108 SUBDIRS += xcos
109 endif
110
111 if MPI
112 SUBDIRS += mpi
113 endif
114
115 SUBDIRS += .
116
117 # javasci should be compile at the end because it needs libscilab.la
118 # Don't forget that the order in subdirs does matter !!!
119 if JAVASCI
120 SUBDIRS += javasci
121 endif
122
123 #### Basic files ####
124 libscilab_la_rootdir = $(mydatadir)
125
126 # libscilab is the full library with the GUI
127 # libscilab-cli is for scilab-cli (without GUI)
128 pkglib_LTLIBRARIES = libscilab-cli.la libscilab.la
129 libscilab_la_SOURCES =
130
131 AM_CPPFLAGS = $(SCI_CPPFLAGS)
132 AM_CFLAGS   = $(SCI_CFLAGS)
133 AM_CXXFLAGS = $(SCI_CXXFLAGS)
134 AM_FFLAGS   = $(SCI_FFLAGS)
135 AM_LDFLAGS  = $(SCI_LDFLAGS)
136
137 # Tag shared libraries with the Scilab version
138 AM_LDFLAGS += -version-number $(SCILAB_LIBRARY_VERSION)
139
140 GUI_LIBS = $(top_builddir)/modules/gui/libscigui.la \
141         $(top_builddir)/modules/renderer/libscirenderer.la \
142         $(top_builddir)/modules/graphics/libscigraphics.la \
143         $(top_builddir)/modules/graphic_export/libscigraphic_export.la \
144         $(top_builddir)/modules/console/libsciconsole.la \
145         $(top_builddir)/modules/action_binding/libsciaction_binding.la \
146         $(top_builddir)/modules/jvm/libscijvm.la \
147         $(top_builddir)/modules/graphic_objects/libscigraphic_objects.la \
148         $(top_builddir)/modules/scinotes/libsciscinotes.la \
149         $(top_builddir)/modules/ui_data/libsciui_data.la \
150         $(top_builddir)/modules/history_browser/libscihistory_browser.la \
151         $(top_builddir)/modules/commons/libscicommons.la \
152         $(top_builddir)/modules/types/libscitypes-java.la \
153         $(top_builddir)/modules/preferences/libscipreferences.la \
154         $(top_builddir)/modules/external_objects_java/libsciexternal_objects_java.la \
155         $(top_builddir)/modules/helptools/libscihelptools.la \
156         $(top_builddir)/modules/tclsci/libscitclsci.la
157
158 NO_GUI_LIBS = $(top_builddir)/modules/gui/libscigui-disable.la \
159         $(top_builddir)/modules/graphics/libscigraphics-disable.la \
160         $(top_builddir)/modules/graphic_export/libscigraphic_export-disable.la \
161         $(top_builddir)/modules/console/libsciconsole-minimal.la \
162         $(top_builddir)/modules/action_binding/libsciaction_binding-disable.la \
163         $(top_builddir)/modules/jvm/libscijvm-disable.la \
164         $(top_builddir)/modules/xcos/libscixcos-disable.la \
165         $(top_builddir)/modules/graphic_objects/libscigraphic_objects-disable.la \
166         $(top_builddir)/modules/scinotes/libsciscinotes-disable.la \
167         $(top_builddir)/modules/ui_data/libsciui_data-disable.la \
168         $(top_builddir)/modules/history_browser/libscihistory_browser-disable.la \
169         $(top_builddir)/modules/commons/libscicommons-disable.la \
170         $(top_builddir)/modules/preferences/libscipreferences-cli.la \
171         $(top_builddir)/modules/tclsci/libscitclsci-disable.la
172
173
174 ENGINE_LIBS =   $(top_builddir)/modules/fileio/libscifileio.la \
175         $(top_builddir)/modules/mexlib/libmex.la \
176         $(top_builddir)/modules/functions/libscifunctions.la \
177         $(top_builddir)/modules/parameters/libsciparameters.la \
178         $(top_builddir)/modules/boolean/libsciboolean.la \
179         $(top_builddir)/modules/cacsd/libscicacsd.la \
180         $(top_builddir)/modules/core/libscicore.la \
181         $(top_builddir)/modules/call_scilab/libscicall_scilab.la \
182         $(top_builddir)/modules/api_scilab/libsciapi_scilab.la \
183         $(top_builddir)/modules/data_structures/libscidata_structures.la \
184         $(top_builddir)/modules/differential_equations/libscidifferential_equations.la \
185         $(top_builddir)/modules/elementary_functions/libscielementary_functions.la \
186         $(top_builddir)/modules/integer/libsciinteger.la \
187         $(top_builddir)/modules/io/libsciio.la \
188         $(top_builddir)/modules/linear_algebra/libscilinear_algebra.la \
189         $(top_builddir)/modules/localization/libscilocalization.la \
190         $(top_builddir)/modules/polynomials/libscipolynomials.la \
191         $(top_builddir)/modules/special_functions/libscispecial_functions.la \
192         $(top_builddir)/modules/time/libscitime.la \
193         $(top_builddir)/modules/windows_tools/libsciwindows_tools.la \
194         $(top_builddir)/modules/sparse/libscisparse.la \
195         $(top_builddir)/modules/completion/libscicompletion.la \
196         $(top_builddir)/modules/history_manager/libscihistory_manager.la \
197         $(top_builddir)/modules/output_stream/libscioutput_stream.la \
198         $(top_builddir)/modules/string/libscistring.la \
199         $(top_builddir)/modules/hdf5/libscihdf5.la \
200         $(top_builddir)/modules/fftw/libscifftw.la \
201         $(top_builddir)/modules/statistics/libscistatistics.la \
202         $(top_builddir)/modules/dynamic_link/libscidynamic_link.la \
203         $(top_builddir)/modules/threads/libscithreads.la \
204         $(top_builddir)/modules/ast/libsciast.la \
205         $(top_builddir)/modules/functions_manager/libscifunctions_manager.la \
206         $(top_builddir)/modules/xml/libscixml.la \
207         $(top_builddir)/modules/external_objects/libsciexternal_objects.la \
208         $(top_builddir)/modules/slint/libscislint.la \
209         $(top_builddir)/modules/coverage/libscicoverage.la
210
211 # These libraries are loaded dynamically from Scilab.
212 ENGINE_LIBS_DYNAMIC_LOAD = \
213         $(top_builddir)/modules/optimization/libscioptimization.la \
214         $(top_builddir)/modules/signal_processing/libscisignal_processing.la \
215         $(top_builddir)/modules/interpolation/libsciinterpolation.la \
216         $(top_builddir)/modules/arnoldi/libsciarnoldi.la \
217         $(top_builddir)/modules/randlib/libscirandlib.la \
218         $(top_builddir)/modules/xcos/libscixcos.la \
219         $(top_builddir)/modules/scicos_blocks/libsciscicos_blocks.la \
220         $(top_builddir)/modules/scicos/libsciscicos.la \
221         $(top_builddir)/modules/sound/libscisound.la \
222         $(top_builddir)/modules/spreadsheet/libscispreadsheet.la \
223         $(top_builddir)/modules/umfpack/libsciumfpack.la \
224         $(top_builddir)/modules/matio/libscimatio.la \
225         $(top_builddir)/modules/parallel/libsciparallel.la
226
227 if MPI
228 ENGINE_LIBS += $(top_builddir)/modules/mpi/libscimpi.la
229 endif
230
231 # Core modules
232
233 libscilab_la_LIBADD =
234
235 if GUI
236 # Force the libscijvm to be linked first. Under Debian, this avoid some reordering issues during the link
237 libscilab_la_LIBADD += $(top_builddir)/modules/jvm/libscijvm.la $(GUI_LIBS)
238 else
239 libscilab_la_LIBADD += $(NO_GUI_LIBS)
240 endif
241
242 libscilab_la_LIBADD += $(top_builddir)/modules/libscilab-cli.la
243
244 # Core modules
245 libscilab_la_LIBADD += $(OTHER_LIBS) $(EXTERNAL_LIBS)
246
247 if FORCE_LINK
248 # This should never be used in production. It forces the explicit link
249 # between libscilab and some "on-the-fly" loaded libraries.
250 # It has been added to make sure that the full link is correctly done
251 # and all symbols resolved.
252 libscilab_la_LIBADD += $(ENGINE_LIBS_DYNAMIC_LOAD)
253 endif
254
255 libscilab_la_LIBADD += $(LAPACK_LIBS) $(BLAS_LIBS)
256
257 ################## libscilab-cli  ##################
258
259 libscilab_cli_la_SOURCES =
260
261 libscilab_cli_la_LDFLAGS = $(AM_LDFLAGS) $(SCI_LDFLAGS)
262
263 # Core modules
264 libscilab_cli_la_LIBADD = $(ENGINE_LIBS) $(NO_GUI_LIBS) $(OTHER_LIBS) $(EXTERNAL_LIBS) $(LAPACK_LIBS) $(BLAS_LIBS)
265
266 .NOTPARALLEL: libscilab-cli.la libscilab.la