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