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