]>
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 DE |
24 | |
25 | FIRMWARE_DIR = $(datadir)/sigrok-firmware | |
826938d8 | 26 | |
9ac018d0 | 27 | local_includes = -Iinclude -I$(srcdir)/include -I$(srcdir)/src -I. |
1f61c22f | 28 | if BINDINGS_CXX |
4cf2f34f | 29 | local_includes += -Ibindings/cxx/include -I$(srcdir)/bindings/cxx/include -Ibindings/cxx |
1f61c22f DE |
30 | endif |
31 | # Ensure that local include directories are always searched first. | |
56c8705e | 32 | AM_CPPFLAGS = $(local_includes) -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"' |
340f6e7a | 33 | |
65489c1a | 34 | # The tests CFLAGS are a superset of the libsigrok CFLAGS, and the |
1f61c22f | 35 | # python bindings CFLAGS are a superset of the C++ bindings CFLAGS. |
65489c1a | 36 | AM_CFLAGS = $(SR_EXTRA_CFLAGS) $(SR_WFLAGS) $(TESTS_CFLAGS) |
4cf2f34f | 37 | AM_CXXFLAGS = $(SR_WXXFLAGS) $(PYSIGROK_CFLAGS) |
1f61c22f | 38 | |
8a7b47cd | 39 | lib_LTLIBRARIES = libsigrok.la |
a1bb33af | 40 | |
67bd8055 | 41 | # Backend files |
a695d6c0 | 42 | libsigrok_la_SOURCES = \ |
155b680d BV |
43 | src/backend.c \ |
44 | src/device.c \ | |
45 | src/session.c \ | |
46 | src/session_file.c \ | |
47 | src/session_driver.c \ | |
48 | src/drivers.c \ | |
49 | src/hwdriver.c \ | |
50 | src/trigger.c \ | |
51 | src/soft-trigger.c \ | |
fb019a0e | 52 | src/analog.c \ |
24287ea9 | 53 | src/fallback.c \ |
bee24666 | 54 | src/resource.c \ |
155b680d BV |
55 | src/strutil.c \ |
56 | src/log.c \ | |
57 | src/version.c \ | |
58 | src/error.c \ | |
59 | src/std.c | |
960a75e4 | 60 | |
155b680d BV |
61 | # Input modules |
62 | libsigrok_la_SOURCES += \ | |
155b680d | 63 | src/input/input.c \ |
b84cba4d | 64 | src/input/binary.c \ |
02e24c0c | 65 | src/input/chronovu_la8.c \ |
41d214f6 | 66 | src/input/csv.c \ |
7db06394 | 67 | src/input/vcd.c \ |
155b680d | 68 | src/input/wav.c |
67bd8055 | 69 | |
155b680d BV |
70 | # Output modules |
71 | libsigrok_la_SOURCES += \ | |
72 | src/output/output.c \ | |
73 | src/output/analog.c \ | |
74 | src/output/ascii.c \ | |
75 | src/output/bits.c \ | |
76 | src/output/binary.c \ | |
77 | src/output/csv.c \ | |
78 | src/output/chronovu_la8.c \ | |
afaa75b9 | 79 | src/output/wav.c \ |
155b680d BV |
80 | src/output/gnuplot.c \ |
81 | src/output/hex.c \ | |
82 | src/output/ols.c \ | |
3250d8c7 | 83 | src/output/srzip.c \ |
155b680d | 84 | src/output/vcd.c |
67bd8055 | 85 | |
988357ca UH |
86 | # Transform modules |
87 | libsigrok_la_SOURCES += \ | |
39f1752e | 88 | src/transform/transform.c \ |
43caa466 | 89 | src/transform/nop.c \ |
d74d30bb UH |
90 | src/transform/scale.c \ |
91 | src/transform/invert.c | |
988357ca | 92 | |
155b680d | 93 | # SCPI support |
67bd8055 | 94 | libsigrok_la_SOURCES += \ |
155b680d | 95 | src/scpi/scpi.c \ |
91ef511d | 96 | src/scpi/helpers.c \ |
155b680d | 97 | src/scpi/scpi_tcp.c |
67bd8055 UH |
98 | if NEED_RPC |
99 | libsigrok_la_SOURCES += \ | |
155b680d BV |
100 | src/scpi/scpi_vxi.c \ |
101 | src/scpi/vxi_clnt.c \ | |
102 | src/scpi/vxi_xdr.c \ | |
103 | src/scpi/vxi.h | |
67bd8055 UH |
104 | endif |
105 | if NEED_SERIAL | |
106 | libsigrok_la_SOURCES += \ | |
155b680d BV |
107 | src/serial.c \ |
108 | src/scpi/scpi_serial.c | |
67bd8055 UH |
109 | endif |
110 | if NEED_USB | |
111 | libsigrok_la_SOURCES += \ | |
155b680d BV |
112 | src/ezusb.c \ |
113 | src/usb.c \ | |
114 | src/scpi/scpi_usbtmc_libusb.c | |
67bd8055 UH |
115 | endif |
116 | if NEED_VISA | |
117 | libsigrok_la_SOURCES += \ | |
155b680d | 118 | src/scpi/scpi_visa.c |
67bd8055 | 119 | endif |
bb2a4ed4 ML |
120 | if NEED_GPIB |
121 | libsigrok_la_SOURCES += \ | |
7343ad1e | 122 | src/scpi/scpi_libgpib.c |
bb2a4ed4 | 123 | endif |
67bd8055 | 124 | |
f54ebe0c | 125 | # Modbus support |
daa39012 AJ |
126 | libsigrok_la_SOURCES += \ |
127 | src/modbus/modbus.c | |
4c938fc2 AJ |
128 | if NEED_SERIAL |
129 | libsigrok_la_SOURCES += \ | |
130 | src/modbus/modbus_serial_rtu.c | |
131 | endif | |
daa39012 | 132 | |
155b680d BV |
133 | # Hardware (DMM chip parsers) |
134 | libsigrok_la_SOURCES += \ | |
135 | src/dmm/es519xx.c \ | |
136 | src/dmm/fs9721.c \ | |
137 | src/dmm/fs9922.c \ | |
138 | src/dmm/m2110.c \ | |
139 | src/dmm/metex14.c \ | |
a24c3f4a | 140 | src/dmm/rs9lcd.c \ |
626027df | 141 | src/dmm/bm25x.c \ |
f3cde309 | 142 | src/dmm/ut71x.c \ |
c36f78f7 UH |
143 | src/dmm/ut372.c \ |
144 | src/dmm/vc870.c | |
67bd8055 | 145 | |
6bcb3ee8 | 146 | # Hardware (LCR chip parsers) |
d378f100 | 147 | if NEED_SERIAL |
6bcb3ee8 JH |
148 | libsigrok_la_SOURCES += \ |
149 | src/lcr/es51919.c | |
d378f100 | 150 | endif |
6bcb3ee8 | 151 | |
e5d953b5 UH |
152 | # Hardware (Scale protocol parsers) |
153 | libsigrok_la_SOURCES += \ | |
154 | src/scale/kern.c | |
155 | ||
67bd8055 UH |
156 | # Hardware drivers |
157 | if HW_AGILENT_DMM | |
158 | libsigrok_la_SOURCES += \ | |
155b680d BV |
159 | src/hardware/agilent-dmm/api.c \ |
160 | src/hardware/agilent-dmm/agilent-dmm.h \ | |
161 | src/hardware/agilent-dmm/sched.c | |
67bd8055 | 162 | endif |
67bd8055 UH |
163 | if HW_APPA_55II |
164 | libsigrok_la_SOURCES += \ | |
155b680d BV |
165 | src/hardware/appa-55ii/protocol.h \ |
166 | src/hardware/appa-55ii/protocol.c \ | |
167 | src/hardware/appa-55ii/api.c | |
67bd8055 UH |
168 | endif |
169 | if HW_ASIX_SIGMA | |
170 | libsigrok_la_SOURCES += \ | |
155b680d BV |
171 | src/hardware/asix-sigma/asix-sigma.h \ |
172 | src/hardware/asix-sigma/asix-sigma.c | |
67bd8055 UH |
173 | endif |
174 | if HW_ATTEN_PPS3XXX | |
175 | libsigrok_la_SOURCES += \ | |
155b680d BV |
176 | src/hardware/atten-pps3xxx/protocol.h \ |
177 | src/hardware/atten-pps3xxx/protocol.c \ | |
178 | src/hardware/atten-pps3xxx/api.c | |
67bd8055 | 179 | endif |
dfaee1de BG |
180 | if HW_BAYLIBRE_ACME |
181 | libsigrok_la_SOURCES += \ | |
182 | src/hardware/baylibre-acme/protocol.h \ | |
183 | src/hardware/baylibre-acme/protocol.c \ | |
289eebd7 BG |
184 | src/hardware/baylibre-acme/api.c \ |
185 | src/hardware/baylibre-acme/gpio.h \ | |
186 | src/hardware/baylibre-acme/gpio.c | |
dfaee1de | 187 | endif |
bb993797 KA |
188 | if HW_BEAGLELOGIC |
189 | libsigrok_la_SOURCES += \ | |
3db4b08b | 190 | src/hardware/beaglelogic/beaglelogic.h \ |
155b680d BV |
191 | src/hardware/beaglelogic/protocol.h \ |
192 | src/hardware/beaglelogic/protocol.c \ | |
193 | src/hardware/beaglelogic/api.c | |
bb993797 | 194 | endif |
67bd8055 UH |
195 | if HW_BRYMEN_BM86X |
196 | libsigrok_la_SOURCES += \ | |
155b680d BV |
197 | src/hardware/brymen-bm86x/protocol.h \ |
198 | src/hardware/brymen-bm86x/protocol.c \ | |
199 | src/hardware/brymen-bm86x/api.c | |
67bd8055 UH |
200 | endif |
201 | if HW_BRYMEN_DMM | |
202 | libsigrok_la_SOURCES += \ | |
155b680d BV |
203 | src/hardware/brymen-dmm/parser.c \ |
204 | src/hardware/brymen-dmm/protocol.h \ | |
205 | src/hardware/brymen-dmm/protocol.c \ | |
206 | src/hardware/brymen-dmm/api.c | |
67bd8055 UH |
207 | endif |
208 | if HW_CEM_DT_885X | |
209 | libsigrok_la_SOURCES += \ | |
155b680d BV |
210 | src/hardware/cem-dt-885x/protocol.h \ |
211 | src/hardware/cem-dt-885x/protocol.c \ | |
212 | src/hardware/cem-dt-885x/api.c | |
67bd8055 UH |
213 | endif |
214 | if HW_CENTER_3XX | |
215 | libsigrok_la_SOURCES += \ | |
155b680d BV |
216 | src/hardware/center-3xx/protocol.h \ |
217 | src/hardware/center-3xx/protocol.c \ | |
218 | src/hardware/center-3xx/api.c | |
67bd8055 | 219 | endif |
7b356712 | 220 | if HW_CHRONOVU_LA |
67bd8055 | 221 | libsigrok_la_SOURCES += \ |
155b680d BV |
222 | src/hardware/chronovu-la/protocol.h \ |
223 | src/hardware/chronovu-la/protocol.c \ | |
224 | src/hardware/chronovu-la/api.c | |
67bd8055 UH |
225 | endif |
226 | if HW_COLEAD_SLM | |
227 | libsigrok_la_SOURCES += \ | |
155b680d BV |
228 | src/hardware/colead-slm/protocol.h \ |
229 | src/hardware/colead-slm/protocol.c \ | |
230 | src/hardware/colead-slm/api.c | |
67bd8055 UH |
231 | endif |
232 | if HW_CONRAD_DIGI_35_CPU | |
233 | libsigrok_la_SOURCES += \ | |
155b680d BV |
234 | src/hardware/conrad-digi-35-cpu/protocol.h \ |
235 | src/hardware/conrad-digi-35-cpu/protocol.c \ | |
236 | src/hardware/conrad-digi-35-cpu/api.c | |
67bd8055 UH |
237 | endif |
238 | if HW_DEMO | |
239 | libsigrok_la_SOURCES += \ | |
155b680d | 240 | src/hardware/demo/demo.c |
67bd8055 | 241 | endif |
b5089195 JH |
242 | if HW_DEREE_DE5000 |
243 | libsigrok_la_SOURCES += \ | |
244 | src/hardware/deree-de5000/api.c | |
245 | endif | |
67bd8055 UH |
246 | if HW_FLUKE_DMM |
247 | libsigrok_la_SOURCES += \ | |
155b680d BV |
248 | src/hardware/fluke-dmm/fluke-dmm.h \ |
249 | src/hardware/fluke-dmm/fluke.c \ | |
250 | src/hardware/fluke-dmm/api.c | |
67bd8055 UH |
251 | endif |
252 | if HW_FX2LAFW | |
253 | libsigrok_la_SOURCES += \ | |
155b680d BV |
254 | src/hardware/fx2lafw/protocol.h \ |
255 | src/hardware/fx2lafw/protocol.c \ | |
a7d7f93c | 256 | src/hardware/fx2lafw/api.c \ |
b9d53092 BV |
257 | src/hardware/fx2lafw/dslogic.c \ |
258 | src/hardware/fx2lafw/dslogic.h | |
67bd8055 UH |
259 | endif |
260 | if HW_GMC_MH_1X_2X | |
261 | libsigrok_la_SOURCES += \ | |
155b680d BV |
262 | src/hardware/gmc-mh-1x-2x/protocol.h \ |
263 | src/hardware/gmc-mh-1x-2x/protocol.c \ | |
264 | src/hardware/gmc-mh-1x-2x/api.c | |
67bd8055 | 265 | endif |
7c198f96 ML |
266 | if HW_GWINSTEK_GDS_800 |
267 | libsigrok_la_SOURCES += \ | |
268 | src/hardware/gwinstek-gds-800/protocol.h \ | |
269 | src/hardware/gwinstek-gds-800/protocol.c \ | |
270 | src/hardware/gwinstek-gds-800/api.c | |
271 | endif | |
67bd8055 UH |
272 | if HW_HAMEG_HMO |
273 | libsigrok_la_SOURCES += \ | |
155b680d BV |
274 | src/hardware/hameg-hmo/protocol.h \ |
275 | src/hardware/hameg-hmo/protocol.c \ | |
276 | src/hardware/hameg-hmo/api.c | |
67bd8055 UH |
277 | endif |
278 | if HW_HANTEK_DSO | |
279 | libsigrok_la_SOURCES += \ | |
155b680d BV |
280 | src/hardware/hantek-dso/dso.h \ |
281 | src/hardware/hantek-dso/dso.c \ | |
282 | src/hardware/hantek-dso/api.c | |
67bd8055 | 283 | endif |
05ac4a98 DG |
284 | if HW_HUNG_CHANG_DSO_2100 |
285 | libsigrok_la_SOURCES += \ | |
286 | src/hardware/hung-chang-dso-2100/protocol.h \ | |
287 | src/hardware/hung-chang-dso-2100/protocol.c \ | |
288 | src/hardware/hung-chang-dso-2100/api.c | |
289 | endif | |
67bd8055 UH |
290 | if HW_IKALOGIC_SCANALOGIC2 |
291 | libsigrok_la_SOURCES += \ | |
155b680d BV |
292 | src/hardware/ikalogic-scanalogic2/protocol.h \ |
293 | src/hardware/ikalogic-scanalogic2/protocol.c \ | |
294 | src/hardware/ikalogic-scanalogic2/api.c | |
67bd8055 UH |
295 | endif |
296 | if HW_IKALOGIC_SCANAPLUS | |
297 | libsigrok_la_SOURCES += \ | |
155b680d BV |
298 | src/hardware/ikalogic-scanaplus/protocol.h \ |
299 | src/hardware/ikalogic-scanaplus/protocol.c \ | |
300 | src/hardware/ikalogic-scanaplus/api.c | |
67bd8055 UH |
301 | endif |
302 | if HW_KECHENG_KC_330B | |
303 | libsigrok_la_SOURCES += \ | |
155b680d BV |
304 | src/hardware/kecheng-kc-330b/protocol.h \ |
305 | src/hardware/kecheng-kc-330b/protocol.c \ | |
306 | src/hardware/kecheng-kc-330b/api.c | |
67bd8055 | 307 | endif |
9380ec2f UH |
308 | if HW_KERN_SCALE |
309 | libsigrok_la_SOURCES += \ | |
310 | src/hardware/kern-scale/protocol.h \ | |
311 | src/hardware/kern-scale/protocol.c \ | |
312 | src/hardware/kern-scale/api.c | |
313 | endif | |
67bd8055 UH |
314 | if HW_LASCAR_EL_USB |
315 | libsigrok_la_SOURCES += \ | |
155b680d BV |
316 | src/hardware/lascar-el-usb/protocol.h \ |
317 | src/hardware/lascar-el-usb/protocol.c \ | |
318 | src/hardware/lascar-el-usb/api.c | |
67bd8055 | 319 | endif |
8f4e922f UH |
320 | if HW_MANSON_HCS_3XXX |
321 | libsigrok_la_SOURCES += \ | |
155b680d BV |
322 | src/hardware/manson-hcs-3xxx/protocol.h \ |
323 | src/hardware/manson-hcs-3xxx/protocol.c \ | |
324 | src/hardware/manson-hcs-3xxx/api.c | |
8f4e922f | 325 | endif |
e1ccfb19 AJ |
326 | if HW_MAYNUO_M97 |
327 | libsigrok_la_SOURCES += \ | |
328 | src/hardware/maynuo-m97/protocol.h \ | |
329 | src/hardware/maynuo-m97/protocol.c \ | |
330 | src/hardware/maynuo-m97/api.c | |
331 | endif | |
67bd8055 UH |
332 | if HW_MIC_985XX |
333 | libsigrok_la_SOURCES += \ | |
155b680d BV |
334 | src/hardware/mic-985xx/protocol.h \ |
335 | src/hardware/mic-985xx/protocol.c \ | |
336 | src/hardware/mic-985xx/api.c | |
67bd8055 | 337 | endif |
41b7bd01 MH |
338 | if HW_MOTECH_LPS_30X |
339 | libsigrok_la_SOURCES += \ | |
155b680d BV |
340 | src/hardware/motech-lps-30x/protocol.h \ |
341 | src/hardware/motech-lps-30x/protocol.c \ | |
342 | src/hardware/motech-lps-30x/api.c | |
41b7bd01 | 343 | endif |
67bd8055 UH |
344 | if HW_NORMA_DMM |
345 | libsigrok_la_SOURCES += \ | |
155b680d BV |
346 | src/hardware/norma-dmm/protocol.h \ |
347 | src/hardware/norma-dmm/protocol.c \ | |
348 | src/hardware/norma-dmm/api.c | |
67bd8055 | 349 | endif |
d4b38748 | 350 | if HW_OPENBENCH_LOGIC_SNIFFER |
67bd8055 | 351 | libsigrok_la_SOURCES += \ |
155b680d BV |
352 | src/hardware/openbench-logic-sniffer/protocol.h \ |
353 | src/hardware/openbench-logic-sniffer/protocol.c \ | |
354 | src/hardware/openbench-logic-sniffer/api.c | |
67bd8055 | 355 | endif |
4bd80e12 | 356 | if HW_PIPISTRELLO_OLS |
357 | libsigrok_la_SOURCES += \ | |
358 | src/hardware/pipistrello-ols/protocol.h \ | |
359 | src/hardware/pipistrello-ols/protocol.c \ | |
360 | src/hardware/pipistrello-ols/api.c | |
361 | endif | |
67bd8055 UH |
362 | if HW_RIGOL_DS |
363 | libsigrok_la_SOURCES += \ | |
155b680d BV |
364 | src/hardware/rigol-ds/protocol.h \ |
365 | src/hardware/rigol-ds/protocol.c \ | |
366 | src/hardware/rigol-ds/api.c | |
67bd8055 UH |
367 | endif |
368 | if HW_SALEAE_LOGIC16 | |
369 | libsigrok_la_SOURCES += \ | |
155b680d BV |
370 | src/hardware/saleae-logic16/protocol.h \ |
371 | src/hardware/saleae-logic16/protocol.c \ | |
372 | src/hardware/saleae-logic16/api.c | |
67bd8055 | 373 | endif |
ca1a7cb5 BV |
374 | if HW_SCPI_PPS |
375 | libsigrok_la_SOURCES += \ | |
376 | src/hardware/scpi-pps/protocol.h \ | |
377 | src/hardware/scpi-pps/protocol.c \ | |
d4eabea8 | 378 | src/hardware/scpi-pps/profiles.c \ |
ca1a7cb5 BV |
379 | src/hardware/scpi-pps/api.c |
380 | endif | |
67bd8055 UH |
381 | if HW_SERIAL_DMM |
382 | libsigrok_la_SOURCES += \ | |
155b680d BV |
383 | src/hardware/serial-dmm/protocol.h \ |
384 | src/hardware/serial-dmm/protocol.c \ | |
385 | src/hardware/serial-dmm/api.c | |
67bd8055 UH |
386 | endif |
387 | if HW_SYSCLK_LWLA | |
388 | libsigrok_la_SOURCES += \ | |
155b680d BV |
389 | src/hardware/sysclk-lwla/lwla.h \ |
390 | src/hardware/sysclk-lwla/lwla.c \ | |
391 | src/hardware/sysclk-lwla/protocol.h \ | |
392 | src/hardware/sysclk-lwla/protocol.c \ | |
393 | src/hardware/sysclk-lwla/api.c | |
67bd8055 UH |
394 | endif |
395 | if HW_TELEINFO | |
396 | libsigrok_la_SOURCES += \ | |
155b680d BV |
397 | src/hardware/teleinfo/protocol.h \ |
398 | src/hardware/teleinfo/protocol.c \ | |
399 | src/hardware/teleinfo/api.c | |
67bd8055 | 400 | endif |
0acdd793 BV |
401 | if HW_TESTO |
402 | libsigrok_la_SOURCES += \ | |
155b680d BV |
403 | src/hardware/testo/protocol.h \ |
404 | src/hardware/testo/protocol.c \ | |
405 | src/hardware/testo/api.c | |
0acdd793 | 406 | endif |
67bd8055 UH |
407 | if HW_TONDAJ_SL_814 |
408 | libsigrok_la_SOURCES += \ | |
155b680d BV |
409 | src/hardware/tondaj-sl-814/protocol.h \ |
410 | src/hardware/tondaj-sl-814/protocol.c \ | |
411 | src/hardware/tondaj-sl-814/api.c | |
67bd8055 UH |
412 | endif |
413 | if HW_UNI_T_DMM | |
414 | libsigrok_la_SOURCES += \ | |
155b680d BV |
415 | src/hardware/uni-t-dmm/protocol.h \ |
416 | src/hardware/uni-t-dmm/protocol.c \ | |
417 | src/hardware/uni-t-dmm/api.c | |
67bd8055 UH |
418 | endif |
419 | if HW_UNI_T_UT32X | |
420 | libsigrok_la_SOURCES += \ | |
155b680d BV |
421 | src/hardware/uni-t-ut32x/protocol.h \ |
422 | src/hardware/uni-t-ut32x/protocol.c \ | |
423 | src/hardware/uni-t-ut32x/api.c | |
67bd8055 UH |
424 | endif |
425 | if HW_VICTOR_DMM | |
426 | libsigrok_la_SOURCES += \ | |
155b680d BV |
427 | src/hardware/victor-dmm/protocol.h \ |
428 | src/hardware/victor-dmm/protocol.c \ | |
429 | src/hardware/victor-dmm/api.c | |
67bd8055 | 430 | endif |
10763937 SA |
431 | if HW_YOKOGAWA_DLM |
432 | libsigrok_la_SOURCES += \ | |
433 | src/hardware/yokogawa-dlm/protocol.h \ | |
434 | src/hardware/yokogawa-dlm/protocol.c \ | |
435 | src/hardware/yokogawa-dlm/protocol_wrappers.h \ | |
436 | src/hardware/yokogawa-dlm/protocol_wrappers.c \ | |
437 | src/hardware/yokogawa-dlm/api.c | |
438 | endif | |
67bd8055 UH |
439 | if HW_ZEROPLUS_LOGIC_CUBE |
440 | libsigrok_la_SOURCES += \ | |
155b680d BV |
441 | src/hardware/zeroplus-logic-cube/analyzer.c \ |
442 | src/hardware/zeroplus-logic-cube/analyzer.h \ | |
443 | src/hardware/zeroplus-logic-cube/gl_usb.h \ | |
444 | src/hardware/zeroplus-logic-cube/gl_usb.c \ | |
445 | src/hardware/zeroplus-logic-cube/protocol.h \ | |
446 | src/hardware/zeroplus-logic-cube/protocol.c \ | |
447 | src/hardware/zeroplus-logic-cube/api.c | |
67bd8055 UH |
448 | endif |
449 | ||
bc8ff24d | 450 | libsigrok_la_LIBADD = $(SR_EXTRA_LIBS) $(LIBSIGROK_LIBS) |
1f61c22f | 451 | libsigrok_la_LDFLAGS = -version-info $(SR_LIB_VERSION) -no-undefined |
ff101fca | 452 | |
45c59c8b | 453 | library_includedir = $(includedir)/libsigrok |
63d0fb75 ML |
454 | library_include_HEADERS = \ |
455 | include/libsigrok/libsigrok.h \ | |
122322a9 DE |
456 | include/libsigrok/proto.h |
457 | nodist_library_include_HEADERS = \ | |
63d0fb75 | 458 | include/libsigrok/version.h |
155b680d | 459 | noinst_HEADERS = src/libsigrok-internal.h |
a1bb33af | 460 | |
8a7b47cd UH |
461 | pkgconfigdir = $(libdir)/pkgconfig |
462 | pkgconfig_DATA = libsigrok.pc | |
d658e348 | 463 | |
67bd8055 UH |
464 | EXTRA_DIST = \ |
465 | Doxyfile \ | |
466 | HACKING \ | |
467 | README.devices \ | |
31ac7735 DE |
468 | bindings/cxx/ConfigKey_methods.cpp \ |
469 | bindings/cxx/ConfigKey_methods.hpp \ | |
470 | bindings/cxx/ConfigKey_methods.i \ | |
471 | bindings/cxx/Doxyfile \ | |
472 | bindings/cxx/QuantityFlag_methods.cpp \ | |
473 | bindings/cxx/QuantityFlag_methods.hpp \ | |
474 | bindings/cxx/enums.py \ | |
475 | bindings/python/Doxyfile \ | |
476 | bindings/python/setup.py \ | |
477 | bindings/python/sigrok/__init__.py \ | |
478 | bindings/python/sigrok/core/__init__.py \ | |
479 | bindings/python/sigrok/core/classes.i \ | |
480 | bindings/java/Doxyfile \ | |
481 | bindings/java/org/sigrok/core/classes/classes.i \ | |
482 | bindings/java/org/sigrok/core/interfaces/DatafeedCallback.java \ | |
483 | bindings/java/org/sigrok/core/interfaces/LogCallback.java \ | |
484 | bindings/java/org/sigrok/core/interfaces/SourceCallback.java \ | |
485 | bindings/swig/classes.i \ | |
486 | bindings/swig/doc.py \ | |
67bd8055 UH |
487 | contrib/gnuplot_chronovu_la8.gpi \ |
488 | contrib/gnuplot_rigol_ds1xx2.gpi \ | |
489 | contrib/gnuplot_usbeesx.gpi \ | |
490 | contrib/gnuplot_usbeedx8.gpi \ | |
491 | contrib/gnuplot_usbeedx16.gpi \ | |
492 | contrib/sigrok-logo-notext.png \ | |
493 | contrib/z60_libsigrok.rules | |
494 | ||
495 | if HAVE_CHECK | |
02a2bf68 | 496 | TESTS = tests/main |
67bd8055 | 497 | check_PROGRAMS = ${TESTS} |
65489c1a | 498 | endif |
67bd8055 | 499 | |
02a2bf68 | 500 | tests_main_SOURCES = \ |
6592c369 | 501 | include/libsigrok/libsigrok.h \ |
67bd8055 UH |
502 | tests/lib.c \ |
503 | tests/lib.h \ | |
02a2bf68 UH |
504 | tests/main.c \ |
505 | tests/core.c \ | |
506 | tests/input_all.c \ | |
507 | tests/input_binary.c \ | |
508 | tests/output_all.c \ | |
509 | tests/transform_all.c \ | |
510 | tests/session.c \ | |
511 | tests/strutil.c \ | |
512 | tests/version.c \ | |
513 | tests/driver_all.c \ | |
514 | tests/device.c \ | |
515 | tests/trigger.c | |
516 | ||
65489c1a | 517 | tests_main_LDADD = libsigrok.la $(SR_EXTRA_LIBS) $(TESTS_LIBS) |
dd8b5f56 | 518 | |
580ed400 ML |
519 | BUILD_EXTRA = |
520 | INSTALL_EXTRA = | |
521 | CLEAN_EXTRA = | |
522 | ||
c23c8659 ML |
523 | if BINDINGS_CXX |
524 | ||
52ff4f6a | 525 | lib_LTLIBRARIES += bindings/cxx/libsigrokcxx.la |
c23c8659 | 526 | |
52ff4f6a | 527 | bindings_cxx_libsigrokcxx_la_SOURCES = bindings/cxx/classes.cpp |
c23c8659 | 528 | |
bc8ff24d | 529 | bindings_cxx_libsigrokcxx_la_LIBADD = libsigrok.la $(SR_EXTRA_LIBS) $(LIBSIGROKCXX_LIBS) |
1f61c22f | 530 | bindings_cxx_libsigrokcxx_la_LDFLAGS = -version-info $(SR_LIB_VERSION) -no-undefined |
fc8f82e9 | 531 | |
0959ed3d UH |
532 | bindings_cxx_libsigrokcxx_la_includedir = $(includedir)/libsigrokcxx |
533 | bindings_cxx_libsigrokcxx_la_include_HEADERS = \ | |
122322a9 DE |
534 | bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp |
535 | nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS = \ | |
161dc24d | 536 | bindings/cxx/include/libsigrokcxx/enums.hpp |
c23c8659 | 537 | |
52ff4f6a | 538 | pkgconfig_DATA += bindings/cxx/libsigrokcxx.pc |
c23c8659 | 539 | |
3532ed01 | 540 | doxy/xml/index.xml: include/libsigrok/libsigrok.h |
7f82ec4d | 541 | $(AM_V_GEN)cd $(srcdir) && BUILDDIR=$(abs_builddir)/ doxygen Doxyfile 2>/dev/null |
580ed400 | 542 | |
cf5b338e | 543 | bindings/swig/enums.i: bindings/cxx/enums.timestamp |
580ed400 | 544 | bindings/cxx/enums.cpp: bindings/cxx/enums.timestamp |
161dc24d | 545 | bindings/cxx/include/libsigrokcxx/enums.hpp: bindings/cxx/enums.timestamp |
c23c8659 | 546 | |
b595a458 | 547 | bindings/cxx/enums.timestamp: $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml \ |
c23c8659 | 548 | bindings/cxx/ConfigKey_methods.cpp bindings/cxx/QuantityFlag_methods.cpp |
b595a458 | 549 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml |
f2a189f0 | 550 | $(AM_V_at)touch $@ |
c23c8659 | 551 | |
580ed400 | 552 | bindings/cxx/classes.lo: bindings/cxx/classes.cpp bindings/cxx/enums.cpp \ |
cf5b338e | 553 | $(library_include_HEADERS) $(nodist_library_include_HEADERS) |
c23c8659 | 554 | |
580ed400 | 555 | cxx-clean: |
3532ed01 | 556 | rm -rf doxy/ |
bd4fda24 | 557 | rm -rf bindings/cxx/doxy/ |
580ed400 | 558 | rm -f bindings/cxx/enums.cpp |
161dc24d | 559 | rm -f bindings/cxx/include/libsigrokcxx/enums.hpp |
580ed400 | 560 | rm -f bindings/cxx/enums.timestamp |
c23c8659 | 561 | |
580ed400 ML |
562 | CLEAN_EXTRA += cxx-clean |
563 | ||
564 | endif | |
f7740954 | 565 | |
bd4fda24 ML |
566 | CPPXMLDOC = bindings/cxx/doxy/xml/index.xml |
567 | ||
161dc24d | 568 | $(CPPXMLDOC): bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp \ |
bd4fda24 | 569 | bindings/cxx/enums.timestamp |
33c84e81 | 570 | $(AM_V_GEN)cd $(srcdir)/bindings/cxx && BUILDDIR=$(abs_builddir)/bindings/cxx/ doxygen Doxyfile 2>/dev/null |
bd4fda24 | 571 | |
f7740954 ML |
572 | if BINDINGS_PYTHON |
573 | ||
d1785122 | 574 | PDIR = bindings/python |
bd4fda24 ML |
575 | PDOC = bindings/python/sigrok/core/doc.i |
576 | ||
c05a0ba5 DE |
577 | setup_vars = VERSION='$(PACKAGE_VERSION)' CC='$(CXX)' CFLAGS='$(AM_CXXFLAGS) $(CXXFLAGS)' LDADD='$(PYSIGROK_LIBS)' |
578 | setup_quiet = --quiet | |
579 | setup_py = $(PYTHON) $(srcdir)/$(PDIR)/setup.py $(setup_vars) $(setup_quiet) | |
a9cb82ac | 580 | |
dbde3b65 | 581 | $(PDOC): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC) |
f3256bb7 | 582 | $(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core |
dbde3b65 | 583 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py python $(CPPXMLDOC) > $@ |
d1785122 ML |
584 | |
585 | python-build: $(PDIR)/timestamp | |
586 | ||
fd31865e | 587 | $(PDIR)/timestamp: $(PDIR)/sigrok/core/classes.i \ |
cf5b338e | 588 | bindings/swig/classes.i bindings/swig/enums.i $(PDOC) \ |
fd31865e ML |
589 | $(library_include_HEADERS) $(nodist_library_include_HEADERS) \ |
590 | $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \ | |
591 | $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) \ | |
ba3070ff | 592 | @ORDER@ bindings/cxx/libsigrokcxx.la |
a9cb82ac DE |
593 | $(AM_V_at)$(setup_py) clean --all 2>/dev/null |
594 | $(AM_V_GEN)$(setup_py) build_ext --swig "$(SWIG)" build_py | |
595 | $(AM_V_at): >$@ | |
f7740954 | 596 | |
a9cb82ac DE |
597 | python-install: |
598 | $(AM_V_at)$(MKDIR_P) "$(DESTDIR)$(prefix)" "$(DESTDIR)$(exec_prefix)" | |
452986be DE |
599 | destdir='$(DESTDIR)'; $(setup_py) install $${destdir:+"--root=$$destdir"} \ |
600 | --prefix "$(prefix)" --exec-prefix "$(exec_prefix)" | |
f7740954 | 601 | |
c26162ff | 602 | python-clean: |
a9cb82ac DE |
603 | -$(AM_V_at)rm -f $(PDIR)/timestamp |
604 | -$(AM_V_at)rm -fr $(PDIR)/doxy | |
c05a0ba5 | 605 | -$(AM_V_at)$(setup_py) clean --all 2>/dev/null |
6a8c1d68 ML |
606 | |
607 | python-doc: | |
a9cb82ac | 608 | $(AM_V_at)cd $(srcdir)/$(PDIR) && BUILDDIR="$(abs_builddir)/$(PDIR)/" doxygen Doxyfile 2>/dev/null |
f7740954 ML |
609 | |
610 | BUILD_EXTRA += python-build | |
611 | INSTALL_EXTRA += python-install | |
612 | CLEAN_EXTRA += python-clean | |
613 | ||
614 | endif | |
615 | ||
9fcf4d0b ML |
616 | if BINDINGS_JAVA |
617 | ||
618 | JDIR = bindings/java | |
90bd7656 ML |
619 | JPKG = org/sigrok/core |
620 | JCLS = $(JDIR)/$(JPKG)/classes | |
621 | JINT = $(JDIR)/$(JPKG)/interfaces | |
33c84e81 | 622 | JSRC = $(JCLS)/*.java $(srcdir)/$(JINT)/*.java |
90bd7656 | 623 | JSWG = $(JCLS)/classes.i |
bd4fda24 | 624 | JDOC = $(JCLS)/doc.i |
90bd7656 | 625 | JCXX = $(JCLS)/classes_wrap.cxx |
9fcf4d0b ML |
626 | JLIB = $(JDIR)/libsigrok_java_core_classes.so |
627 | JJAR = $(JDIR)/sigrok-core.jar | |
628 | ||
a9cb82ac DE |
629 | java_cleanfiles = $(JCXX) $(JCLS)/*.java $(JCLS)/*.class $(JINT)/*.class $(JJAR) $(JLIB) |
630 | ||
9fcf4d0b ML |
631 | java-build: $(JJAR) $(JLIB) |
632 | ||
dbde3b65 | 633 | $(JDOC): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC) |
f3256bb7 | 634 | $(AM_V_at)test -d $(JCLS) || $(MKDIR_P) $(JCLS) |
dbde3b65 | 635 | $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py java $(CPPXMLDOC) > $@ |
bd4fda24 | 636 | |
dbde3b65 | 637 | $(JCXX): $(srcdir)/$(JSWG) $(JDOC) bindings/swig/classes.i bindings/swig/enums.i \ |
fd31865e ML |
638 | $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \ |
639 | $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) | |
a9cb82ac | 640 | -$(AM_V_at)rm -f $(java_cleanfiles) |
3f03ffaf | 641 | $(AM_V_GEN)$(SWIG) -c++ -java -package org.sigrok.core.classes \ |
dbde3b65 DE |
642 | -Ibindings -I$(JCLS) $(local_includes) -I$(srcdir) $(JNI_CPPFLAGS) \ |
643 | -outdir $(JCLS) -o $@ $(srcdir)/$(JSWG) | |
9fcf4d0b | 644 | |
90bd7656 | 645 | $(JJAR): $(JCXX) |
1f61c22f | 646 | $(AM_V_GEN)$(JAVAC) -d $(JDIR) $(JSRC) |
f2a189f0 | 647 | $(AM_V_at)jar cf $(JJAR) -C $(JDIR) $(JPKG) |
9fcf4d0b | 648 | |
fd31865e ML |
649 | $(JLIB): $(JCXX) \ |
650 | $(library_include_HEADERS) $(nodist_library_include_HEADERS) \ | |
651 | $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \ | |
652 | $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) \ | |
ba3070ff | 653 | @ORDER@ bindings/cxx/libsigrokcxx.la |
1f61c22f | 654 | $(AM_V_GEN)$(CXXCOMPILE) $(JNI_CPPFLAGS) -L.libs -Lbindings/cxx/.libs \ |
90bd7656 | 655 | -fno-strict-aliasing -fPIC -shared $(JCLS)/classes_wrap.cxx \ |
1f61c22f | 656 | -lsigrokcxx $(LIBSIGROKCXX_LIBS) -o $(JLIB) |
9fcf4d0b ML |
657 | |
658 | java-install: | |
df705a7a JP |
659 | $(INSTALL) -d $(DESTDIR)$(libdir)/jni |
660 | $(INSTALL) $(JLIB) -t $(DESTDIR)$(libdir)/jni | |
661 | $(INSTALL) -d $(DESTDIR)$(datadir)/java | |
662 | $(INSTALL) $(JJAR) -t $(DESTDIR)$(datadir)/java | |
9fcf4d0b ML |
663 | |
664 | java-clean: | |
a9cb82ac DE |
665 | -$(AM_V_at)rm -f $(java_cleanfiles) |
666 | -$(AM_V_at)rm -fr $(JDIR)/doxy | |
8a314e90 ML |
667 | |
668 | java-doc: | |
a9cb82ac | 669 | $(AM_V_at)cd $(srcdir)/$(JDIR) && BUILDDIR="$(abs_builddir)/$(JDIR)/" doxygen Doxyfile |
9fcf4d0b ML |
670 | |
671 | BUILD_EXTRA += java-build | |
672 | INSTALL_EXTRA += java-install | |
673 | CLEAN_EXTRA += java-clean | |
674 | ||
675 | endif | |
676 | ||
f7740954 ML |
677 | all-local: $(BUILD_EXTRA) |
678 | install-exec-local: $(INSTALL_EXTRA) | |
d1785122 | 679 | clean-local: $(CLEAN_EXTRA) |
f7740954 | 680 | |
c0958408 | 681 | MAINTAINERCLEANFILES = ChangeLog |
0fc12d66 UH |
682 | |
683 | .PHONY: ChangeLog | |
684 | ChangeLog: | |
3182d4eb | 685 | git --git-dir '$(top_srcdir)/.git' log >$@ || touch $@ |
0fc12d66 UH |
686 | |
687 | dist-hook: ChangeLog | |
688 |