]>
Commit | Line | Data |
---|---|---|
1 | ## | |
2 | ## This file is part of the libsigrok project. | |
3 | ## | |
4 | ## Copyright (C) 2010-2012 Bert Vermeulen <bert@biot.com> | |
5 | ## Copyright (C) 2012 Alexandru Gagniuc <mr.nuke.me@gmail.com> | |
6 | ## | |
7 | ## This program is free software: you can redistribute it and/or modify | |
8 | ## it under the terms of the GNU General Public License as published by | |
9 | ## the Free Software Foundation, either version 3 of the License, or | |
10 | ## (at your option) any later version. | |
11 | ## | |
12 | ## This program is distributed in the hope that it will be useful, | |
13 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | ## GNU General Public License for more details. | |
16 | ## | |
17 | ## You should have received a copy of the GNU General Public License | |
18 | ## along with this program. If not, see <http://www.gnu.org/licenses/>. | |
19 | ## | |
20 | ||
21 | ACLOCAL_AMFLAGS = -I autostuff | |
22 | ||
23 | AM_CPPFLAGS = -I$(srcdir)/src -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"' | |
24 | ||
25 | lib_LTLIBRARIES = libsigrok.la | |
26 | ||
27 | # Backend files | |
28 | libsigrok_la_SOURCES = \ | |
29 | src/backend.c \ | |
30 | src/device.c \ | |
31 | src/session.c \ | |
32 | src/session_file.c \ | |
33 | src/session_driver.c \ | |
34 | src/drivers.c \ | |
35 | src/hwdriver.c \ | |
36 | src/trigger.c \ | |
37 | src/soft-trigger.c \ | |
38 | src/analog.c \ | |
39 | src/strutil.c \ | |
40 | src/log.c \ | |
41 | src/version.c \ | |
42 | src/error.c \ | |
43 | src/std.c | |
44 | ||
45 | # Input modules | |
46 | libsigrok_la_SOURCES += \ | |
47 | src/input/input.c \ | |
48 | src/input/binary.c \ | |
49 | src/input/chronovu_la8.c \ | |
50 | src/input/csv.c \ | |
51 | src/input/vcd.c \ | |
52 | src/input/wav.c | |
53 | ||
54 | # Output modules | |
55 | libsigrok_la_SOURCES += \ | |
56 | src/output/output.c \ | |
57 | src/output/analog.c \ | |
58 | src/output/ascii.c \ | |
59 | src/output/bits.c \ | |
60 | src/output/binary.c \ | |
61 | src/output/csv.c \ | |
62 | src/output/chronovu_la8.c \ | |
63 | src/output/wav.c \ | |
64 | src/output/gnuplot.c \ | |
65 | src/output/hex.c \ | |
66 | src/output/ols.c \ | |
67 | src/output/srzip.c \ | |
68 | src/output/vcd.c | |
69 | ||
70 | # SCPI support | |
71 | libsigrok_la_SOURCES += \ | |
72 | src/scpi/scpi.c \ | |
73 | src/scpi/scpi_tcp.c | |
74 | if NEED_RPC | |
75 | libsigrok_la_SOURCES += \ | |
76 | src/scpi/scpi_vxi.c \ | |
77 | src/scpi/vxi_clnt.c \ | |
78 | src/scpi/vxi_xdr.c \ | |
79 | src/scpi/vxi.h | |
80 | endif | |
81 | if NEED_SERIAL | |
82 | libsigrok_la_SOURCES += \ | |
83 | src/serial.c \ | |
84 | src/scpi/scpi_serial.c | |
85 | endif | |
86 | if NEED_USB | |
87 | libsigrok_la_SOURCES += \ | |
88 | src/ezusb.c \ | |
89 | src/usb.c \ | |
90 | src/scpi/scpi_usbtmc_libusb.c | |
91 | endif | |
92 | if NEED_VISA | |
93 | libsigrok_la_SOURCES += \ | |
94 | src/scpi/scpi_visa.c | |
95 | endif | |
96 | if NEED_GPIB | |
97 | libsigrok_la_SOURCES += \ | |
98 | src/scpi/scpi_libgpib.c | |
99 | endif | |
100 | ||
101 | # Hardware (DMM chip parsers) | |
102 | libsigrok_la_SOURCES += \ | |
103 | src/dmm/es519xx.c \ | |
104 | src/dmm/fs9721.c \ | |
105 | src/dmm/fs9922.c \ | |
106 | src/dmm/m2110.c \ | |
107 | src/dmm/metex14.c \ | |
108 | src/dmm/rs9lcd.c \ | |
109 | src/dmm/bm25x.c \ | |
110 | src/dmm/ut71x.c | |
111 | ||
112 | # Hardware (LCR chip parsers) | |
113 | if HW_DEREE_DE5000 | |
114 | libsigrok_la_SOURCES += \ | |
115 | src/lcr/es51919.c | |
116 | endif | |
117 | ||
118 | # Hardware drivers | |
119 | if HW_AGILENT_DMM | |
120 | libsigrok_la_SOURCES += \ | |
121 | src/hardware/agilent-dmm/api.c \ | |
122 | src/hardware/agilent-dmm/agilent-dmm.h \ | |
123 | src/hardware/agilent-dmm/sched.c | |
124 | endif | |
125 | if HW_APPA_55II | |
126 | libsigrok_la_SOURCES += \ | |
127 | src/hardware/appa-55ii/protocol.h \ | |
128 | src/hardware/appa-55ii/protocol.c \ | |
129 | src/hardware/appa-55ii/api.c | |
130 | endif | |
131 | if HW_ASIX_SIGMA | |
132 | libsigrok_la_SOURCES += \ | |
133 | src/hardware/asix-sigma/asix-sigma.h \ | |
134 | src/hardware/asix-sigma/asix-sigma.c | |
135 | endif | |
136 | if HW_ATTEN_PPS3XXX | |
137 | libsigrok_la_SOURCES += \ | |
138 | src/hardware/atten-pps3xxx/protocol.h \ | |
139 | src/hardware/atten-pps3xxx/protocol.c \ | |
140 | src/hardware/atten-pps3xxx/api.c | |
141 | endif | |
142 | if HW_BEAGLELOGIC | |
143 | libsigrok_la_SOURCES += \ | |
144 | src/hardware/beaglelogic/beaglelogic.h \ | |
145 | src/hardware/beaglelogic/protocol.h \ | |
146 | src/hardware/beaglelogic/protocol.c \ | |
147 | src/hardware/beaglelogic/api.c | |
148 | endif | |
149 | if HW_BRYMEN_BM86X | |
150 | libsigrok_la_SOURCES += \ | |
151 | src/hardware/brymen-bm86x/protocol.h \ | |
152 | src/hardware/brymen-bm86x/protocol.c \ | |
153 | src/hardware/brymen-bm86x/api.c | |
154 | endif | |
155 | if HW_BRYMEN_DMM | |
156 | libsigrok_la_SOURCES += \ | |
157 | src/hardware/brymen-dmm/parser.c \ | |
158 | src/hardware/brymen-dmm/protocol.h \ | |
159 | src/hardware/brymen-dmm/protocol.c \ | |
160 | src/hardware/brymen-dmm/api.c | |
161 | endif | |
162 | if HW_CEM_DT_885X | |
163 | libsigrok_la_SOURCES += \ | |
164 | src/hardware/cem-dt-885x/protocol.h \ | |
165 | src/hardware/cem-dt-885x/protocol.c \ | |
166 | src/hardware/cem-dt-885x/api.c | |
167 | endif | |
168 | if HW_CENTER_3XX | |
169 | libsigrok_la_SOURCES += \ | |
170 | src/hardware/center-3xx/protocol.h \ | |
171 | src/hardware/center-3xx/protocol.c \ | |
172 | src/hardware/center-3xx/api.c | |
173 | endif | |
174 | if HW_CHRONOVU_LA | |
175 | libsigrok_la_SOURCES += \ | |
176 | src/hardware/chronovu-la/protocol.h \ | |
177 | src/hardware/chronovu-la/protocol.c \ | |
178 | src/hardware/chronovu-la/api.c | |
179 | endif | |
180 | if HW_COLEAD_SLM | |
181 | libsigrok_la_SOURCES += \ | |
182 | src/hardware/colead-slm/protocol.h \ | |
183 | src/hardware/colead-slm/protocol.c \ | |
184 | src/hardware/colead-slm/api.c | |
185 | endif | |
186 | if HW_CONRAD_DIGI_35_CPU | |
187 | libsigrok_la_SOURCES += \ | |
188 | src/hardware/conrad-digi-35-cpu/protocol.h \ | |
189 | src/hardware/conrad-digi-35-cpu/protocol.c \ | |
190 | src/hardware/conrad-digi-35-cpu/api.c | |
191 | endif | |
192 | if HW_DEMO | |
193 | libsigrok_la_SOURCES += \ | |
194 | src/hardware/demo/demo.c | |
195 | endif | |
196 | if HW_DEREE_DE5000 | |
197 | libsigrok_la_SOURCES += \ | |
198 | src/hardware/deree-de5000/api.c | |
199 | endif | |
200 | if HW_FLUKE_DMM | |
201 | libsigrok_la_SOURCES += \ | |
202 | src/hardware/fluke-dmm/fluke-dmm.h \ | |
203 | src/hardware/fluke-dmm/fluke.c \ | |
204 | src/hardware/fluke-dmm/api.c | |
205 | endif | |
206 | if HW_FX2LAFW | |
207 | libsigrok_la_SOURCES += \ | |
208 | src/hardware/fx2lafw/protocol.h \ | |
209 | src/hardware/fx2lafw/protocol.c \ | |
210 | src/hardware/fx2lafw/api.c | |
211 | endif | |
212 | if HW_GMC_MH_1X_2X | |
213 | libsigrok_la_SOURCES += \ | |
214 | src/hardware/gmc-mh-1x-2x/protocol.h \ | |
215 | src/hardware/gmc-mh-1x-2x/protocol.c \ | |
216 | src/hardware/gmc-mh-1x-2x/api.c | |
217 | endif | |
218 | if HW_HAMEG_HMO | |
219 | libsigrok_la_SOURCES += \ | |
220 | src/hardware/hameg-hmo/protocol.h \ | |
221 | src/hardware/hameg-hmo/protocol.c \ | |
222 | src/hardware/hameg-hmo/api.c | |
223 | endif | |
224 | if HW_HANTEK_DSO | |
225 | libsigrok_la_SOURCES += \ | |
226 | src/hardware/hantek-dso/dso.h \ | |
227 | src/hardware/hantek-dso/dso.c \ | |
228 | src/hardware/hantek-dso/api.c | |
229 | endif | |
230 | if HW_IKALOGIC_SCANALOGIC2 | |
231 | libsigrok_la_SOURCES += \ | |
232 | src/hardware/ikalogic-scanalogic2/protocol.h \ | |
233 | src/hardware/ikalogic-scanalogic2/protocol.c \ | |
234 | src/hardware/ikalogic-scanalogic2/api.c | |
235 | endif | |
236 | if HW_IKALOGIC_SCANAPLUS | |
237 | libsigrok_la_SOURCES += \ | |
238 | src/hardware/ikalogic-scanaplus/protocol.h \ | |
239 | src/hardware/ikalogic-scanaplus/protocol.c \ | |
240 | src/hardware/ikalogic-scanaplus/api.c | |
241 | endif | |
242 | if HW_KECHENG_KC_330B | |
243 | libsigrok_la_SOURCES += \ | |
244 | src/hardware/kecheng-kc-330b/protocol.h \ | |
245 | src/hardware/kecheng-kc-330b/protocol.c \ | |
246 | src/hardware/kecheng-kc-330b/api.c | |
247 | endif | |
248 | if HW_LASCAR_EL_USB | |
249 | libsigrok_la_SOURCES += \ | |
250 | src/hardware/lascar-el-usb/protocol.h \ | |
251 | src/hardware/lascar-el-usb/protocol.c \ | |
252 | src/hardware/lascar-el-usb/api.c | |
253 | endif | |
254 | if HW_MANSON_HCS_3XXX | |
255 | libsigrok_la_SOURCES += \ | |
256 | src/hardware/manson-hcs-3xxx/protocol.h \ | |
257 | src/hardware/manson-hcs-3xxx/protocol.c \ | |
258 | src/hardware/manson-hcs-3xxx/api.c | |
259 | endif | |
260 | if HW_MIC_985XX | |
261 | libsigrok_la_SOURCES += \ | |
262 | src/hardware/mic-985xx/protocol.h \ | |
263 | src/hardware/mic-985xx/protocol.c \ | |
264 | src/hardware/mic-985xx/api.c | |
265 | endif | |
266 | if HW_MOTECH_LPS_30X | |
267 | libsigrok_la_SOURCES += \ | |
268 | src/hardware/motech-lps-30x/protocol.h \ | |
269 | src/hardware/motech-lps-30x/protocol.c \ | |
270 | src/hardware/motech-lps-30x/api.c | |
271 | endif | |
272 | if HW_NORMA_DMM | |
273 | libsigrok_la_SOURCES += \ | |
274 | src/hardware/norma-dmm/protocol.h \ | |
275 | src/hardware/norma-dmm/protocol.c \ | |
276 | src/hardware/norma-dmm/api.c | |
277 | endif | |
278 | if HW_OPENBENCH_LOGIC_SNIFFER | |
279 | libsigrok_la_SOURCES += \ | |
280 | src/hardware/openbench-logic-sniffer/protocol.h \ | |
281 | src/hardware/openbench-logic-sniffer/protocol.c \ | |
282 | src/hardware/openbench-logic-sniffer/api.c | |
283 | endif | |
284 | if HW_PIPISTRELLO_OLS | |
285 | libsigrok_la_SOURCES += \ | |
286 | src/hardware/pipistrello-ols/protocol.h \ | |
287 | src/hardware/pipistrello-ols/protocol.c \ | |
288 | src/hardware/pipistrello-ols/api.c | |
289 | endif | |
290 | if HW_RIGOL_DS | |
291 | libsigrok_la_SOURCES += \ | |
292 | src/hardware/rigol-ds/protocol.h \ | |
293 | src/hardware/rigol-ds/protocol.c \ | |
294 | src/hardware/rigol-ds/api.c | |
295 | endif | |
296 | if HW_SALEAE_LOGIC16 | |
297 | libsigrok_la_SOURCES += \ | |
298 | src/hardware/saleae-logic16/protocol.h \ | |
299 | src/hardware/saleae-logic16/protocol.c \ | |
300 | src/hardware/saleae-logic16/api.c | |
301 | endif | |
302 | if HW_SCPI_PPS | |
303 | libsigrok_la_SOURCES += \ | |
304 | src/hardware/scpi-pps/protocol.h \ | |
305 | src/hardware/scpi-pps/protocol.c \ | |
306 | src/hardware/scpi-pps/profiles.c \ | |
307 | src/hardware/scpi-pps/api.c | |
308 | endif | |
309 | if HW_SERIAL_DMM | |
310 | libsigrok_la_SOURCES += \ | |
311 | src/hardware/serial-dmm/protocol.h \ | |
312 | src/hardware/serial-dmm/protocol.c \ | |
313 | src/hardware/serial-dmm/api.c | |
314 | endif | |
315 | if HW_SYSCLK_LWLA | |
316 | libsigrok_la_SOURCES += \ | |
317 | src/hardware/sysclk-lwla/lwla.h \ | |
318 | src/hardware/sysclk-lwla/lwla.c \ | |
319 | src/hardware/sysclk-lwla/protocol.h \ | |
320 | src/hardware/sysclk-lwla/protocol.c \ | |
321 | src/hardware/sysclk-lwla/api.c | |
322 | endif | |
323 | if HW_TELEINFO | |
324 | libsigrok_la_SOURCES += \ | |
325 | src/hardware/teleinfo/protocol.h \ | |
326 | src/hardware/teleinfo/protocol.c \ | |
327 | src/hardware/teleinfo/api.c | |
328 | endif | |
329 | if HW_TESTO | |
330 | libsigrok_la_SOURCES += \ | |
331 | src/hardware/testo/protocol.h \ | |
332 | src/hardware/testo/protocol.c \ | |
333 | src/hardware/testo/api.c | |
334 | endif | |
335 | if HW_TONDAJ_SL_814 | |
336 | libsigrok_la_SOURCES += \ | |
337 | src/hardware/tondaj-sl-814/protocol.h \ | |
338 | src/hardware/tondaj-sl-814/protocol.c \ | |
339 | src/hardware/tondaj-sl-814/api.c | |
340 | endif | |
341 | if HW_UNI_T_DMM | |
342 | libsigrok_la_SOURCES += \ | |
343 | src/hardware/uni-t-dmm/protocol.h \ | |
344 | src/hardware/uni-t-dmm/protocol.c \ | |
345 | src/hardware/uni-t-dmm/api.c | |
346 | endif | |
347 | if HW_UNI_T_UT32X | |
348 | libsigrok_la_SOURCES += \ | |
349 | src/hardware/uni-t-ut32x/protocol.h \ | |
350 | src/hardware/uni-t-ut32x/protocol.c \ | |
351 | src/hardware/uni-t-ut32x/api.c | |
352 | endif | |
353 | if HW_VICTOR_DMM | |
354 | libsigrok_la_SOURCES += \ | |
355 | src/hardware/victor-dmm/protocol.h \ | |
356 | src/hardware/victor-dmm/protocol.c \ | |
357 | src/hardware/victor-dmm/api.c | |
358 | endif | |
359 | if HW_YOKOGAWA_DLM | |
360 | libsigrok_la_SOURCES += \ | |
361 | src/hardware/yokogawa-dlm/protocol.h \ | |
362 | src/hardware/yokogawa-dlm/protocol.c \ | |
363 | src/hardware/yokogawa-dlm/protocol_wrappers.h \ | |
364 | src/hardware/yokogawa-dlm/protocol_wrappers.c \ | |
365 | src/hardware/yokogawa-dlm/api.c | |
366 | endif | |
367 | if HW_ZEROPLUS_LOGIC_CUBE | |
368 | libsigrok_la_SOURCES += \ | |
369 | src/hardware/zeroplus-logic-cube/analyzer.c \ | |
370 | src/hardware/zeroplus-logic-cube/analyzer.h \ | |
371 | src/hardware/zeroplus-logic-cube/gl_usb.h \ | |
372 | src/hardware/zeroplus-logic-cube/gl_usb.c \ | |
373 | src/hardware/zeroplus-logic-cube/protocol.h \ | |
374 | src/hardware/zeroplus-logic-cube/protocol.c \ | |
375 | src/hardware/zeroplus-logic-cube/api.c | |
376 | endif | |
377 | ||
378 | libsigrok_la_LIBADD = $(LIBOBJS) | |
379 | ||
380 | libsigrok_la_LDFLAGS = $(SR_LIB_LDFLAGS) | |
381 | ||
382 | library_includedir = $(includedir)/libsigrok | |
383 | library_include_HEADERS = \ | |
384 | include/libsigrok/libsigrok.h \ | |
385 | include/libsigrok/proto.h \ | |
386 | include/libsigrok/version.h | |
387 | noinst_HEADERS = src/libsigrok-internal.h | |
388 | ||
389 | pkgconfigdir = $(libdir)/pkgconfig | |
390 | pkgconfig_DATA = libsigrok.pc | |
391 | ||
392 | EXTRA_DIST = \ | |
393 | Doxyfile \ | |
394 | HACKING \ | |
395 | README.devices \ | |
396 | contrib/gnuplot_chronovu_la8.gpi \ | |
397 | contrib/gnuplot_rigol_ds1xx2.gpi \ | |
398 | contrib/gnuplot_usbeesx.gpi \ | |
399 | contrib/gnuplot_usbeedx8.gpi \ | |
400 | contrib/gnuplot_usbeedx16.gpi \ | |
401 | contrib/sigrok-logo-notext.png \ | |
402 | contrib/z60_libsigrok.rules | |
403 | ||
404 | if HAVE_CHECK | |
405 | ||
406 | TESTS = tests/check_main | |
407 | ||
408 | check_PROGRAMS = ${TESTS} | |
409 | ||
410 | tests_check_main_SOURCES = \ | |
411 | include/libsigrok/libsigrok.h \ | |
412 | tests/lib.c \ | |
413 | tests/lib.h \ | |
414 | tests/check_main.c \ | |
415 | tests/check_core.c \ | |
416 | tests/check_input_all.c \ | |
417 | tests/check_input_binary.c \ | |
418 | tests/check_output_all.c \ | |
419 | tests/check_session.c \ | |
420 | tests/check_strutil.c \ | |
421 | tests/check_version.c \ | |
422 | tests/check_driver_all.c \ | |
423 | tests/check_device.c \ | |
424 | tests/check_trigger.c | |
425 | ||
426 | tests_check_main_CFLAGS = @check_CFLAGS@ | |
427 | ||
428 | tests_check_main_LDADD = $(top_builddir)/libsigrok.la @check_LIBS@ | |
429 | ||
430 | endif | |
431 | ||
432 | BUILD_EXTRA = | |
433 | INSTALL_EXTRA = | |
434 | CLEAN_EXTRA = | |
435 | ||
436 | if BINDINGS_CXX | |
437 | ||
438 | lib_LTLIBRARIES += bindings/cxx/libsigrokxx.la | |
439 | ||
440 | bindings_cxx_libsigrokxx_la_SOURCES = bindings/cxx/classes.cpp | |
441 | ||
442 | bindings_cxx_libsigrokxx_la_LIBADD = libsigrok.la $(glibmm_LIBS) | |
443 | ||
444 | bindings_cxx_libsigrokxx_la_LDFLAGS = $(SR_LIB_LDFLAGS) | |
445 | ||
446 | library_include_HEADERS += \ | |
447 | bindings/cxx/include/libsigrok/libsigrok.hpp \ | |
448 | bindings/cxx/include/libsigrok/enums.hpp | |
449 | ||
450 | pkgconfig_DATA += bindings/cxx/libsigrokxx.pc | |
451 | ||
452 | doxy/xml/index.xml: include/libsigrok/libsigrok.h | |
453 | $(AM_V_GEN)cd $(srcdir) && BUILDDIR=$(abs_builddir)/ doxygen Doxyfile 2>/dev/null | |
454 | ||
455 | bindings/cxx/enums.cpp: bindings/cxx/enums.timestamp | |
456 | ||
457 | bindings/cxx/include/libsigrok/enums.hpp: bindings/cxx/enums.timestamp | |
458 | ||
459 | bindings/cxx/enums.timestamp: bindings/cxx/enums.py doxy/xml/index.xml \ | |
460 | bindings/cxx/ConfigKey_methods.cpp bindings/cxx/QuantityFlag_methods.cpp | |
461 | $(AM_V_GEN)$(PYTHON) $< doxy/xml/index.xml | |
462 | $(AM_V_at)touch $@ | |
463 | ||
464 | bindings/cxx/classes.lo: bindings/cxx/classes.cpp bindings/cxx/enums.cpp \ | |
465 | $(library_include_HEADERS) | |
466 | ||
467 | cxx-clean: | |
468 | rm -rf doxy/ | |
469 | rm -rf bindings/cxx/doxy/ | |
470 | rm -f bindings/cxx/enums.cpp | |
471 | rm -f bindings/cxx/include/libsigrok/enums.hpp | |
472 | rm -f bindings/cxx/enums.timestamp | |
473 | ||
474 | CLEAN_EXTRA += cxx-clean | |
475 | ||
476 | endif | |
477 | ||
478 | CPPXMLDOC = bindings/cxx/doxy/xml/index.xml | |
479 | ||
480 | $(CPPXMLDOC): bindings/cxx/include/libsigrok/libsigrok.hpp \ | |
481 | bindings/cxx/enums.timestamp | |
482 | $(AM_V_GEN)cd $(srcdir)/bindings/cxx && BUILDDIR=$(abs_builddir)/bindings/cxx/ doxygen Doxyfile 2>/dev/null | |
483 | ||
484 | if BINDINGS_PYTHON | |
485 | ||
486 | PDIR = bindings/python | |
487 | PDOC = bindings/python/sigrok/core/doc.i | |
488 | ||
489 | $(PDOC): bindings/swig/doc.py $(CPPXMLDOC) | |
490 | $(AM_V_at)test -d $(PDIR)/sigrok/core || mkdir -p $(PDIR)/sigrok/core | |
491 | $(AM_V_GEN)$(PYTHON) $< python $(CPPXMLDOC) > $@ | |
492 | ||
493 | python-build: $(PDIR)/timestamp | |
494 | ||
495 | python-quietclean: | |
496 | $(AM_V_at)cd $(PDIR) && $(PYTHON) $(abs_srcdir)/$(PDIR)/setup.py --quiet clean --all 3>&1 1>&2 2>&3 \ | |
497 | | grep -v "can.t clean it"; true | |
498 | ||
499 | $(PDIR)/timestamp: bindings/cxx/libsigrokxx.la $(PDIR)/sigrok/core/classes.i \ | |
500 | bindings/swig/classes.i $(PDOC) $(library_include_HEADERS) | |
501 | $(AM_V_at)$(MAKE) python-quietclean | |
502 | $(AM_V_GEN)cd $(PDIR) && $(PYTHON) $(abs_srcdir)/$(PDIR)/setup.py --quiet build 3>&1 1>&2 2>&3 \ | |
503 | | grep -v "command line option.*Wstrict-prototypes"; true | |
504 | $(AM_V_at)touch $(PDIR)/timestamp | |
505 | ||
506 | python-install: | |
507 | cd $(PDIR) && $(PYTHON) $(abs_srcdir)/$(PDIR)/setup.py --quiet install --prefix $(prefix) | |
508 | ||
509 | python-clean: | |
510 | $(AM_V_at)$(MAKE) python-quietclean | |
511 | $(AM_V_at)rm -f $(PDIR)/timestamp | |
512 | $(AM_V_at)rm -rf $(PDIR)/doxy/ | |
513 | ||
514 | python-doc: | |
515 | $(AM_V_at)cd $(srcdir)/$(PDIR) && BUILDDIR=$(abs_builddir)/$(PDIR)/ doxygen Doxyfile 2>/dev/null | |
516 | ||
517 | BUILD_EXTRA += python-build | |
518 | INSTALL_EXTRA += python-install | |
519 | CLEAN_EXTRA += python-clean | |
520 | ||
521 | endif | |
522 | ||
523 | if BINDINGS_JAVA | |
524 | ||
525 | JDIR = bindings/java | |
526 | JPKG = org/sigrok/core | |
527 | JCLS = $(JDIR)/$(JPKG)/classes | |
528 | JINT = $(JDIR)/$(JPKG)/interfaces | |
529 | JSRC = $(JCLS)/*.java $(srcdir)/$(JINT)/*.java | |
530 | JSWG = $(JCLS)/classes.i | |
531 | JDOC = $(JCLS)/doc.i | |
532 | JCXX = $(JCLS)/classes_wrap.cxx | |
533 | JLIB = $(JDIR)/libsigrok_java_core_classes.so | |
534 | JJAR = $(JDIR)/sigrok-core.jar | |
535 | ||
536 | java-build: $(JJAR) $(JLIB) | |
537 | ||
538 | $(JDOC): bindings/swig/doc.py $(CPPXMLDOC) | |
539 | $(AM_V_at)test -d $(JCLS) || mkdir -p $(JCLS) | |
540 | $(AM_V_GEN)python $< java $(CPPXMLDOC) > $@ | |
541 | ||
542 | $(JCXX): $(JSWG) $(JDOC) bindings/swig/classes.i $(library_include_HEADERS) | |
543 | $(AM_V_at)make java-clean | |
544 | $(AM_V_GEN)swig -c++ -java -package org.sigrok.core.classes \ | |
545 | -I$(srcdir)/include -I$(srcdir)/bindings/cxx/include -I$(srcdir) -I$(JCLS) -Ibindings/cxx/include -outdir $(JCLS) -o $@ $< | |
546 | ||
547 | $(JJAR): $(JCXX) | |
548 | $(AM_V_GEN)$(JAVAC) -sourcepath $(JDIR) -d $(JDIR) $(JSRC) | |
549 | $(AM_V_at)jar cf $(JJAR) -C $(JDIR) $(JPKG) | |
550 | ||
551 | $(JLIB): $(JCXX) bindings/cxx/libsigrokxx.la $(library_include_HEADERS) | |
552 | $(AM_V_GEN)$(CXXCOMPILE) -L.libs -Lbindings/cxx/.libs \ | |
553 | -fno-strict-aliasing -fPIC -shared $(JCLS)/classes_wrap.cxx \ | |
554 | -lsigrokxx -o $(JLIB) | |
555 | ||
556 | java-install: | |
557 | $(INSTALL) -d $(libdir)/jni | |
558 | $(INSTALL) $(JLIB) -t $(libdir)/jni | |
559 | $(INSTALL) -d $(datadir)/java | |
560 | $(INSTALL) $(JJAR) -t $(datadir)/java | |
561 | ||
562 | java-clean: | |
563 | $(AM_V_at)rm -f $(JCXX) | |
564 | $(AM_V_at)rm -f $(JCLS)/*.java | |
565 | $(AM_V_at)rm -f $(JCLS)/*.class | |
566 | $(AM_V_at)rm -f $(JINT)/*.class | |
567 | $(AM_V_at)rm -f $(JJAR) | |
568 | $(AM_V_at)rm -f $(JLIB) | |
569 | $(AM_V_at)rm -rf $(JDIR)/doxy/ | |
570 | ||
571 | java-doc: | |
572 | $(AM_V_at)cd $(srcdir)/$(JDIR) && BUILDDIR=$(abs_builddir)/$(JDIR)/ doxygen Doxyfile 2>/dev/null | |
573 | ||
574 | BUILD_EXTRA += java-build | |
575 | INSTALL_EXTRA += java-install | |
576 | CLEAN_EXTRA += java-clean | |
577 | ||
578 | endif | |
579 | ||
580 | all-local: $(BUILD_EXTRA) | |
581 | install-exec-local: $(INSTALL_EXTRA) | |
582 | clean-local: $(CLEAN_EXTRA) | |
583 | ||
584 | MAINTAINERCLEANFILES = ChangeLog | |
585 | ||
586 | .PHONY: ChangeLog | |
587 | ChangeLog: | |
588 | git --git-dir $(top_srcdir)/.git log > ChangeLog || touch ChangeLog | |
589 | ||
590 | dist-hook: ChangeLog | |
591 |