* Bug 16305 fixed: unwrap() failed unfolding straight segments
[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 helptools \
79 umfpack \
80 demo_tools \
81 parameters \
82 matio \
83 atoms \
84 hdf5 \
85 graph \
86 ast \
87 scinotes \
88 parallel \
89 modules_manager \
90 ui_data \
91 history_browser \
92 preferences \
93 xml \
94 external_objects \
95 slint \
96 coverage \
97 webtools
98
99 if GUI
100 SUBDIRS += external_objects_java
101 endif
102
103 if XCOS
104 SUBDIRS += scicos_blocks scicos xcos
105 else
106 SUBDIRS += xcos
107 endif
108
109 if MPI
110 SUBDIRS += mpi
111 endif
112
113 SUBDIRS += .
114
115 # javasci should be compile at the end because it needs libscilab.la
116 # Don't forget that the order in subdirs does matter !!!
117 if JAVASCI
118 SUBDIRS += javasci
119 endif
120
121 #### Basic files ####
122 libscilab_la_rootdir = $(mydatadir)
123
124 # libscilab is the full library with the GUI
125 # libscilab-cli is for scilab-cli (without GUI)
126 pkglib_LTLIBRARIES = libscilab-cli.la libscilab.la
127 libscilab_la_SOURCES =
128
129 AM_CPPFLAGS = $(SCI_CPPFLAGS)
130 AM_CFLAGS   = $(SCI_CFLAGS)
131 AM_CXXFLAGS = $(SCI_CXXFLAGS)
132 AM_FFLAGS   = $(SCI_FFLAGS)
133 AM_LDFLAGS  = $(SCI_LDFLAGS)
134
135 # Tag shared libraries with the Scilab version
136 AM_LDFLAGS += -version-number $(SCILAB_LIBRARY_VERSION)
137
138 GUI_LIBS = $(top_builddir)/modules/gui/libscigui.la \
139         $(top_builddir)/modules/renderer/libscirenderer.la \
140         $(top_builddir)/modules/graphics/libscigraphics.la \
141         $(top_builddir)/modules/graphic_export/libscigraphic_export.la \
142         $(top_builddir)/modules/console/libsciconsole.la \
143         $(top_builddir)/modules/action_binding/libsciaction_binding.la \
144         $(top_builddir)/modules/jvm/libscijvm.la \
145         $(top_builddir)/modules/graphic_objects/libscigraphic_objects.la \
146         $(top_builddir)/modules/scinotes/libsciscinotes.la \
147         $(top_builddir)/modules/ui_data/libsciui_data.la \
148         $(top_builddir)/modules/history_browser/libscihistory_browser.la \
149         $(top_builddir)/modules/commons/libscicommons.la \
150         $(top_builddir)/modules/types/libscitypes-java.la \
151         $(top_builddir)/modules/preferences/libscipreferences.la \
152         $(top_builddir)/modules/external_objects_java/libsciexternal_objects_java.la \
153         $(top_builddir)/modules/helptools/libscihelptools.la \
154         $(top_builddir)/modules/tclsci/libscitclsci.la
155
156 NO_GUI_LIBS = $(top_builddir)/modules/gui/libscigui-disable.la \
157         $(top_builddir)/modules/graphics/libscigraphics-disable.la \
158         $(top_builddir)/modules/graphic_export/libscigraphic_export-disable.la \
159         $(top_builddir)/modules/console/libsciconsole-minimal.la \
160         $(top_builddir)/modules/action_binding/libsciaction_binding-disable.la \
161         $(top_builddir)/modules/jvm/libscijvm-disable.la \
162         $(top_builddir)/modules/xcos/libscixcos-disable.la \
163         $(top_builddir)/modules/graphic_objects/libscigraphic_objects-disable.la \
164         $(top_builddir)/modules/scinotes/libsciscinotes-disable.la \
165         $(top_builddir)/modules/ui_data/libsciui_data-disable.la \
166         $(top_builddir)/modules/history_browser/libscihistory_browser-disable.la \
167         $(top_builddir)/modules/commons/libscicommons-disable.la \
168         $(top_builddir)/modules/preferences/libscipreferences-cli.la \
169         $(top_builddir)/modules/tclsci/libscitclsci-disable.la
170
171
172 ENGINE_LIBS =   $(top_builddir)/modules/fileio/libscifileio.la \
173         $(top_builddir)/modules/mexlib/libmex.la \
174         $(top_builddir)/modules/functions/libscifunctions.la \
175         $(top_builddir)/modules/parameters/libsciparameters.la \
176         $(top_builddir)/modules/boolean/libsciboolean.la \
177         $(top_builddir)/modules/cacsd/libscicacsd.la \
178         $(top_builddir)/modules/core/libscicore.la \
179         $(top_builddir)/modules/call_scilab/libscicall_scilab.la \
180         $(top_builddir)/modules/api_scilab/libsciapi_scilab.la \
181         $(top_builddir)/modules/data_structures/libscidata_structures.la \
182         $(top_builddir)/modules/differential_equations/libscidifferential_equations.la \
183         $(top_builddir)/modules/elementary_functions/libscielementary_functions.la \
184         $(top_builddir)/modules/integer/libsciinteger.la \
185         $(top_builddir)/modules/io/libsciio.la \
186         $(top_builddir)/modules/linear_algebra/libscilinear_algebra.la \
187         $(top_builddir)/modules/localization/libscilocalization.la \
188         $(top_builddir)/modules/polynomials/libscipolynomials.la \
189         $(top_builddir)/modules/special_functions/libscispecial_functions.la \
190         $(top_builddir)/modules/time/libscitime.la \
191         $(top_builddir)/modules/windows_tools/libsciwindows_tools.la \
192         $(top_builddir)/modules/sparse/libscisparse.la \
193         $(top_builddir)/modules/completion/libscicompletion.la \
194         $(top_builddir)/modules/history_manager/libscihistory_manager.la \
195         $(top_builddir)/modules/output_stream/libscioutput_stream.la \
196         $(top_builddir)/modules/string/libscistring.la \
197         $(top_builddir)/modules/hdf5/libscihdf5.la \
198         $(top_builddir)/modules/fftw/libscifftw.la \
199         $(top_builddir)/modules/statistics/libscistatistics.la \
200         $(top_builddir)/modules/dynamic_link/libscidynamic_link.la \
201         $(top_builddir)/modules/threads/libscithreads.la \
202         $(top_builddir)/modules/ast/libsciast.la \
203         $(top_builddir)/modules/functions_manager/libscifunctions_manager.la \
204         $(top_builddir)/modules/xml/libscixml.la \
205         $(top_builddir)/modules/external_objects/libsciexternal_objects.la \
206         $(top_builddir)/modules/slint/libscislint.la \
207         $(top_builddir)/modules/coverage/libscicoverage.la
208
209 # These libraries are loaded dynamically from Scilab.
210 ENGINE_LIBS_DYNAMIC_LOAD = \
211         $(top_builddir)/modules/optimization/libscioptimization.la \
212         $(top_builddir)/modules/signal_processing/libscisignal_processing.la \
213         $(top_builddir)/modules/interpolation/libsciinterpolation.la \
214         $(top_builddir)/modules/arnoldi/libsciarnoldi.la \
215         $(top_builddir)/modules/randlib/libscirandlib.la \
216         $(top_builddir)/modules/xcos/libscixcos.la \
217         $(top_builddir)/modules/scicos_blocks/libsciscicos_blocks.la \
218         $(top_builddir)/modules/scicos/libsciscicos.la \
219         $(top_builddir)/modules/sound/libscisound.la \
220         $(top_builddir)/modules/spreadsheet/libscispreadsheet.la \
221         $(top_builddir)/modules/umfpack/libsciumfpack.la \
222         $(top_builddir)/modules/matio/libscimatio.la \
223         $(top_builddir)/modules/parallel/libsciparallel.la \
224     $(top_builddir)/modules/webtools/libsciwebtools.la
225
226 if MPI
227 ENGINE_LIBS += $(top_builddir)/modules/mpi/libscimpi.la
228 endif
229
230 # Core modules
231
232 libscilab_la_LIBADD =
233
234 if GUI
235 # Force the libscijvm to be linked first. Under Debian, this avoid some reordering issues during the link
236 libscilab_la_LIBADD += $(top_builddir)/modules/jvm/libscijvm.la $(GUI_LIBS)
237 else
238 libscilab_la_LIBADD += $(NO_GUI_LIBS)
239 endif
240
241 libscilab_la_LIBADD += $(top_builddir)/modules/libscilab-cli.la
242
243 # Core modules
244 libscilab_la_LIBADD += $(OTHER_LIBS) $(EXTERNAL_LIBS)
245
246 if FORCE_LINK
247 # This should never be used in production. It forces the explicit link
248 # between libscilab and some "on-the-fly" loaded libraries.
249 # It has been added to make sure that the full link is correctly done
250 # and all symbols resolved.
251 libscilab_la_LIBADD += $(ENGINE_LIBS_DYNAMIC_LOAD)
252 endif
253
254 libscilab_la_LIBADD += $(FLIBS) $(LAPACK_LIBS) $(BLAS_LIBS)
255
256 ################## libscilab-cli  ##################
257
258 libscilab_cli_la_SOURCES =
259
260 libscilab_cli_la_LDFLAGS = $(AM_LDFLAGS) $(SCI_LDFLAGS)
261
262 # Core modules
263 libscilab_cli_la_LIBADD = $(ENGINE_LIBS) $(NO_GUI_LIBS) $(OTHER_LIBS) $(EXTERNAL_LIBS) $(FLIBS) $(LAPACK_LIBS) $(BLAS_LIBS)
264
265 # Compiler specific support
266 libscilab_cli_la_LIBADD += -lstdc++fs # needed before gcc 9 (Ubuntu 18.04)
267
268 .NOTPARALLEL: libscilab-cli.la libscilab.la