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