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