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