]>
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 | |
ea1d5351 | 21 | ACLOCAL_AMFLAGS = -I m4 |
ba1c29dc | 22 | AM_LIBTOOLFLAGS = --silent |
bcc3694f | 23 | GNUMAKEFLAGS = --no-print-directory |
ba1c29dc | 24 | |
9448951d DE |
25 | # distutils/setuptools cause trouble on distcheck. Disable for now. |
26 | DISTCHECK_CONFIGURE_FLAGS = --disable-python | |
27 | ||
ba1c29dc | 28 | FIRMWARE_DIR = $(datadir)/sigrok-firmware |
826938d8 | 29 | |
9ac018d0 | 30 | local_includes = -Iinclude -I$(srcdir)/include -I$(srcdir)/src -I. |
1f61c22f | 31 | if BINDINGS_CXX |
4cf2f34f | 32 | local_includes += -Ibindings/cxx/include -I$(srcdir)/bindings/cxx/include -Ibindings/cxx |
1f61c22f | 33 | endif |
655b116c DE |
34 | # Do not hard-code the firmware location on Windows. |
35 | if WIN32 | |
36 | global_defs = | |
37 | else | |
38 | global_defs = -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"' | |
39 | endif | |
1f61c22f | 40 | # Ensure that local include directories are always searched first. |
655b116c | 41 | AM_CPPFLAGS = $(local_includes) $(global_defs) |
340f6e7a | 42 | |
65489c1a | 43 | # The tests CFLAGS are a superset of the libsigrok CFLAGS, and the |
1f61c22f | 44 | # python bindings CFLAGS are a superset of the C++ bindings CFLAGS. |
65489c1a | 45 | AM_CFLAGS = $(SR_EXTRA_CFLAGS) $(SR_WFLAGS) $(TESTS_CFLAGS) |
0441038e | 46 | AM_CXXFLAGS = $(SR_WXXFLAGS) $(LIBSIGROKCXX_CFLAGS) |
1f61c22f | 47 | |
8a7b47cd | 48 | lib_LTLIBRARIES = libsigrok.la |
a1bb33af | 49 | |
67bd8055 | 50 | # Backend files |
a695d6c0 | 51 | libsigrok_la_SOURCES = \ |
155b680d | 52 | src/backend.c \ |
6ad2fbaa | 53 | src/conversion.c \ |
155b680d BV |
54 | src/device.c \ |
55 | src/session.c \ | |
56 | src/session_file.c \ | |
57 | src/session_driver.c \ | |
155b680d BV |
58 | src/hwdriver.c \ |
59 | src/trigger.c \ | |
60 | src/soft-trigger.c \ | |
fb019a0e | 61 | src/analog.c \ |
24287ea9 | 62 | src/fallback.c \ |
bee24666 | 63 | src/resource.c \ |
155b680d BV |
64 | src/strutil.c \ |
65 | src/log.c \ | |
66 | src/version.c \ | |
67 | src/error.c \ | |
aea4e458 LPC |
68 | src/std.c \ |
69 | src/sw_limits.c | |
960a75e4 | 70 | |
155b680d BV |
71 | # Input modules |
72 | libsigrok_la_SOURCES += \ | |
155b680d | 73 | src/input/input.c \ |
b84cba4d | 74 | src/input/binary.c \ |
02e24c0c | 75 | src/input/chronovu_la8.c \ |
41d214f6 | 76 | src/input/csv.c \ |
e6b15cb5 | 77 | src/input/raw_analog.c \ |
6d2897e3 | 78 | src/input/trace32_ad.c \ |
7db06394 | 79 | src/input/vcd.c \ |
155b680d | 80 | src/input/wav.c |
67bd8055 | 81 | |
155b680d BV |
82 | # Output modules |
83 | libsigrok_la_SOURCES += \ | |
84 | src/output/output.c \ | |
85 | src/output/analog.c \ | |
86 | src/output/ascii.c \ | |
87 | src/output/bits.c \ | |
88 | src/output/binary.c \ | |
89 | src/output/csv.c \ | |
90 | src/output/chronovu_la8.c \ | |
afaa75b9 | 91 | src/output/wav.c \ |
155b680d BV |
92 | src/output/hex.c \ |
93 | src/output/ols.c \ | |
3250d8c7 | 94 | src/output/srzip.c \ |
155b680d | 95 | src/output/vcd.c |
67bd8055 | 96 | |
988357ca UH |
97 | # Transform modules |
98 | libsigrok_la_SOURCES += \ | |
39f1752e | 99 | src/transform/transform.c \ |
43caa466 | 100 | src/transform/nop.c \ |
d74d30bb UH |
101 | src/transform/scale.c \ |
102 | src/transform/invert.c | |
988357ca | 103 | |
155b680d | 104 | # SCPI support |
67bd8055 | 105 | libsigrok_la_SOURCES += \ |
0a9d05dc | 106 | src/scpi.h \ |
155b680d | 107 | src/scpi/scpi.c \ |
91ef511d | 108 | src/scpi/helpers.c \ |
155b680d | 109 | src/scpi/scpi_tcp.c |
67bd8055 UH |
110 | if NEED_RPC |
111 | libsigrok_la_SOURCES += \ | |
155b680d BV |
112 | src/scpi/scpi_vxi.c \ |
113 | src/scpi/vxi_clnt.c \ | |
114 | src/scpi/vxi_xdr.c \ | |
115 | src/scpi/vxi.h | |
67bd8055 UH |
116 | endif |
117 | if NEED_SERIAL | |
118 | libsigrok_la_SOURCES += \ | |
155b680d BV |
119 | src/serial.c \ |
120 | src/scpi/scpi_serial.c | |
67bd8055 UH |
121 | endif |
122 | if NEED_USB | |
123 | libsigrok_la_SOURCES += \ | |
155b680d BV |
124 | src/ezusb.c \ |
125 | src/usb.c \ | |
126 | src/scpi/scpi_usbtmc_libusb.c | |
67bd8055 UH |
127 | endif |
128 | if NEED_VISA | |
129 | libsigrok_la_SOURCES += \ | |
155b680d | 130 | src/scpi/scpi_visa.c |
67bd8055 | 131 | endif |
bb2a4ed4 ML |
132 | if NEED_GPIB |
133 | libsigrok_la_SOURCES += \ | |
7343ad1e | 134 | src/scpi/scpi_libgpib.c |
bb2a4ed4 | 135 | endif |
67bd8055 | 136 | |
f54ebe0c | 137 | # Modbus support |
daa39012 AJ |
138 | libsigrok_la_SOURCES += \ |
139 | src/modbus/modbus.c | |
4c938fc2 AJ |
140 | if NEED_SERIAL |
141 | libsigrok_la_SOURCES += \ | |
142 | src/modbus/modbus_serial_rtu.c | |
143 | endif | |
daa39012 | 144 | |
155b680d BV |
145 | # Hardware (DMM chip parsers) |
146 | libsigrok_la_SOURCES += \ | |
147 | src/dmm/es519xx.c \ | |
148 | src/dmm/fs9721.c \ | |
149 | src/dmm/fs9922.c \ | |
150 | src/dmm/m2110.c \ | |
151 | src/dmm/metex14.c \ | |
4ba4d52a | 152 | src/dmm/asycii.c \ |
a24c3f4a | 153 | src/dmm/rs9lcd.c \ |
626027df | 154 | src/dmm/bm25x.c \ |
f3cde309 | 155 | src/dmm/ut71x.c \ |
c36f78f7 | 156 | src/dmm/ut372.c \ |
eed3dec8 MG |
157 | src/dmm/vc870.c \ |
158 | src/dmm/dtm0660.c | |
67bd8055 | 159 | |
6bcb3ee8 | 160 | # Hardware (LCR chip parsers) |
d378f100 | 161 | if NEED_SERIAL |
6bcb3ee8 JH |
162 | libsigrok_la_SOURCES += \ |
163 | src/lcr/es51919.c | |
d378f100 | 164 | endif |
6bcb3ee8 | 165 | |
e5d953b5 UH |
166 | # Hardware (Scale protocol parsers) |
167 | libsigrok_la_SOURCES += \ | |
168 | src/scale/kern.c | |
169 | ||
67bd8055 | 170 | # Hardware drivers |
393375e1 MC |
171 | noinst_LTLIBRARIES = src/libdrivers.la \ |
172 | src/libdrivers_head.la src/libdrivers_tail.la | |
dd5c48a6 | 173 | |
393375e1 MC |
174 | src/libdrivers.o: src/libdrivers.la \ |
175 | src/libdrivers_head.la src/libdrivers_tail.la | |
176 | $(AM_V_CCLD)$(LINK) src/libdrivers_head.la src/libdrivers.la \ | |
177 | src/libdrivers_tail.la | |
5d8b3913 AJ |
178 | src/libdrivers.lo: src/libdrivers.o |
179 | $(AM_V_GEN)echo "# Generated by libtool" > $@ | |
180 | $(AM_V_at)echo "pic_object='libdrivers.o'" >> $@ | |
181 | $(AM_V_at)echo "non_pic_object='libdrivers.o'" >> $@ | |
182 | ||
393375e1 MC |
183 | src_libdrivers_head_la_SOURCES = src/driver_list_start.c |
184 | ||
185 | src_libdrivers_tail_la_SOURCES = src/driver_list_stop.c | |
186 | ||
5d8b3913 | 187 | src_libdrivers_la_SOURCES = src/drivers.c |
dd5c48a6 | 188 | |
67bd8055 | 189 | if HW_AGILENT_DMM |
5d8b3913 | 190 | src_libdrivers_la_SOURCES += \ |
6cf1a87b UH |
191 | src/hardware/agilent-dmm/protocol.h \ |
192 | src/hardware/agilent-dmm/protocol.c \ | |
193 | src/hardware/agilent-dmm/api.c | |
67bd8055 | 194 | endif |
67bd8055 | 195 | if HW_APPA_55II |
5d8b3913 | 196 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
197 | src/hardware/appa-55ii/protocol.h \ |
198 | src/hardware/appa-55ii/protocol.c \ | |
199 | src/hardware/appa-55ii/api.c | |
67bd8055 | 200 | endif |
6e8d31d4 | 201 | if HW_ARACHNID_LABS_RE_LOAD_PRO |
5d8b3913 | 202 | src_libdrivers_la_SOURCES += \ |
6e8d31d4 UH |
203 | src/hardware/arachnid-labs-re-load-pro/protocol.h \ |
204 | src/hardware/arachnid-labs-re-load-pro/protocol.c \ | |
205 | src/hardware/arachnid-labs-re-load-pro/api.c | |
206 | endif | |
67bd8055 | 207 | if HW_ASIX_SIGMA |
5d8b3913 | 208 | src_libdrivers_la_SOURCES += \ |
3ba56876 | 209 | src/hardware/asix-sigma/protocol.h \ |
210 | src/hardware/asix-sigma/protocol.c \ | |
211 | src/hardware/asix-sigma/api.c | |
67bd8055 UH |
212 | endif |
213 | if HW_ATTEN_PPS3XXX | |
5d8b3913 | 214 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
215 | src/hardware/atten-pps3xxx/protocol.h \ |
216 | src/hardware/atten-pps3xxx/protocol.c \ | |
217 | src/hardware/atten-pps3xxx/api.c | |
67bd8055 | 218 | endif |
dfaee1de | 219 | if HW_BAYLIBRE_ACME |
5d8b3913 | 220 | src_libdrivers_la_SOURCES += \ |
dfaee1de BG |
221 | src/hardware/baylibre-acme/protocol.h \ |
222 | src/hardware/baylibre-acme/protocol.c \ | |
289eebd7 BG |
223 | src/hardware/baylibre-acme/api.c \ |
224 | src/hardware/baylibre-acme/gpio.h \ | |
225 | src/hardware/baylibre-acme/gpio.c | |
dfaee1de | 226 | endif |
bb993797 | 227 | if HW_BEAGLELOGIC |
5d8b3913 | 228 | src_libdrivers_la_SOURCES += \ |
3db4b08b | 229 | src/hardware/beaglelogic/beaglelogic.h \ |
155b680d BV |
230 | src/hardware/beaglelogic/protocol.h \ |
231 | src/hardware/beaglelogic/protocol.c \ | |
88d2037b | 232 | src/hardware/beaglelogic/api.c \ |
9b2b3ef9 KA |
233 | src/hardware/beaglelogic/beaglelogic_native.c \ |
234 | src/hardware/beaglelogic/beaglelogic_tcp.c | |
bb993797 | 235 | endif |
67bd8055 | 236 | if HW_BRYMEN_BM86X |
5d8b3913 | 237 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
238 | src/hardware/brymen-bm86x/protocol.h \ |
239 | src/hardware/brymen-bm86x/protocol.c \ | |
240 | src/hardware/brymen-bm86x/api.c | |
67bd8055 UH |
241 | endif |
242 | if HW_BRYMEN_DMM | |
5d8b3913 | 243 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
244 | src/hardware/brymen-dmm/parser.c \ |
245 | src/hardware/brymen-dmm/protocol.h \ | |
246 | src/hardware/brymen-dmm/protocol.c \ | |
247 | src/hardware/brymen-dmm/api.c | |
67bd8055 UH |
248 | endif |
249 | if HW_CEM_DT_885X | |
5d8b3913 | 250 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
251 | src/hardware/cem-dt-885x/protocol.h \ |
252 | src/hardware/cem-dt-885x/protocol.c \ | |
253 | src/hardware/cem-dt-885x/api.c | |
67bd8055 UH |
254 | endif |
255 | if HW_CENTER_3XX | |
5d8b3913 | 256 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
257 | src/hardware/center-3xx/protocol.h \ |
258 | src/hardware/center-3xx/protocol.c \ | |
259 | src/hardware/center-3xx/api.c | |
67bd8055 | 260 | endif |
7b356712 | 261 | if HW_CHRONOVU_LA |
5d8b3913 | 262 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
263 | src/hardware/chronovu-la/protocol.h \ |
264 | src/hardware/chronovu-la/protocol.c \ | |
265 | src/hardware/chronovu-la/api.c | |
67bd8055 UH |
266 | endif |
267 | if HW_COLEAD_SLM | |
5d8b3913 | 268 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
269 | src/hardware/colead-slm/protocol.h \ |
270 | src/hardware/colead-slm/protocol.c \ | |
271 | src/hardware/colead-slm/api.c | |
67bd8055 UH |
272 | endif |
273 | if HW_CONRAD_DIGI_35_CPU | |
5d8b3913 | 274 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
275 | src/hardware/conrad-digi-35-cpu/protocol.h \ |
276 | src/hardware/conrad-digi-35-cpu/protocol.c \ | |
277 | src/hardware/conrad-digi-35-cpu/api.c | |
67bd8055 UH |
278 | endif |
279 | if HW_DEMO | |
5d8b3913 | 280 | src_libdrivers_la_SOURCES += \ |
ba508e22 UH |
281 | src/hardware/demo/protocol.h \ |
282 | src/hardware/demo/protocol.c \ | |
283 | src/hardware/demo/api.c | |
67bd8055 | 284 | endif |
44b46d70 | 285 | if HW_DREAMSOURCELAB_DSLOGIC |
adcb9951 | 286 | src_libdrivers_la_SOURCES += \ |
44b46d70 UH |
287 | src/hardware/dreamsourcelab-dslogic/protocol.h \ |
288 | src/hardware/dreamsourcelab-dslogic/protocol.c \ | |
289 | src/hardware/dreamsourcelab-dslogic/api.c | |
adcb9951 | 290 | endif |
67bd8055 | 291 | if HW_FLUKE_DMM |
5d8b3913 | 292 | src_libdrivers_la_SOURCES += \ |
2cb232a9 UH |
293 | src/hardware/fluke-dmm/protocol.h \ |
294 | src/hardware/fluke-dmm/protocol.c \ | |
155b680d | 295 | src/hardware/fluke-dmm/api.c |
67bd8055 | 296 | endif |
f2273382 | 297 | if HW_FTDI_LA |
5d8b3913 | 298 | src_libdrivers_la_SOURCES += \ |
f2273382 UH |
299 | src/hardware/ftdi-la/protocol.h \ |
300 | src/hardware/ftdi-la/protocol.c \ | |
301 | src/hardware/ftdi-la/api.c | |
4f7fdcdd | 302 | endif |
67bd8055 | 303 | if HW_FX2LAFW |
5d8b3913 | 304 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
305 | src/hardware/fx2lafw/protocol.h \ |
306 | src/hardware/fx2lafw/protocol.c \ | |
adcb9951 | 307 | src/hardware/fx2lafw/api.c |
67bd8055 UH |
308 | endif |
309 | if HW_GMC_MH_1X_2X | |
5d8b3913 | 310 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
311 | src/hardware/gmc-mh-1x-2x/protocol.h \ |
312 | src/hardware/gmc-mh-1x-2x/protocol.c \ | |
313 | src/hardware/gmc-mh-1x-2x/api.c | |
67bd8055 | 314 | endif |
7c198f96 | 315 | if HW_GWINSTEK_GDS_800 |
5d8b3913 | 316 | src_libdrivers_la_SOURCES += \ |
7c198f96 ML |
317 | src/hardware/gwinstek-gds-800/protocol.h \ |
318 | src/hardware/gwinstek-gds-800/protocol.c \ | |
319 | src/hardware/gwinstek-gds-800/api.c | |
320 | endif | |
67bd8055 | 321 | if HW_HAMEG_HMO |
5d8b3913 | 322 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
323 | src/hardware/hameg-hmo/protocol.h \ |
324 | src/hardware/hameg-hmo/protocol.c \ | |
325 | src/hardware/hameg-hmo/api.c | |
67bd8055 | 326 | endif |
6a25fa42 AZ |
327 | if HW_HANTEK_4032L |
328 | src_libdrivers_la_SOURCES += \ | |
329 | src/hardware/hantek-4032l/protocol.h \ | |
330 | src/hardware/hantek-4032l/protocol.c \ | |
331 | src/hardware/hantek-4032l/api.c | |
332 | endif | |
5089a143 AZ |
333 | if HW_HANTEK_6XXX |
334 | src_libdrivers_la_SOURCES += \ | |
335 | src/hardware/hantek-6xxx/protocol.h \ | |
336 | src/hardware/hantek-6xxx/protocol.c \ | |
337 | src/hardware/hantek-6xxx/api.c | |
338 | endif | |
67bd8055 | 339 | if HW_HANTEK_DSO |
5d8b3913 | 340 | src_libdrivers_la_SOURCES += \ |
caeb8d7a UH |
341 | src/hardware/hantek-dso/protocol.h \ |
342 | src/hardware/hantek-dso/protocol.c \ | |
155b680d | 343 | src/hardware/hantek-dso/api.c |
67bd8055 | 344 | endif |
00b2a092 | 345 | if HW_HP_3457A |
5d8b3913 | 346 | src_libdrivers_la_SOURCES += \ |
00b2a092 AG |
347 | src/hardware/hp-3457a/protocol.h \ |
348 | src/hardware/hp-3457a/protocol.c \ | |
349 | src/hardware/hp-3457a/api.c | |
350 | endif | |
1d9eebf4 FS |
351 | if HW_HP_3478A |
352 | src_libdrivers_la_SOURCES += \ | |
353 | src/hardware/hp-3478a/protocol.h \ | |
354 | src/hardware/hp-3478a/protocol.c \ | |
355 | src/hardware/hp-3478a/api.c | |
356 | endif | |
05ac4a98 | 357 | if HW_HUNG_CHANG_DSO_2100 |
5d8b3913 | 358 | src_libdrivers_la_SOURCES += \ |
05ac4a98 DG |
359 | src/hardware/hung-chang-dso-2100/protocol.h \ |
360 | src/hardware/hung-chang-dso-2100/protocol.c \ | |
361 | src/hardware/hung-chang-dso-2100/api.c | |
362 | endif | |
67bd8055 | 363 | if HW_IKALOGIC_SCANALOGIC2 |
5d8b3913 | 364 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
365 | src/hardware/ikalogic-scanalogic2/protocol.h \ |
366 | src/hardware/ikalogic-scanalogic2/protocol.c \ | |
367 | src/hardware/ikalogic-scanalogic2/api.c | |
67bd8055 UH |
368 | endif |
369 | if HW_IKALOGIC_SCANAPLUS | |
5d8b3913 | 370 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
371 | src/hardware/ikalogic-scanaplus/protocol.h \ |
372 | src/hardware/ikalogic-scanaplus/protocol.c \ | |
373 | src/hardware/ikalogic-scanaplus/api.c | |
67bd8055 UH |
374 | endif |
375 | if HW_KECHENG_KC_330B | |
5d8b3913 | 376 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
377 | src/hardware/kecheng-kc-330b/protocol.h \ |
378 | src/hardware/kecheng-kc-330b/protocol.c \ | |
379 | src/hardware/kecheng-kc-330b/api.c | |
67bd8055 | 380 | endif |
9380ec2f | 381 | if HW_KERN_SCALE |
5d8b3913 | 382 | src_libdrivers_la_SOURCES += \ |
9380ec2f UH |
383 | src/hardware/kern-scale/protocol.h \ |
384 | src/hardware/kern-scale/protocol.c \ | |
385 | src/hardware/kern-scale/api.c | |
386 | endif | |
16fc7ee2 | 387 | if HW_KORAD_KAXXXXP |
5d8b3913 | 388 | src_libdrivers_la_SOURCES += \ |
16fc7ee2 UH |
389 | src/hardware/korad-kaxxxxp/protocol.h \ |
390 | src/hardware/korad-kaxxxxp/protocol.c \ | |
391 | src/hardware/korad-kaxxxxp/api.c | |
e75ee7de | 392 | endif |
67bd8055 | 393 | if HW_LASCAR_EL_USB |
5d8b3913 | 394 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
395 | src/hardware/lascar-el-usb/protocol.h \ |
396 | src/hardware/lascar-el-usb/protocol.c \ | |
397 | src/hardware/lascar-el-usb/api.c | |
67bd8055 | 398 | endif |
c7b17bcb | 399 | if HW_LECROY_LOGICSTUDIO |
5d8b3913 | 400 | src_libdrivers_la_SOURCES += \ |
c7b17bcb TS |
401 | src/hardware/lecroy-logicstudio/protocol.h \ |
402 | src/hardware/lecroy-logicstudio/protocol.c \ | |
403 | src/hardware/lecroy-logicstudio/api.c | |
404 | endif | |
e3b83c5e SS |
405 | if HW_LECROY_XSTREAM |
406 | src_libdrivers_la_SOURCES += \ | |
407 | src/hardware/lecroy-xstream/protocol.h \ | |
408 | src/hardware/lecroy-xstream/protocol.c \ | |
409 | src/hardware/lecroy-xstream/api.c | |
410 | endif | |
8f4e922f | 411 | if HW_MANSON_HCS_3XXX |
5d8b3913 | 412 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
413 | src/hardware/manson-hcs-3xxx/protocol.h \ |
414 | src/hardware/manson-hcs-3xxx/protocol.c \ | |
415 | src/hardware/manson-hcs-3xxx/api.c | |
8f4e922f | 416 | endif |
e1ccfb19 | 417 | if HW_MAYNUO_M97 |
5d8b3913 | 418 | src_libdrivers_la_SOURCES += \ |
e1ccfb19 AJ |
419 | src/hardware/maynuo-m97/protocol.h \ |
420 | src/hardware/maynuo-m97/protocol.c \ | |
421 | src/hardware/maynuo-m97/api.c | |
422 | endif | |
67bd8055 | 423 | if HW_MIC_985XX |
5d8b3913 | 424 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
425 | src/hardware/mic-985xx/protocol.h \ |
426 | src/hardware/mic-985xx/protocol.c \ | |
427 | src/hardware/mic-985xx/api.c | |
67bd8055 | 428 | endif |
41b7bd01 | 429 | if HW_MOTECH_LPS_30X |
5d8b3913 | 430 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
431 | src/hardware/motech-lps-30x/protocol.h \ |
432 | src/hardware/motech-lps-30x/protocol.c \ | |
433 | src/hardware/motech-lps-30x/api.c | |
41b7bd01 | 434 | endif |
67bd8055 | 435 | if HW_NORMA_DMM |
5d8b3913 | 436 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
437 | src/hardware/norma-dmm/protocol.h \ |
438 | src/hardware/norma-dmm/protocol.c \ | |
439 | src/hardware/norma-dmm/api.c | |
67bd8055 | 440 | endif |
d4b38748 | 441 | if HW_OPENBENCH_LOGIC_SNIFFER |
5d8b3913 | 442 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
443 | src/hardware/openbench-logic-sniffer/protocol.h \ |
444 | src/hardware/openbench-logic-sniffer/protocol.c \ | |
445 | src/hardware/openbench-logic-sniffer/api.c | |
67bd8055 | 446 | endif |
5a2c71cc | 447 | if HW_PCE_322A |
5d8b3913 | 448 | src_libdrivers_la_SOURCES += \ |
5a2c71cc GH |
449 | src/hardware/pce-322a/protocol.h \ |
450 | src/hardware/pce-322a/protocol.c \ | |
451 | src/hardware/pce-322a/api.c | |
452 | endif | |
4bd80e12 | 453 | if HW_PIPISTRELLO_OLS |
5d8b3913 | 454 | src_libdrivers_la_SOURCES += \ |
4bd80e12 | 455 | src/hardware/pipistrello-ols/protocol.h \ |
456 | src/hardware/pipistrello-ols/protocol.c \ | |
457 | src/hardware/pipistrello-ols/api.c | |
458 | endif | |
67bd8055 | 459 | if HW_RIGOL_DS |
5d8b3913 | 460 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
461 | src/hardware/rigol-ds/protocol.h \ |
462 | src/hardware/rigol-ds/protocol.c \ | |
463 | src/hardware/rigol-ds/api.c | |
67bd8055 | 464 | endif |
a28b3df1 VI |
465 | if HW_ROHDE_SCHWARZ_SME_0X |
466 | src_libdrivers_la_SOURCES += \ | |
467 | src/hardware/rohde-schwarz-sme-0x/protocol.h \ | |
468 | src/hardware/rohde-schwarz-sme-0x/protocol.c \ | |
469 | src/hardware/rohde-schwarz-sme-0x/api.c | |
470 | endif | |
67bd8055 | 471 | if HW_SALEAE_LOGIC16 |
5d8b3913 | 472 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
473 | src/hardware/saleae-logic16/protocol.h \ |
474 | src/hardware/saleae-logic16/protocol.c \ | |
475 | src/hardware/saleae-logic16/api.c | |
67bd8055 | 476 | endif |
b6189f7c | 477 | if HW_SALEAE_LOGIC_PRO |
a8e913c4 | 478 | src_libdrivers_la_SOURCES += \ |
b6189f7c UH |
479 | src/hardware/saleae-logic-pro/protocol.h \ |
480 | src/hardware/saleae-logic-pro/protocol.c \ | |
481 | src/hardware/saleae-logic-pro/api.c | |
a8e913c4 | 482 | endif |
ca1a7cb5 | 483 | if HW_SCPI_PPS |
5d8b3913 | 484 | src_libdrivers_la_SOURCES += \ |
ca1a7cb5 BV |
485 | src/hardware/scpi-pps/protocol.h \ |
486 | src/hardware/scpi-pps/protocol.c \ | |
d4eabea8 | 487 | src/hardware/scpi-pps/profiles.c \ |
ca1a7cb5 BV |
488 | src/hardware/scpi-pps/api.c |
489 | endif | |
67bd8055 | 490 | if HW_SERIAL_DMM |
5d8b3913 | 491 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
492 | src/hardware/serial-dmm/protocol.h \ |
493 | src/hardware/serial-dmm/protocol.c \ | |
494 | src/hardware/serial-dmm/api.c | |
67bd8055 | 495 | endif |
503220ec GS |
496 | if HW_SERIAL_LCR |
497 | src_libdrivers_la_SOURCES += \ | |
498 | src/hardware/serial-lcr/api.c | |
499 | endif | |
89f5fab9 | 500 | if HW_SIGLENT_SDS |
501 | src_libdrivers_la_SOURCES += \ | |
502 | src/hardware/siglent-sds/protocol.h \ | |
503 | src/hardware/siglent-sds/protocol.c \ | |
504 | src/hardware/siglent-sds/api.c | |
505 | endif | |
67bd8055 | 506 | if HW_SYSCLK_LWLA |
5d8b3913 | 507 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
508 | src/hardware/sysclk-lwla/lwla.h \ |
509 | src/hardware/sysclk-lwla/lwla.c \ | |
be64f90b DE |
510 | src/hardware/sysclk-lwla/lwla1016.c \ |
511 | src/hardware/sysclk-lwla/lwla1034.c \ | |
155b680d BV |
512 | src/hardware/sysclk-lwla/protocol.h \ |
513 | src/hardware/sysclk-lwla/protocol.c \ | |
514 | src/hardware/sysclk-lwla/api.c | |
67bd8055 UH |
515 | endif |
516 | if HW_TELEINFO | |
5d8b3913 | 517 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
518 | src/hardware/teleinfo/protocol.h \ |
519 | src/hardware/teleinfo/protocol.c \ | |
520 | src/hardware/teleinfo/api.c | |
67bd8055 | 521 | endif |
0acdd793 | 522 | if HW_TESTO |
5d8b3913 | 523 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
524 | src/hardware/testo/protocol.h \ |
525 | src/hardware/testo/protocol.c \ | |
526 | src/hardware/testo/api.c | |
0acdd793 | 527 | endif |
67bd8055 | 528 | if HW_TONDAJ_SL_814 |
5d8b3913 | 529 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
530 | src/hardware/tondaj-sl-814/protocol.h \ |
531 | src/hardware/tondaj-sl-814/protocol.c \ | |
532 | src/hardware/tondaj-sl-814/api.c | |
67bd8055 UH |
533 | endif |
534 | if HW_UNI_T_DMM | |
5d8b3913 | 535 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
536 | src/hardware/uni-t-dmm/protocol.h \ |
537 | src/hardware/uni-t-dmm/protocol.c \ | |
538 | src/hardware/uni-t-dmm/api.c | |
67bd8055 UH |
539 | endif |
540 | if HW_UNI_T_UT32X | |
5d8b3913 | 541 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
542 | src/hardware/uni-t-ut32x/protocol.h \ |
543 | src/hardware/uni-t-ut32x/protocol.c \ | |
544 | src/hardware/uni-t-ut32x/api.c | |
67bd8055 UH |
545 | endif |
546 | if HW_VICTOR_DMM | |
5d8b3913 | 547 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
548 | src/hardware/victor-dmm/protocol.h \ |
549 | src/hardware/victor-dmm/protocol.c \ | |
550 | src/hardware/victor-dmm/api.c | |
67bd8055 | 551 | endif |
10763937 | 552 | if HW_YOKOGAWA_DLM |
5d8b3913 | 553 | src_libdrivers_la_SOURCES += \ |
10763937 SA |
554 | src/hardware/yokogawa-dlm/protocol.h \ |
555 | src/hardware/yokogawa-dlm/protocol.c \ | |
556 | src/hardware/yokogawa-dlm/protocol_wrappers.h \ | |
557 | src/hardware/yokogawa-dlm/protocol_wrappers.c \ | |
558 | src/hardware/yokogawa-dlm/api.c | |
559 | endif | |
67bd8055 | 560 | if HW_ZEROPLUS_LOGIC_CUBE |
5d8b3913 | 561 | src_libdrivers_la_SOURCES += \ |
155b680d BV |
562 | src/hardware/zeroplus-logic-cube/analyzer.c \ |
563 | src/hardware/zeroplus-logic-cube/analyzer.h \ | |
564 | src/hardware/zeroplus-logic-cube/gl_usb.h \ | |
565 | src/hardware/zeroplus-logic-cube/gl_usb.c \ | |
566 | src/hardware/zeroplus-logic-cube/protocol.h \ | |
567 | src/hardware/zeroplus-logic-cube/protocol.c \ | |
568 | src/hardware/zeroplus-logic-cube/api.c | |
67bd8055 UH |
569 | endif |
570 | ||
5d8b3913 | 571 | libsigrok_la_LIBADD = src/libdrivers.lo $(SR_EXTRA_LIBS) $(LIBSIGROK_LIBS) |
1f61c22f | 572 | libsigrok_la_LDFLAGS = -version-info $(SR_LIB_VERSION) -no-undefined |
ff101fca | 573 | |
45c59c8b | 574 | library_includedir = $(includedir)/libsigrok |
63d0fb75 ML |
575 | library_include_HEADERS = \ |
576 | include/libsigrok/libsigrok.h \ | |
122322a9 DE |
577 | include/libsigrok/proto.h |
578 | nodist_library_include_HEADERS = \ | |
63d0fb75 | 579 | include/libsigrok/version.h |
155b680d | 580 | noinst_HEADERS = src/libsigrok-internal.h |
a1bb33af | 581 | |
8a7b47cd UH |
582 | pkgconfigdir = $(libdir)/pkgconfig |
583 | pkgconfig_DATA = libsigrok.pc | |
d658e348 | 584 | |
a7600dc5 | 585 | mimeappdir = $(datadir)/mime/packages |
567d1fea UH |
586 | mimeapp_DATA = contrib/vnd.sigrok.session.xml |
587 | ||
588 | mimeicondir = $(datadir)/icons/hicolor/48x48/mimetypes | |
589 | mimeicon_DATA = contrib/libsigrok.png | |
590 | ||
591 | mimeiconscalabledir = $(datadir)/icons/hicolor/scalable/mimetypes | |
592 | mimeiconscalable_DATA = contrib/libsigrok.svg | |
593 | ||
67bd8055 UH |
594 | EXTRA_DIST = \ |
595 | Doxyfile \ | |
596 | HACKING \ | |
597 | README.devices \ | |
31ac7735 DE |
598 | bindings/cxx/ConfigKey_methods.cpp \ |
599 | bindings/cxx/ConfigKey_methods.hpp \ | |
600 | bindings/cxx/ConfigKey_methods.i \ | |
601 | bindings/cxx/Doxyfile \ | |
602 | bindings/cxx/QuantityFlag_methods.cpp \ | |
603 | bindings/cxx/QuantityFlag_methods.hpp \ | |
604 | bindings/cxx/enums.py \ | |
605 | bindings/python/Doxyfile \ | |
606 | bindings/python/setup.py \ | |
607 | bindings/python/sigrok/__init__.py \ | |
608 | bindings/python/sigrok/core/__init__.py \ | |
609 | bindings/python/sigrok/core/classes.i \ | |
c4a1015a | 610 | bindings/ruby/classes.i \ |
31ac7735 DE |
611 | bindings/java/Doxyfile \ |
612 | bindings/java/org/sigrok/core/classes/classes.i \ | |
613 | bindings/java/org/sigrok/core/interfaces/DatafeedCallback.java \ | |
614 | bindings/java/org/sigrok/core/interfaces/LogCallback.java \ | |
31ac7735 DE |
615 | bindings/swig/classes.i \ |
616 | bindings/swig/doc.py \ | |
0a9d05dc | 617 | bindings/swig/templates.i \ |
6b21d9a7 | 618 | contrib/libsigrok_112x112.png \ |
567d1fea UH |
619 | contrib/libsigrok.png \ |
620 | contrib/libsigrok.svg \ | |
621 | contrib/vnd.sigrok.session.xml \ | |
b2e9b6d4 UH |
622 | contrib/60-libsigrok.rules \ |
623 | contrib/61-libsigrok-plugdev.rules \ | |
624 | contrib/61-libsigrok-uaccess.rules | |
67bd8055 UH |
625 | |
626 | if HAVE_CHECK | |
02a2bf68 | 627 | TESTS = tests/main |
67bd8055 | 628 | check_PROGRAMS = ${TESTS} |
65489c1a | 629 | endif |
67bd8055 | 630 | |
02a2bf68 | 631 | tests_main_SOURCES = \ |
6592c369 | 632 | include/libsigrok/libsigrok.h \ |
67bd8055 UH |
633 | tests/lib.c \ |
634 | tests/lib.h \ | |
02a2bf68 UH |
635 | tests/main.c \ |
636 | tests/core.c \ | |
637 | tests/input_all.c \ | |
638 | tests/input_binary.c \ | |
639 | tests/output_all.c \ | |
640 | tests/transform_all.c \ | |
641 | tests/session.c \ | |
642 | tests/strutil.c \ | |
643 | tests/version.c \ | |
644 | tests/driver_all.c \ | |
645 | tests/device.c \ | |
6b71bf1b UH |
646 | tests/trigger.c \ |
647 | tests/analog.c | |
02a2bf68 | 648 | |
65489c1a | 649 | tests_main_LDADD = libsigrok.la $(SR_EXTRA_LIBS) $(TESTS_LIBS) |
dd8b5f56 | 650 | |
580ed400 ML |
651 | BUILD_EXTRA = |
652 | INSTALL_EXTRA = | |
7252a09e | 653 | UNINSTALL_EXTRA = |
580ed400 ML |
654 | CLEAN_EXTRA = |
655 | ||
09b2ca47 UH |
656 | libsigrok-uninstall: |
657 | -rmdir $(DESTDIR)$(includedir)/libsigrok | |
658 | ||
659 | UNINSTALL_EXTRA += libsigrok-uninstall | |
660 | ||
c23c8659 ML |
661 | if BINDINGS_CXX |
662 | ||
52ff4f6a | 663 | lib_LTLIBRARIES += bindings/cxx/libsigrokcxx.la |
c23c8659 | 664 | |
52ff4f6a | 665 | bindings_cxx_libsigrokcxx_la_SOURCES = bindings/cxx/classes.cpp |
c23c8659 | 666 | |
9d8f363d | 667 | bindings_cxx_libsigrokcxx_la_LIBADD = libsigrok.la $(SR_EXTRA_LIBS) $(LIBSIGROKCXX_LIBS) $(SR_EXTRA_CXX_LIBS) |
1f61c22f | 668 | bindings_cxx_libsigrokcxx_la_LDFLAGS = -version-info $(SR_LIB_VERSION) -no-undefined |
fc8f82e9 | 669 | |
0959ed3d UH |
670 | bindings_cxx_libsigrokcxx_la_includedir = $(includedir)/libsigrokcxx |
671 | bindings_cxx_libsigrokcxx_la_include_HEADERS = \ | |
122322a9 DE |
672 | bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp |
673 | nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS = \ | |
161dc24d | 674 | bindings/cxx/include/libsigrokcxx/enums.hpp |
c23c8659 | 675 | |
52ff4f6a | 676 | pkgconfig_DATA += bindings/cxx/libsigrokcxx.pc |
c23c8659 | 677 | |
3532ed01 | 678 | doxy/xml/index.xml: include/libsigrok/libsigrok.h |
7f82ec4d | 679 | $(AM_V_GEN)cd $(srcdir) && BUILDDIR=$(abs_builddir)/ doxygen Doxyfile 2>/dev/null |
580ed400 | 680 | |
cf5b338e | 681 | bindings/swig/enums.i: bindings/cxx/enums.timestamp |
580ed400 | 682 | bindings/cxx/enums.cpp: bindings/cxx/enums.timestamp |
161dc24d | 683 | bindings/cxx/include/libsigrokcxx/enums.hpp: bindings/cxx/enums.timestamp |
c23c8659 | 684 | |
b595a458 | 685 | bindings/cxx/enums.timestamp: $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml \ |
c23c8659 | 686 | bindings/cxx/ConfigKey_methods.cpp bindings/cxx/QuantityFlag_methods.cpp |
b595a458 | 687 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml |
f2a189f0 | 688 | $(AM_V_at)touch $@ |
c23c8659 | 689 | |
580ed400 | 690 | bindings/cxx/classes.lo: bindings/cxx/classes.cpp bindings/cxx/enums.cpp \ |
cf5b338e | 691 | $(library_include_HEADERS) $(nodist_library_include_HEADERS) |
c23c8659 | 692 | |
580ed400 | 693 | cxx-clean: |
3532ed01 | 694 | rm -rf doxy/ |
bd4fda24 | 695 | rm -rf bindings/cxx/doxy/ |
45ec8f77 | 696 | rm -f bindings/swig/enums.i |
580ed400 | 697 | rm -f bindings/cxx/enums.cpp |
161dc24d | 698 | rm -f bindings/cxx/include/libsigrokcxx/enums.hpp |
580ed400 | 699 | rm -f bindings/cxx/enums.timestamp |
c23c8659 | 700 | |
580ed400 ML |
701 | CLEAN_EXTRA += cxx-clean |
702 | ||
09b2ca47 UH |
703 | cxx-uninstall: |
704 | -rmdir $(DESTDIR)$(includedir)/libsigrokcxx | |
705 | ||
706 | UNINSTALL_EXTRA += cxx-uninstall | |
707 | ||
580ed400 | 708 | endif |
f7740954 | 709 | |
bd4fda24 ML |
710 | CPPXMLDOC = bindings/cxx/doxy/xml/index.xml |
711 | ||
161dc24d | 712 | $(CPPXMLDOC): bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp \ |
bd4fda24 | 713 | bindings/cxx/enums.timestamp |
33c84e81 | 714 | $(AM_V_GEN)cd $(srcdir)/bindings/cxx && BUILDDIR=$(abs_builddir)/bindings/cxx/ doxygen Doxyfile 2>/dev/null |
bd4fda24 | 715 | |
8ebf1469 DE |
716 | # Macro definitions to be used by the SWIG parser. |
717 | swig_defs = -Dnoexcept= -Dprivate=protected -DG_GNUC_BEGIN_IGNORE_DEPRECATIONS= -DG_GNUC_END_IGNORE_DEPRECATIONS= | |
718 | ||
f7740954 ML |
719 | if BINDINGS_PYTHON |
720 | ||
d1785122 | 721 | PDIR = bindings/python |
df979d6d ML |
722 | PDOC_START = bindings/python/sigrok/core/doc_start.i |
723 | PDOC_END = bindings/python/sigrok/core/doc_end.i | |
bd4fda24 | 724 | |
b020b81b | 725 | setup_vars = VERSION='$(PACKAGE_VERSION)' CC='$(CXX)' CXX='$(CXX)' CFLAGS='$(CXXFLAGS) $(SR_WXXFLAGS) $(PYSIGROK_CFLAGS)' CXXFLAGS='$(CXXFLAGS) $(SR_WXXFLAGS) $(PYSIGROK_CFLAGS)' LDADD='$(PYSIGROK_LIBS)' |
c05a0ba5 DE |
726 | setup_quiet = --quiet |
727 | setup_py = $(PYTHON) $(srcdir)/$(PDIR)/setup.py $(setup_vars) $(setup_quiet) | |
a9cb82ac | 728 | |
df979d6d | 729 | $(PDOC_START): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC) |
f3256bb7 | 730 | $(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core |
df979d6d ML |
731 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py python $(CPPXMLDOC) start > $@ |
732 | ||
733 | $(PDOC_END): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC) | |
734 | $(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core | |
735 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py python $(CPPXMLDOC) end > $@ | |
d1785122 ML |
736 | |
737 | python-build: $(PDIR)/timestamp | |
738 | ||
fd31865e | 739 | $(PDIR)/timestamp: $(PDIR)/sigrok/core/classes.i \ |
36e3f6a9 ML |
740 | bindings/swig/classes.i bindings/swig/templates.i \ |
741 | bindings/swig/enums.i $(PDOC_START) $(PDOC_END) \ | |
742 | $(library_include_HEADERS) \ | |
df979d6d | 743 | $(nodist_library_include_HEADERS) \ |
fd31865e ML |
744 | $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \ |
745 | $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) \ | |
ba3070ff | 746 | @ORDER@ bindings/cxx/libsigrokcxx.la |
a9cb82ac | 747 | $(AM_V_at)$(setup_py) clean --all 2>/dev/null |
8ebf1469 | 748 | $(AM_V_GEN)$(setup_py) build_ext --swig "$(SWIG)" --swig-opts '$(swig_defs)' build_py |
a9cb82ac | 749 | $(AM_V_at): >$@ |
f7740954 | 750 | |
a9cb82ac DE |
751 | python-install: |
752 | $(AM_V_at)$(MKDIR_P) "$(DESTDIR)$(prefix)" "$(DESTDIR)$(exec_prefix)" | |
452986be DE |
753 | destdir='$(DESTDIR)'; $(setup_py) install $${destdir:+"--root=$$destdir"} \ |
754 | --prefix "$(prefix)" --exec-prefix "$(exec_prefix)" | |
f7740954 | 755 | |
c26162ff | 756 | python-clean: |
a9cb82ac DE |
757 | -$(AM_V_at)rm -f $(PDIR)/timestamp |
758 | -$(AM_V_at)rm -fr $(PDIR)/doxy | |
c05a0ba5 | 759 | -$(AM_V_at)$(setup_py) clean --all 2>/dev/null |
6a8c1d68 ML |
760 | |
761 | python-doc: | |
a9cb82ac | 762 | $(AM_V_at)cd $(srcdir)/$(PDIR) && BUILDDIR="$(abs_builddir)/$(PDIR)/" doxygen Doxyfile 2>/dev/null |
f7740954 ML |
763 | |
764 | BUILD_EXTRA += python-build | |
765 | INSTALL_EXTRA += python-install | |
766 | CLEAN_EXTRA += python-clean | |
767 | ||
768 | endif | |
769 | ||
27d44cf6 AJ |
770 | if BINDINGS_RUBY |
771 | ||
772 | RDIR = bindings/ruby | |
773 | RDOC = $(RDIR)/doc.i | |
774 | RWRAP = $(RDIR)/classes_wrap.cpp | |
775 | ROBJ = $(RWRAP:.cpp=.o) | |
e9227902 | 776 | REXT = $(RDIR)/sigrok.$(RUBY_DLEXT) |
27d44cf6 AJ |
777 | |
778 | $(RDOC): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC) | |
17165513 | 779 | $(AM_V_at)test -d $(RDIR) || $(MKDIR_P) $(RDIR) |
27d44cf6 AJ |
780 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py ruby $(CPPXMLDOC) > $@ |
781 | ||
d8f96097 | 782 | $(RWRAP): $(srcdir)/$(RDIR)/classes.i $(RDOC) \ |
27d44cf6 AJ |
783 | bindings/swig/classes.i bindings/swig/templates.i \ |
784 | bindings/swig/enums.i | |
d8f96097 | 785 | $(AM_V_GEN)$(SWIG) -ruby -c++ -Ibindings -Ibindings/cxx/include -I$(RDIR) $(local_includes) $(swig_defs) -o $@ $(srcdir)/$(RDIR)/classes.i |
27d44cf6 AJ |
786 | |
787 | $(ROBJ): $(RWRAP) \ | |
788 | $(library_include_HEADERS) \ | |
789 | $(nodist_library_include_HEADERS) \ | |
790 | $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \ | |
791 | $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) | |
d8f96097 | 792 | $(AM_V_CXX)$(CXX) $(RBSIGROK_CFLAGS) -I. -Iinclude -Ibindings/cxx/include $(local_includes) -fPIC -o $@ -c $(RWRAP) |
27d44cf6 AJ |
793 | |
794 | $(REXT): $(ROBJ) @ORDER@ bindings/cxx/libsigrokcxx.la | |
d8f96097 | 795 | $(AM_V_CXXLD)$(CXX) -shared -o $@ $(ROBJ) -lsigrokcxx -Lbindings/cxx/.libs $(RBSIGROK_LIBS) |
27d44cf6 AJ |
796 | |
797 | ruby-build: $(REXT) | |
798 | ||
799 | ruby-install: $(REXT) | |
e9227902 | 800 | $(INSTALL) -d $(DESTDIR)$(prefix)/$(RBSIGROK_EXTDIR) |
d8f96097 | 801 | $(INSTALL) $(REXT) $(DESTDIR)$(prefix)/$(RBSIGROK_EXTDIR) |
27d44cf6 | 802 | |
c4a1015a MS |
803 | ruby-uninstall: |
804 | rm -f $(DESTDIR)$(prefix)/$(RBSIGROK_EXTDIR)/sigrok.$(RUBY_DLEXT) | |
805 | ||
27d44cf6 AJ |
806 | ruby-clean: |
807 | -$(AM_V_at)rm -fr $(RDIR)/doc | |
17165513 | 808 | -$(AM_V_at)rm -f $(REXT) $(ROBJ) $(RWRAP) $(RDOC) |
27d44cf6 AJ |
809 | |
810 | ruby-doc: $(RWRAP) | |
d8f96097 | 811 | $(AM_V_at)yard doc -o $(RDIR)/doc $(RWRAP) |
27d44cf6 AJ |
812 | |
813 | BUILD_EXTRA += ruby-build | |
814 | INSTALL_EXTRA += ruby-install | |
c4a1015a | 815 | UNINSTALL_EXTRA += ruby-uninstall |
27d44cf6 AJ |
816 | CLEAN_EXTRA += ruby-clean |
817 | ||
818 | endif | |
819 | ||
9fcf4d0b ML |
820 | if BINDINGS_JAVA |
821 | ||
822 | JDIR = bindings/java | |
90bd7656 ML |
823 | JPKG = org/sigrok/core |
824 | JCLS = $(JDIR)/$(JPKG)/classes | |
825 | JINT = $(JDIR)/$(JPKG)/interfaces | |
33c84e81 | 826 | JSRC = $(JCLS)/*.java $(srcdir)/$(JINT)/*.java |
90bd7656 | 827 | JSWG = $(JCLS)/classes.i |
bd4fda24 | 828 | JDOC = $(JCLS)/doc.i |
90bd7656 | 829 | JCXX = $(JCLS)/classes_wrap.cxx |
9fcf4d0b ML |
830 | JLIB = $(JDIR)/libsigrok_java_core_classes.so |
831 | JJAR = $(JDIR)/sigrok-core.jar | |
832 | ||
a9cb82ac DE |
833 | java_cleanfiles = $(JCXX) $(JCLS)/*.java $(JCLS)/*.class $(JINT)/*.class $(JJAR) $(JLIB) |
834 | ||
9fcf4d0b ML |
835 | java-build: $(JJAR) $(JLIB) |
836 | ||
dbde3b65 | 837 | $(JDOC): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC) |
f3256bb7 | 838 | $(AM_V_at)test -d $(JCLS) || $(MKDIR_P) $(JCLS) |
dbde3b65 | 839 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py java $(CPPXMLDOC) > $@ |
bd4fda24 | 840 | |
36e3f6a9 ML |
841 | $(JCXX): $(srcdir)/$(JSWG) $(JDOC) bindings/swig/classes.i \ |
842 | bindings/swig/templates.i bindings/swig/enums.i \ | |
fd31865e ML |
843 | $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \ |
844 | $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) | |
a9cb82ac | 845 | -$(AM_V_at)rm -f $(java_cleanfiles) |
8ebf1469 | 846 | $(AM_V_GEN)$(SWIG) -c++ $(swig_defs) \ |
4c9208a7 | 847 | -java -package org.sigrok.core.classes \ |
dbde3b65 DE |
848 | -Ibindings -I$(JCLS) $(local_includes) -I$(srcdir) $(JNI_CPPFLAGS) \ |
849 | -outdir $(JCLS) -o $@ $(srcdir)/$(JSWG) | |
9fcf4d0b | 850 | |
90bd7656 | 851 | $(JJAR): $(JCXX) |
1f61c22f | 852 | $(AM_V_GEN)$(JAVAC) -d $(JDIR) $(JSRC) |
f2a189f0 | 853 | $(AM_V_at)jar cf $(JJAR) -C $(JDIR) $(JPKG) |
9fcf4d0b | 854 | |
fd31865e ML |
855 | $(JLIB): $(JCXX) \ |
856 | $(library_include_HEADERS) $(nodist_library_include_HEADERS) \ | |
857 | $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \ | |
858 | $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) \ | |
ba3070ff | 859 | @ORDER@ bindings/cxx/libsigrokcxx.la |
9d8f363d | 860 | $(AM_V_GEN)$(CXXCOMPILE) $(JNI_CPPFLAGS) $(LDFLAGS) -L.libs -Lbindings/cxx/.libs \ |
90bd7656 | 861 | -fno-strict-aliasing -fPIC -shared $(JCLS)/classes_wrap.cxx \ |
9d8f363d | 862 | -lsigrokcxx $(LIBSIGROKCXX_LIBS) $(SR_EXTRA_CXX_LIBS) -o $(JLIB) |
9fcf4d0b ML |
863 | |
864 | java-install: | |
df705a7a | 865 | $(INSTALL) -d $(DESTDIR)$(libdir)/jni |
8e0f9bf7 | 866 | $(INSTALL) $(JLIB) $(DESTDIR)$(libdir)/jni |
df705a7a | 867 | $(INSTALL) -d $(DESTDIR)$(datadir)/java |
8e0f9bf7 | 868 | $(INSTALL) $(JJAR) $(DESTDIR)$(datadir)/java |
9fcf4d0b | 869 | |
7252a09e DE |
870 | java-uninstall: |
871 | -rm -f $(DESTDIR)$(datadir)/java/sigrok-core.jar | |
872 | -rm -f $(DESTDIR)$(libdir)/jni/libsigrok_java_core_classes.so | |
873 | ||
9fcf4d0b | 874 | java-clean: |
45ec8f77 | 875 | -$(AM_V_at)rm -f $(java_cleanfiles) $(JDOC) |
a9cb82ac | 876 | -$(AM_V_at)rm -fr $(JDIR)/doxy |
8a314e90 ML |
877 | |
878 | java-doc: | |
a9cb82ac | 879 | $(AM_V_at)cd $(srcdir)/$(JDIR) && BUILDDIR="$(abs_builddir)/$(JDIR)/" doxygen Doxyfile |
9fcf4d0b ML |
880 | |
881 | BUILD_EXTRA += java-build | |
882 | INSTALL_EXTRA += java-install | |
7252a09e | 883 | UNINSTALL_EXTRA += java-uninstall |
9fcf4d0b ML |
884 | CLEAN_EXTRA += java-clean |
885 | ||
886 | endif | |
887 | ||
f7740954 ML |
888 | all-local: $(BUILD_EXTRA) |
889 | install-exec-local: $(INSTALL_EXTRA) | |
09b2ca47 | 890 | uninstall-hook: $(UNINSTALL_EXTRA) |
d1785122 | 891 | clean-local: $(CLEAN_EXTRA) |
f7740954 | 892 | |
37829c15 DE |
893 | .PHONY: dist-changelog |
894 | ||
895 | dist-hook: dist-changelog | |
896 | ||
897 | dist-changelog: | |
898 | $(AM_V_at)if test ! -d '$(top_srcdir)/.git'; then \ | |
899 | cp -f '$(top_srcdir)/ChangeLog' "$(top_distdir)/ChangeLog"; \ | |
900 | elif git -C '$(top_srcdir)' log >.ChangeLog.tmp; then \ | |
901 | mv -f .ChangeLog.tmp "$(top_distdir)/ChangeLog"; \ | |
902 | else \ | |
903 | rm -f .ChangeLog.tmp; exit 1; \ | |
904 | fi | |
0fc12d66 | 905 |