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