Xcos: add a fake loadXcos gateway to load Xcos dependencies
[scilab.git] / scilab / modules / xcos / Makefile.am
1 #
2 # Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 # Copyright (C) DIGITEO - 2009-2010 - Allan CORNET <allan.cornet@scilab.org>
4 # Copyright (C) DIGITEO - 2010-2010 - ClĂ©ment DAVID <clement.david@scilab.org>
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 #### Target ######
14 modulename=xcos
15
16
17 #### xcos : Conf files ####
18 libscixcos_la_rootdir = $(mydatadir)
19 libscixcos_la_root_DATA =  license.txt
20
21
22 #### xcos : init scripts ####
23 libscixcos_la_etcdir = $(mydatadir)/etc
24 libscixcos_la_etc_DATA = \
25         etc/xcos.quit \
26         etc/xcos.start \
27         etc/Xcos-style.xml \
28         etc/XcosFile.xsd \
29         etc/xcos.xml \
30         etc/XcosConfiguration.xsd \
31         etc/palettes.xml \
32         etc/PaletteConfiguration.xsd \
33         etc/Modelica.xsd \
34         etc/XConfiguration-xcos.xsl \
35         etc/XConfiguration-xcos.xml
36
37 XCOS_CXX_SOURCES =      src/jni/Xcos.cpp \
38                         src/jni/Xcos.hxx \
39                         src/jni/Palette.cpp \
40                         src/jni/Palette.hxx \
41                         src/jni/Modelica.cpp \
42                         src/jni/Modelica.hxx \
43                         src/cpp/xcosUtilities.cpp
44
45 GIWS_WRAPPERS = src/jni/Xcos.giws.xml \
46                         src/jni/Palette.giws.xml \
47                         src/jni/Modelica.giws.xml
48
49 if GIWS
50 BUILT_SOURCES=giws
51 endif
52
53
54 GATEWAY_C_SOURCES = sci_gateway/c/gw_xcos.c
55
56 GATEWAY_CXX_SOURCES = \
57         sci_gateway/cpp/sci_Xcos.cpp \
58         sci_gateway/cpp/sci_warnBlockByUID.cpp \
59         sci_gateway/cpp/sci_closeXcosFromScilab.cpp \
60         sci_gateway/cpp/sci_xcosDiagramToScilab.cpp \
61         sci_gateway/cpp/sci_xcosPalLoad.cpp \
62         sci_gateway/cpp/sci_xcosPalCategoryAdd.cpp \
63         sci_gateway/cpp/sci_xcosPalDelete.cpp \
64         sci_gateway/cpp/sci_xcosPalMove.cpp \
65         sci_gateway/cpp/sci_xcosPalEnable.cpp \
66         sci_gateway/cpp/sci_xcosPalDisable.cpp \
67         sci_gateway/cpp/sci_xcosPalGenerateIcon.cpp \
68         sci_gateway/cpp/sci_xcosConfigureXmlFile.cpp \
69         sci_gateway/cpp/sci_xcosAddToolsMenu.cpp \
70         sci_gateway/cpp/sci_xcosUpdateBlock.cpp \
71         sci_gateway/cpp/sci_loadXcos.cpp
72
73 libscixcos_la_CPPFLAGS = \
74                         -I$(srcdir)/includes/ \
75                         -I$(srcdir)/src/jni/ \
76                         -I$(srcdir)/src/cpp/ \
77                         -I$(srcdir)/src/c/ \
78                         -I$(top_srcdir)/libs/MALLOC/includes/ \
79                         -I$(top_srcdir)/modules/jvm/includes/ \
80                         -I$(top_srcdir)/modules/output_stream/includes/ \
81                         -I$(top_srcdir)/modules/commons/src/jni/ \
82                         -I$(top_srcdir)/modules/localization/includes/ \
83                         -I$(top_srcdir)/modules/fileio/includes/ \
84                         -I$(top_srcdir)/modules/scicos_blocks/src/jni/ \
85                         -I$(top_srcdir)/modules/api_scilab/includes/ \
86                         $(JAVA_JNI_INCLUDE) \
87                         $(AM_CPPFLAGS)
88
89 # Without the xcos module
90 libscixcos_disable_la_CPPFLAGS = -I$(srcdir)/includes/ \
91                         -I$(top_srcdir)/modules/localization/includes/ \
92                         -I$(top_srcdir)/modules/output_stream/includes \
93                         $(AM_CPPFLAGS)
94
95 XCOS_DISABLE_C_SOURCES = src/noxcos/noxcos.c
96 libscixcos_disable_la_SOURCES = $(XCOS_DISABLE_C_SOURCES)
97
98 pkglib_LTLIBRARIES = libscixcos-disable.la
99
100 if XCOS
101 if GUI
102 noinst_LTLIBRARIES = libscixcos-algo.la
103 pkglib_LTLIBRARIES += libscixcos.la
104 endif
105 endif
106
107
108 libscixcos_algo_la_SOURCES = $(XCOS_C_SOURCES) $(XCOS_CXX_SOURCES)
109 libscixcos_la_SOURCES =  $(GATEWAY_C_SOURCES) $(GATEWAY_CXX_SOURCES)
110 libscixcos_algo_la_CPPFLAGS = $(libscixcos_la_CPPFLAGS)
111
112 # For the code check (splint)
113 CHECK_SRC= $(XCOS_C_SOURCES) $(GATEWAY_C_SOURCES)
114 INCLUDE_FLAGS = $(libscixcos_la_CPPFLAGS)
115
116
117
118 libscixcos_la_LIBADD = libscixcos-algo.la
119
120 #### xcos : gateway declaration ####
121 libscixcos_la_sci_gatewaydir = $(mydatadir)/sci_gateway
122 libscixcos_la_sci_gateway_DATA = sci_gateway/xcos_gateway.xml
123
124
125 #### xcos : images files ####
126 #
127 # Generated with:
128 #   $ find images/ -type f -printf "%p \\\\\n" -name *.svg -or -name *.gif -or -name *.jpg -or -name *.png -not -name *_pal.jpg -not -name gui |sort |awk '$0 !~ /gui/{print;}' |awk '$0 !~ /_pal.jpg/{print;}'
129 libscixcos_la_imagesdir=$(mydatadir)/
130 nobase_libscixcos_la_images_DATA = images/blocks/3DSCOPE.svg \
131 images/blocks/ANDBLK.svg \
132 images/blocks/ASCOPE.svg \
133 images/blocks/BACHE.svg \
134 images/blocks/BARXY.svg \
135 images/blocks/BPLATFORM.svg \
136 images/blocks/Capacitor.svg \
137 images/blocks/CCS.svg \
138 images/blocks/CLOCK_c.svg \
139 images/blocks/CLOCK_f.svg \
140 images/blocks/ConstantVoltage.svg \
141 images/blocks/CSCOPXY.svg \
142 images/blocks/CurrentSensor.svg \
143 images/blocks/CVS.svg \
144 images/blocks/DEADBAND.svg \
145 images/blocks/Diode.svg \
146 images/blocks/DSCOPE.svg \
147 images/blocks/Ground.svg \
148 images/blocks/Gyrator.svg \
149 images/blocks/HYSTHERESIS.svg \
150 images/blocks/IdealTransformer.svg \
151 images/blocks/Inductor.svg \
152 images/blocks/INTEGRAL.svg \
153 images/blocks/NMOS.svg \
154 images/blocks/NPN.svg \
155 images/blocks/PerteDP.svg \
156 images/blocks/PMOS.svg \
157 images/blocks/PNP.svg \
158 images/blocks/PotentialSensor.svg \
159 images/blocks/PRODUCT.svg \
160 images/blocks/PuitP.svg \
161 images/blocks/PULSE_SC.svg \
162 images/blocks/QUANT_f.svg \
163 images/blocks/RAMP.svg \
164 images/blocks/Resistor.svg \
165 images/blocks/SampleCLK.svg \
166 images/blocks/SATURATION.svg \
167 images/blocks/Self_Switch_off.svg \
168 images/blocks/Self_Switch_on.svg \
169 images/blocks/SELF_SWITCH.svg \
170 images/blocks/SourceP.svg \
171 images/blocks/STEP_FUNCTION.svg \
172 images/blocks/SUM.svg \
173 images/blocks/SUPER.svg \
174 images/blocks/SWITCH.svg \
175 images/blocks/VanneReglante.svg \
176 images/blocks/VariableResistor.svg \
177 images/blocks/VoltageSensor.svg \
178 images/icons/16x16/actions/align-horizontal-center.png \
179 images/icons/16x16/actions/align-horizontal-left.png \
180 images/icons/16x16/actions/align-horizontal-right.png \
181 images/icons/16x16/actions/align-vertical-bottom.png \
182 images/icons/16x16/actions/align-vertical-center.png \
183 images/icons/16x16/actions/align-vertical-top.png \
184 images/icons/16x16/actions/color-fill.png \
185 images/icons/16x16/actions/draw-brush.png \
186 images/icons/16x16/actions/object-group.png \
187 images/icons/16x16/actions/process-stop.png \
188 images/icons/16x16/actions/select-by-color.png \
189 images/icons/16x16/actions/transform-flip.png \
190 images/icons/16x16/actions/transform-mirror.png \
191 images/icons/16x16/categories/preferences-desktop.png \
192 images/palettes/ABS_VALUE.png \
193 images/palettes/AFFICH_m.png \
194 images/palettes/ANDBLK.png \
195 images/palettes/ANDLOG_f.png \
196 images/palettes/AUTOMAT.png \
197 images/palettes/Bache.png \
198 images/palettes/BACKLASH.png \
199 images/palettes/BARXY.png \
200 images/palettes/BIGSOM_f.png \
201 images/palettes/BITCLEAR.png \
202 images/palettes/BITSET.png \
203 images/palettes/BOUNCE.png \
204 images/palettes/BOUNCEXY.png \
205 images/palettes/BPLATFORM.png \
206 images/palettes/CANIMXY3D.png \
207 images/palettes/CANIMXY.png \
208 images/palettes/Capacitor.png \
209 images/palettes/c_block.png \
210 images/palettes/CBLOCK.png \
211 images/palettes/CCS.png \
212 images/palettes/CEVENTSCOPE.png \
213 images/palettes/CFSCOPE.png \
214 images/palettes/CLINDUMMY_f.png \
215 images/palettes/CLKFROM.png \
216 images/palettes/CLKGOTO.png \
217 images/palettes/CLKGotoTagVisibility.png \
218 images/palettes/CLKINV_f.png \
219 images/palettes/CLKOUTV_f.png \
220 images/palettes/CLKSOMV_f.png \
221 images/palettes/CLOCK_c.png \
222 images/palettes/CLR.png \
223 images/palettes/CLSS.png \
224 images/palettes/CMAT3D.png \
225 images/palettes/CMATVIEW.png \
226 images/palettes/CMSCOPE.png \
227 images/palettes/ConstantVoltage.png \
228 images/palettes/CONST_m.png \
229 images/palettes/CONSTRAINT2_c.png \
230 images/palettes/CONSTRAINT_c.png \
231 images/palettes/CONVERT.png \
232 images/palettes/COSBLK_f.png \
233 images/palettes/Counter.png \
234 images/palettes/CSCOPE.png \
235 images/palettes/CSCOPXY3D.png \
236 images/palettes/CSCOPXY.png \
237 images/palettes/CUMSUM.png \
238 images/palettes/CurrentSensor.png \
239 images/palettes/CURV_f.png \
240 images/palettes/CVS.png \
241 images/palettes/DEADBAND.png \
242 images/palettes/DEBUG_SCICOS.png \
243 images/palettes/DELAY_f.png \
244 images/palettes/DELAYV_f.png \
245 images/palettes/DEMUX.png \
246 images/palettes/DERIV.png \
247 images/palettes/DFLIPFLOP.png \
248 images/palettes/DIFF_f.png \
249 images/palettes/Diode.png \
250 images/palettes/DLATCH.png \
251 images/palettes/DLRADAPT_f.png \
252 images/palettes/DLR.png \
253 images/palettes/DLSS.png \
254 images/palettes/DOLLAR_f.png \
255 images/palettes/EDGE_TRIGGER.png \
256 images/palettes/ENDBLK.png \
257 images/palettes/END_c.png \
258 images/palettes/ESELECT_f.png \
259 images/palettes/EVTDLY_c.png \
260 images/palettes/EVTGEN_f.png \
261 images/palettes/EVTVARDLY.png \
262 images/palettes/EXPBLK_m.png \
263 images/palettes/EXPRESSION.png \
264 images/palettes/Extract_Activation.png \
265 images/palettes/EXTRACTBITS.png \
266 images/palettes/EXTRACTOR.png \
267 images/palettes/EXTRACT.png \
268 images/palettes/EXTTRI.png \
269 images/palettes/fortran_block.png \
270 images/palettes/freq_div.png \
271 images/palettes/FROMMO.png \
272 images/palettes/FROM.png \
273 images/palettes/FROMWSB.png \
274 images/palettes/GAINBLK_f.png \
275 images/palettes/GENERAL_f.png \
276 images/palettes/generic_block3.png \
277 images/palettes/GENSIN_f.png \
278 images/palettes/GENSQR_f.png \
279 images/palettes/GOTOMO.png \
280 images/palettes/GOTO.png \
281 images/palettes/GotoTagVisibilityMO.png \
282 images/palettes/GotoTagVisibility.png \
283 images/palettes/Ground.png \
284 images/palettes/Gyrator.png \
285 images/palettes/HALT_f.png \
286 images/palettes/HYSTHERESIS.png \
287 images/palettes/IdealTransformer.png \
288 images/palettes/IFTHEL_f.png \
289 images/palettes/Inductor.png \
290 images/palettes/IN_f.png \
291 images/palettes/INIMPL_f.png \
292 images/palettes/INTEGRAL_f.png \
293 images/palettes/INTEGRAL_m.png \
294 images/palettes/INTMUL.png \
295 images/palettes/INTRP2BLK_f.png \
296 images/palettes/INTRPLBLK_f.png \
297 images/palettes/INVBLK.png \
298 images/palettes/ISELECT_m.png \
299 images/palettes/JKFLIPFLOP.png \
300 images/palettes/LOGBLK_f.png \
301 images/palettes/LOGICAL_OP.png \
302 images/palettes/LOGIC.png \
303 images/palettes/LOOKUP_f.png \
304 images/palettes/MATBKSL.png \
305 images/palettes/MATCATH.png \
306 images/palettes/MATCATV.png \
307 images/palettes/MATDET.png \
308 images/palettes/MATDIAG.png \
309 images/palettes/MATDIV.png \
310 images/palettes/MATEIG.png \
311 images/palettes/MATEXPM.png \
312 images/palettes/MATINV.png \
313 images/palettes/MATLU.png \
314 images/palettes/MATMAGPHI.png \
315 images/palettes/MATMUL.png \
316 images/palettes/MATPINV.png \
317 images/palettes/MATRESH.png \
318 images/palettes/MATSING.png \
319 images/palettes/MATSUM.png \
320 images/palettes/MATTRAN.png \
321 images/palettes/MATZCONJ.png \
322 images/palettes/MATZREIM.png \
323 images/palettes/MAX_f.png \
324 images/palettes/MAXMIN.png \
325 images/palettes/MBLOCK.png \
326 images/palettes/MCLOCK_f.png \
327 images/palettes/MFCLCK_f.png \
328 images/palettes/M_freq.png \
329 images/palettes/MIN_f.png \
330 images/palettes/Modulo_Count.png \
331 images/palettes/M_SWITCH.png \
332 images/palettes/MUX.png \
333 images/palettes/NEGTOPOS_f.png \
334 images/palettes/NMOS.png \
335 images/palettes/NPN.png \
336 images/palettes/NRMSOM_f.png \
337 images/palettes/OpAmp.png \
338 images/palettes/OUT_f.png \
339 images/palettes/OUTIMPL_f.png \
340 images/palettes/PDE.png \
341 images/palettes/PerteDP.png \
342 images/palettes/PID.png \
343 images/palettes/PMOS.png \
344 images/palettes/PNP.png \
345 images/palettes/POSTONEG_f.png \
346 images/palettes/PotentialSensor.png \
347 images/palettes/POWBLK_f.png \
348 images/palettes/PROD_f.png \
349 images/palettes/PRODUCT.png \
350 images/palettes/PuitsP.png \
351 images/palettes/PULSE_SC.png \
352 images/palettes/QUANT_f.png \
353 images/palettes/RAMP.png \
354 images/palettes/RAND_m.png \
355 images/palettes/RATELIMITER.png \
356 images/palettes/READAU_f.png \
357 images/palettes/READC_f.png \
358 images/palettes/REGISTER.png \
359 images/palettes/RELATIONALOP.png \
360 images/palettes/RELAY_f.png \
361 images/palettes/Resistor.png \
362 images/palettes/RFILE_f.png \
363 images/palettes/RICC.png \
364 images/palettes/ROOTCOEF.png \
365 images/palettes/SAMPHOLD_m.png \
366 images/palettes/SampleCLK.png \
367 images/palettes/SATURATION.png \
368 images/palettes/SAWTOOTH_f.png \
369 images/palettes/SCALAR2VECTOR.png \
370 images/palettes/scifunc_block_m.png \
371 images/palettes/SELECT_m.png \
372 images/palettes/SELF_SWITCH_off.png \
373 images/palettes/SELF_SWITCH_on.png \
374 images/palettes/SELF_SWITCH.png \
375 images/palettes/SHIFT.png \
376 images/palettes/Sigbuilder.png \
377 images/palettes/SIGNUM.png \
378 images/palettes/SINBLK_f.png \
379 images/palettes/SineVoltage.png \
380 images/palettes/SourceP.png \
381 images/palettes/SQRT.png \
382 images/palettes/SRFLIPFLOP.png \
383 images/palettes/STEP_FUNCTION.png \
384 images/palettes/SUBMAT.png \
385 images/palettes/SUM_f.png \
386 images/palettes/SUMMATION.png \
387 images/palettes/SUPER_f.png \
388 images/palettes/SWITCH2_m.png \
389 images/palettes/SWITCH_f.png \
390 images/palettes/Switch.png \
391 images/palettes/TANBLK_f.png \
392 images/palettes/TCLSS.png \
393 images/palettes/TEXT_f.png \
394 images/palettes/TIME_DELAY.png \
395 images/palettes/TIME_f.png \
396 images/palettes/TKSCALE.png \
397 images/palettes/TOWS_c.png \
398 images/palettes/TRASH_f.png \
399 images/palettes/TrigFun.png \
400 images/palettes/VanneReglante.png \
401 images/palettes/VARIABLE_DELAY.png \
402 images/palettes/VariableResistor.png \
403 images/palettes/VirtualCLK0.png \
404 images/palettes/VoltageSensor.png \
405 images/palettes/VsourceAC.png \
406 images/palettes/VVsourceAC.png \
407 images/palettes/WFILE_f.png \
408 images/palettes/WRITEAU_f.png \
409 images/palettes/WRITEC_f.png \
410 images/palettes/ZCROSS_f.png
411
412 if XCOS
413 if GUI
414 USEANT=1
415 endif
416 endif
417
418 include $(top_srcdir)/Makefile.incl.am