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