]>
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 | |
155b680d | 23 | AM_CPPFLAGS = -Isrc -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 \ | |
38 | src/strutil.c \ | |
39 | src/log.c \ | |
40 | src/version.c \ | |
41 | src/error.c \ | |
42 | src/std.c | |
960a75e4 | 43 | |
155b680d BV |
44 | # Input modules |
45 | libsigrok_la_SOURCES += \ | |
46 | src/input/binary.c \ | |
47 | src/input/chronovu_la8.c \ | |
48 | src/input/csv.c \ | |
49 | src/input/input.c \ | |
50 | src/input/vcd.c \ | |
51 | src/input/wav.c | |
67bd8055 | 52 | |
155b680d BV |
53 | # Output modules |
54 | libsigrok_la_SOURCES += \ | |
55 | src/output/output.c \ | |
56 | src/output/analog.c \ | |
57 | src/output/ascii.c \ | |
58 | src/output/bits.c \ | |
59 | src/output/binary.c \ | |
60 | src/output/csv.c \ | |
61 | src/output/chronovu_la8.c \ | |
afaa75b9 | 62 | src/output/wav.c \ |
155b680d BV |
63 | src/output/gnuplot.c \ |
64 | src/output/hex.c \ | |
65 | src/output/ols.c \ | |
66 | src/output/vcd.c | |
67bd8055 | 67 | |
155b680d | 68 | # SCPI support |
67bd8055 | 69 | libsigrok_la_SOURCES += \ |
155b680d BV |
70 | src/scpi/scpi.c \ |
71 | src/scpi/scpi_tcp.c | |
67bd8055 UH |
72 | if NEED_RPC |
73 | libsigrok_la_SOURCES += \ | |
155b680d BV |
74 | src/scpi/scpi_vxi.c \ |
75 | src/scpi/vxi_clnt.c \ | |
76 | src/scpi/vxi_xdr.c \ | |
77 | src/scpi/vxi.h | |
67bd8055 UH |
78 | endif |
79 | if NEED_SERIAL | |
80 | libsigrok_la_SOURCES += \ | |
155b680d BV |
81 | src/serial.c \ |
82 | src/scpi/scpi_serial.c | |
67bd8055 UH |
83 | endif |
84 | if NEED_USB | |
85 | libsigrok_la_SOURCES += \ | |
155b680d BV |
86 | src/ezusb.c \ |
87 | src/usb.c \ | |
88 | src/scpi/scpi_usbtmc_libusb.c | |
67bd8055 UH |
89 | endif |
90 | if NEED_VISA | |
91 | libsigrok_la_SOURCES += \ | |
155b680d | 92 | src/scpi/scpi_visa.c |
67bd8055 UH |
93 | endif |
94 | ||
155b680d BV |
95 | # Hardware (DMM chip parsers) |
96 | libsigrok_la_SOURCES += \ | |
97 | src/dmm/es519xx.c \ | |
98 | src/dmm/fs9721.c \ | |
99 | src/dmm/fs9922.c \ | |
100 | src/dmm/m2110.c \ | |
101 | src/dmm/metex14.c \ | |
102 | src/dmm/rs9lcd.c | |
67bd8055 UH |
103 | |
104 | # Hardware drivers | |
105 | if HW_AGILENT_DMM | |
106 | libsigrok_la_SOURCES += \ | |
155b680d BV |
107 | src/hardware/agilent-dmm/api.c \ |
108 | src/hardware/agilent-dmm/agilent-dmm.h \ | |
109 | src/hardware/agilent-dmm/sched.c | |
67bd8055 | 110 | endif |
67bd8055 UH |
111 | if HW_APPA_55II |
112 | libsigrok_la_SOURCES += \ | |
155b680d BV |
113 | src/hardware/appa-55ii/protocol.h \ |
114 | src/hardware/appa-55ii/protocol.c \ | |
115 | src/hardware/appa-55ii/api.c | |
67bd8055 UH |
116 | endif |
117 | if HW_ASIX_SIGMA | |
118 | libsigrok_la_SOURCES += \ | |
155b680d BV |
119 | src/hardware/asix-sigma/asix-sigma.h \ |
120 | src/hardware/asix-sigma/asix-sigma.c | |
67bd8055 UH |
121 | endif |
122 | if HW_ATTEN_PPS3XXX | |
123 | libsigrok_la_SOURCES += \ | |
155b680d BV |
124 | src/hardware/atten-pps3xxx/protocol.h \ |
125 | src/hardware/atten-pps3xxx/protocol.c \ | |
126 | src/hardware/atten-pps3xxx/api.c | |
67bd8055 | 127 | endif |
bb993797 KA |
128 | if HW_BEAGLELOGIC |
129 | libsigrok_la_SOURCES += \ | |
3db4b08b | 130 | src/hardware/beaglelogic/beaglelogic.h \ |
155b680d BV |
131 | src/hardware/beaglelogic/protocol.h \ |
132 | src/hardware/beaglelogic/protocol.c \ | |
133 | src/hardware/beaglelogic/api.c | |
bb993797 | 134 | endif |
67bd8055 UH |
135 | if HW_BRYMEN_BM86X |
136 | libsigrok_la_SOURCES += \ | |
155b680d BV |
137 | src/hardware/brymen-bm86x/protocol.h \ |
138 | src/hardware/brymen-bm86x/protocol.c \ | |
139 | src/hardware/brymen-bm86x/api.c | |
67bd8055 UH |
140 | endif |
141 | if HW_BRYMEN_DMM | |
142 | libsigrok_la_SOURCES += \ | |
155b680d BV |
143 | src/hardware/brymen-dmm/parser.c \ |
144 | src/hardware/brymen-dmm/protocol.h \ | |
145 | src/hardware/brymen-dmm/protocol.c \ | |
146 | src/hardware/brymen-dmm/api.c | |
67bd8055 UH |
147 | endif |
148 | if HW_CEM_DT_885X | |
149 | libsigrok_la_SOURCES += \ | |
155b680d BV |
150 | src/hardware/cem-dt-885x/protocol.h \ |
151 | src/hardware/cem-dt-885x/protocol.c \ | |
152 | src/hardware/cem-dt-885x/api.c | |
67bd8055 UH |
153 | endif |
154 | if HW_CENTER_3XX | |
155 | libsigrok_la_SOURCES += \ | |
155b680d BV |
156 | src/hardware/center-3xx/protocol.h \ |
157 | src/hardware/center-3xx/protocol.c \ | |
158 | src/hardware/center-3xx/api.c | |
67bd8055 | 159 | endif |
7b356712 | 160 | if HW_CHRONOVU_LA |
67bd8055 | 161 | libsigrok_la_SOURCES += \ |
155b680d BV |
162 | src/hardware/chronovu-la/protocol.h \ |
163 | src/hardware/chronovu-la/protocol.c \ | |
164 | src/hardware/chronovu-la/api.c | |
67bd8055 UH |
165 | endif |
166 | if HW_COLEAD_SLM | |
167 | libsigrok_la_SOURCES += \ | |
155b680d BV |
168 | src/hardware/colead-slm/protocol.h \ |
169 | src/hardware/colead-slm/protocol.c \ | |
170 | src/hardware/colead-slm/api.c | |
67bd8055 UH |
171 | endif |
172 | if HW_CONRAD_DIGI_35_CPU | |
173 | libsigrok_la_SOURCES += \ | |
155b680d BV |
174 | src/hardware/conrad-digi-35-cpu/protocol.h \ |
175 | src/hardware/conrad-digi-35-cpu/protocol.c \ | |
176 | src/hardware/conrad-digi-35-cpu/api.c | |
67bd8055 UH |
177 | endif |
178 | if HW_DEMO | |
179 | libsigrok_la_SOURCES += \ | |
155b680d | 180 | src/hardware/demo/demo.c |
67bd8055 UH |
181 | endif |
182 | if HW_FLUKE_DMM | |
183 | libsigrok_la_SOURCES += \ | |
155b680d BV |
184 | src/hardware/fluke-dmm/fluke-dmm.h \ |
185 | src/hardware/fluke-dmm/fluke.c \ | |
186 | src/hardware/fluke-dmm/api.c | |
67bd8055 UH |
187 | endif |
188 | if HW_FX2LAFW | |
189 | libsigrok_la_SOURCES += \ | |
155b680d BV |
190 | src/hardware/fx2lafw/protocol.h \ |
191 | src/hardware/fx2lafw/protocol.c \ | |
192 | src/hardware/fx2lafw/api.c | |
67bd8055 UH |
193 | endif |
194 | if HW_GMC_MH_1X_2X | |
195 | libsigrok_la_SOURCES += \ | |
155b680d BV |
196 | src/hardware/gmc-mh-1x-2x/protocol.h \ |
197 | src/hardware/gmc-mh-1x-2x/protocol.c \ | |
198 | src/hardware/gmc-mh-1x-2x/api.c | |
67bd8055 UH |
199 | endif |
200 | if HW_HAMEG_HMO | |
201 | libsigrok_la_SOURCES += \ | |
155b680d BV |
202 | src/hardware/hameg-hmo/protocol.h \ |
203 | src/hardware/hameg-hmo/protocol.c \ | |
204 | src/hardware/hameg-hmo/api.c | |
67bd8055 UH |
205 | endif |
206 | if HW_HANTEK_DSO | |
207 | libsigrok_la_SOURCES += \ | |
155b680d BV |
208 | src/hardware/hantek-dso/dso.h \ |
209 | src/hardware/hantek-dso/dso.c \ | |
210 | src/hardware/hantek-dso/api.c | |
67bd8055 UH |
211 | endif |
212 | if HW_IKALOGIC_SCANALOGIC2 | |
213 | libsigrok_la_SOURCES += \ | |
155b680d BV |
214 | src/hardware/ikalogic-scanalogic2/protocol.h \ |
215 | src/hardware/ikalogic-scanalogic2/protocol.c \ | |
216 | src/hardware/ikalogic-scanalogic2/api.c | |
67bd8055 UH |
217 | endif |
218 | if HW_IKALOGIC_SCANAPLUS | |
219 | libsigrok_la_SOURCES += \ | |
155b680d BV |
220 | src/hardware/ikalogic-scanaplus/protocol.h \ |
221 | src/hardware/ikalogic-scanaplus/protocol.c \ | |
222 | src/hardware/ikalogic-scanaplus/api.c | |
67bd8055 UH |
223 | endif |
224 | if HW_KECHENG_KC_330B | |
225 | libsigrok_la_SOURCES += \ | |
155b680d BV |
226 | src/hardware/kecheng-kc-330b/protocol.h \ |
227 | src/hardware/kecheng-kc-330b/protocol.c \ | |
228 | src/hardware/kecheng-kc-330b/api.c | |
67bd8055 UH |
229 | endif |
230 | if HW_LASCAR_EL_USB | |
231 | libsigrok_la_SOURCES += \ | |
155b680d BV |
232 | src/hardware/lascar-el-usb/protocol.h \ |
233 | src/hardware/lascar-el-usb/protocol.c \ | |
234 | src/hardware/lascar-el-usb/api.c | |
67bd8055 | 235 | endif |
8f4e922f UH |
236 | if HW_MANSON_HCS_3XXX |
237 | libsigrok_la_SOURCES += \ | |
155b680d BV |
238 | src/hardware/manson-hcs-3xxx/protocol.h \ |
239 | src/hardware/manson-hcs-3xxx/protocol.c \ | |
240 | src/hardware/manson-hcs-3xxx/api.c | |
8f4e922f | 241 | endif |
67bd8055 UH |
242 | if HW_MIC_985XX |
243 | libsigrok_la_SOURCES += \ | |
155b680d BV |
244 | src/hardware/mic-985xx/protocol.h \ |
245 | src/hardware/mic-985xx/protocol.c \ | |
246 | src/hardware/mic-985xx/api.c | |
67bd8055 | 247 | endif |
41b7bd01 MH |
248 | if HW_MOTECH_LPS_30X |
249 | libsigrok_la_SOURCES += \ | |
155b680d BV |
250 | src/hardware/motech-lps-30x/protocol.h \ |
251 | src/hardware/motech-lps-30x/protocol.c \ | |
252 | src/hardware/motech-lps-30x/api.c | |
41b7bd01 | 253 | endif |
67bd8055 UH |
254 | if HW_NORMA_DMM |
255 | libsigrok_la_SOURCES += \ | |
155b680d BV |
256 | src/hardware/norma-dmm/protocol.h \ |
257 | src/hardware/norma-dmm/protocol.c \ | |
258 | src/hardware/norma-dmm/api.c | |
67bd8055 | 259 | endif |
d4b38748 | 260 | if HW_OPENBENCH_LOGIC_SNIFFER |
67bd8055 | 261 | libsigrok_la_SOURCES += \ |
155b680d BV |
262 | src/hardware/openbench-logic-sniffer/protocol.h \ |
263 | src/hardware/openbench-logic-sniffer/protocol.c \ | |
264 | src/hardware/openbench-logic-sniffer/api.c | |
67bd8055 UH |
265 | endif |
266 | if HW_RIGOL_DS | |
267 | libsigrok_la_SOURCES += \ | |
155b680d BV |
268 | src/hardware/rigol-ds/protocol.h \ |
269 | src/hardware/rigol-ds/protocol.c \ | |
270 | src/hardware/rigol-ds/api.c | |
67bd8055 UH |
271 | endif |
272 | if HW_SALEAE_LOGIC16 | |
273 | libsigrok_la_SOURCES += \ | |
155b680d BV |
274 | src/hardware/saleae-logic16/protocol.h \ |
275 | src/hardware/saleae-logic16/protocol.c \ | |
276 | src/hardware/saleae-logic16/api.c | |
67bd8055 UH |
277 | endif |
278 | if HW_SERIAL_DMM | |
279 | libsigrok_la_SOURCES += \ | |
155b680d BV |
280 | src/hardware/serial-dmm/protocol.h \ |
281 | src/hardware/serial-dmm/protocol.c \ | |
282 | src/hardware/serial-dmm/api.c | |
67bd8055 UH |
283 | endif |
284 | if HW_SYSCLK_LWLA | |
285 | libsigrok_la_SOURCES += \ | |
155b680d BV |
286 | src/hardware/sysclk-lwla/lwla.h \ |
287 | src/hardware/sysclk-lwla/lwla.c \ | |
288 | src/hardware/sysclk-lwla/protocol.h \ | |
289 | src/hardware/sysclk-lwla/protocol.c \ | |
290 | src/hardware/sysclk-lwla/api.c | |
67bd8055 UH |
291 | endif |
292 | if HW_TELEINFO | |
293 | libsigrok_la_SOURCES += \ | |
155b680d BV |
294 | src/hardware/teleinfo/protocol.h \ |
295 | src/hardware/teleinfo/protocol.c \ | |
296 | src/hardware/teleinfo/api.c | |
67bd8055 | 297 | endif |
0acdd793 BV |
298 | if HW_TESTO |
299 | libsigrok_la_SOURCES += \ | |
155b680d BV |
300 | src/hardware/testo/protocol.h \ |
301 | src/hardware/testo/protocol.c \ | |
302 | src/hardware/testo/api.c | |
0acdd793 | 303 | endif |
67bd8055 UH |
304 | if HW_TONDAJ_SL_814 |
305 | libsigrok_la_SOURCES += \ | |
155b680d BV |
306 | src/hardware/tondaj-sl-814/protocol.h \ |
307 | src/hardware/tondaj-sl-814/protocol.c \ | |
308 | src/hardware/tondaj-sl-814/api.c | |
67bd8055 UH |
309 | endif |
310 | if HW_UNI_T_DMM | |
311 | libsigrok_la_SOURCES += \ | |
155b680d BV |
312 | src/hardware/uni-t-dmm/protocol.h \ |
313 | src/hardware/uni-t-dmm/protocol.c \ | |
314 | src/hardware/uni-t-dmm/api.c | |
67bd8055 UH |
315 | endif |
316 | if HW_UNI_T_UT32X | |
317 | libsigrok_la_SOURCES += \ | |
155b680d BV |
318 | src/hardware/uni-t-ut32x/protocol.h \ |
319 | src/hardware/uni-t-ut32x/protocol.c \ | |
320 | src/hardware/uni-t-ut32x/api.c | |
67bd8055 UH |
321 | endif |
322 | if HW_VICTOR_DMM | |
323 | libsigrok_la_SOURCES += \ | |
155b680d BV |
324 | src/hardware/victor-dmm/protocol.h \ |
325 | src/hardware/victor-dmm/protocol.c \ | |
326 | src/hardware/victor-dmm/api.c | |
67bd8055 UH |
327 | endif |
328 | if HW_ZEROPLUS_LOGIC_CUBE | |
329 | libsigrok_la_SOURCES += \ | |
155b680d BV |
330 | src/hardware/zeroplus-logic-cube/analyzer.c \ |
331 | src/hardware/zeroplus-logic-cube/analyzer.h \ | |
332 | src/hardware/zeroplus-logic-cube/gl_usb.h \ | |
333 | src/hardware/zeroplus-logic-cube/gl_usb.c \ | |
334 | src/hardware/zeroplus-logic-cube/protocol.h \ | |
335 | src/hardware/zeroplus-logic-cube/protocol.c \ | |
336 | src/hardware/zeroplus-logic-cube/api.c | |
67bd8055 UH |
337 | endif |
338 | ||
339 | libsigrok_la_LIBADD = $(LIBOBJS) | |
a1bb33af | 340 | |
6dddd902 | 341 | libsigrok_la_LDFLAGS = $(SR_LIB_LDFLAGS) |
eeebceea | 342 | |
45c59c8b | 343 | library_includedir = $(includedir)/libsigrok |
63d0fb75 ML |
344 | library_include_HEADERS = \ |
345 | include/libsigrok/libsigrok.h \ | |
346 | include/libsigrok/proto.h \ | |
347 | include/libsigrok/version.h | |
155b680d | 348 | noinst_HEADERS = src/libsigrok-internal.h |
a1bb33af | 349 | |
8a7b47cd UH |
350 | pkgconfigdir = $(libdir)/pkgconfig |
351 | pkgconfig_DATA = libsigrok.pc | |
d658e348 | 352 | |
67bd8055 UH |
353 | EXTRA_DIST = \ |
354 | Doxyfile \ | |
355 | HACKING \ | |
356 | README.devices \ | |
357 | contrib/gnuplot_chronovu_la8.gpi \ | |
358 | contrib/gnuplot_rigol_ds1xx2.gpi \ | |
359 | contrib/gnuplot_usbeesx.gpi \ | |
360 | contrib/gnuplot_usbeedx8.gpi \ | |
361 | contrib/gnuplot_usbeedx16.gpi \ | |
362 | contrib/sigrok-logo-notext.png \ | |
363 | contrib/z60_libsigrok.rules | |
364 | ||
365 | if HAVE_CHECK | |
366 | ||
367 | TESTS = tests/check_main | |
368 | ||
369 | check_PROGRAMS = ${TESTS} | |
370 | ||
371 | tests_check_main_SOURCES = \ | |
6592c369 | 372 | include/libsigrok/libsigrok.h \ |
67bd8055 UH |
373 | tests/lib.c \ |
374 | tests/lib.h \ | |
375 | tests/check_main.c \ | |
376 | tests/check_core.c \ | |
377 | tests/check_input_all.c \ | |
378 | tests/check_input_binary.c \ | |
379 | tests/check_output_all.c \ | |
380 | tests/check_strutil.c \ | |
381 | tests/check_version.c \ | |
382 | tests/check_driver_all.c | |
383 | ||
384 | tests_check_main_CFLAGS = @check_CFLAGS@ | |
385 | ||
386 | tests_check_main_LDADD = $(top_builddir)/libsigrok.la @check_LIBS@ | |
387 | ||
388 | endif | |
dd8b5f56 | 389 | |
580ed400 ML |
390 | BUILD_EXTRA = |
391 | INSTALL_EXTRA = | |
392 | CLEAN_EXTRA = | |
393 | ||
c23c8659 ML |
394 | if BINDINGS_CXX |
395 | ||
396 | lib_LTLIBRARIES += bindings/cxx/libsigrokxx.la | |
397 | ||
398 | bindings_cxx_libsigrokxx_la_SOURCES = bindings/cxx/classes.cpp | |
399 | ||
d1785122 | 400 | bindings_cxx_libsigrokxx_la_LIBADD = libsigrok.la $(glibmm_LIBS) |
c23c8659 ML |
401 | |
402 | bindings_cxx_libsigrokxx_la_LDFLAGS = $(SR_LIB_LDFLAGS) | |
403 | ||
404 | library_include_HEADERS += \ | |
405 | bindings/cxx/include/libsigrok/libsigrok.hpp \ | |
406 | bindings/cxx/include/libsigrok/enums.hpp | |
407 | ||
408 | pkgconfig_DATA += bindings/cxx/libsigrokxx.pc | |
409 | ||
580ed400 | 410 | bindings/cxx/libsigrok.xml: include/libsigrok/libsigrok.h |
f2a189f0 | 411 | $(AM_V_GEN)gccxml $(CFLAGS) -DGLIB_DISABLE_DEPRECATION_WARNINGS $< -fxml=$@ |
580ed400 ML |
412 | |
413 | bindings/cxx/enums.cpp: bindings/cxx/enums.timestamp | |
414 | ||
415 | bindings/cxx/include/libsigrok/enums.hpp: bindings/cxx/enums.timestamp | |
c23c8659 | 416 | |
580ed400 | 417 | bindings/cxx/enums.timestamp: bindings/cxx/enums.py bindings/cxx/libsigrok.xml \ |
c23c8659 | 418 | bindings/cxx/ConfigKey_methods.cpp bindings/cxx/QuantityFlag_methods.cpp |
f2a189f0 BV |
419 | $(AM_V_GEN)python $< |
420 | $(AM_V_at)touch $@ | |
c23c8659 | 421 | |
580ed400 ML |
422 | bindings/cxx/classes.lo: bindings/cxx/classes.cpp bindings/cxx/enums.cpp \ |
423 | $(library_include_HEADERS) | |
c23c8659 | 424 | |
580ed400 ML |
425 | cxx-clean: |
426 | rm -f bindings/cxx/libsigrok.xml | |
427 | rm -f bindings/cxx/enums.cpp | |
428 | rm -f bindings/cxx/include/libsigrok/enums.hpp | |
429 | rm -f bindings/cxx/enums.timestamp | |
c23c8659 | 430 | |
580ed400 ML |
431 | CLEAN_EXTRA += cxx-clean |
432 | ||
433 | endif | |
f7740954 ML |
434 | |
435 | if BINDINGS_PYTHON | |
436 | ||
d1785122 ML |
437 | PDIR = bindings/python |
438 | ||
439 | python-build: $(PDIR)/timestamp | |
440 | ||
c26162ff | 441 | python-quietclean: |
4711ec66 | 442 | $(AM_V_at)cd $(PDIR) && python setup.py --quiet clean --all 3>&1 1>&2 2>&3 \ |
c26162ff | 443 | | grep -v "can.t clean it"; true |
8eb10b62 | 444 | |
580ed400 | 445 | $(PDIR)/timestamp: bindings/cxx/libsigrokxx.la $(PDIR)/sigrok/core/classes.i \ |
ca5fdd96 | 446 | bindings/swig/classes.i $(library_include_HEADERS) |
c26162ff BV |
447 | $(AM_V_at)$(MAKE) python-quietclean |
448 | $(AM_V_GEN)cd $(PDIR) && python setup.py --quiet build 3>&1 1>&2 2>&3 \ | |
449 | | grep -v "command line option.*Wstrict-prototypes"; true | |
f2a189f0 | 450 | $(AM_V_at)touch $(PDIR)/timestamp |
f7740954 ML |
451 | |
452 | python-install: | |
f2a189f0 | 453 | cd $(PDIR) && python setup.py --quiet install --prefix $(prefix) |
f7740954 | 454 | |
c26162ff BV |
455 | python-clean: |
456 | $(AM_V_at)$(MAKE) python-quietclean | |
f2a189f0 | 457 | $(AM_V_at)rm -f $(PDIR)/timestamp |
f7740954 ML |
458 | |
459 | BUILD_EXTRA += python-build | |
460 | INSTALL_EXTRA += python-install | |
461 | CLEAN_EXTRA += python-clean | |
462 | ||
463 | endif | |
464 | ||
9fcf4d0b ML |
465 | if BINDINGS_JAVA |
466 | ||
467 | JDIR = bindings/java | |
90bd7656 ML |
468 | JPKG = org/sigrok/core |
469 | JCLS = $(JDIR)/$(JPKG)/classes | |
470 | JINT = $(JDIR)/$(JPKG)/interfaces | |
471 | JSRC = $(JCLS)/*.java $(JINT)/*.java | |
472 | JSWG = $(JCLS)/classes.i | |
473 | JCXX = $(JCLS)/classes_wrap.cxx | |
9fcf4d0b ML |
474 | JLIB = $(JDIR)/libsigrok_java_core_classes.so |
475 | JJAR = $(JDIR)/sigrok-core.jar | |
476 | ||
477 | java-build: $(JJAR) $(JLIB) | |
478 | ||
90bd7656 | 479 | $(JCXX): $(JSWG) bindings/swig/classes.i $(library_include_HEADERS) |
f2a189f0 | 480 | $(AM_V_GEN)swig -c++ -java -package org.sigrok.core.classes \ |
90bd7656 | 481 | -Iinclude -Ibindings/cxx/include -outdir $(JCLS) $(JSWG) |
9fcf4d0b | 482 | |
90bd7656 ML |
483 | $(JJAR): $(JCXX) |
484 | $(AM_V_GEN)$(JAVAC) -sourcepath $(JDIR) $(JSRC) | |
f2a189f0 | 485 | $(AM_V_at)jar cf $(JJAR) -C $(JDIR) $(JPKG) |
9fcf4d0b | 486 | |
90bd7656 | 487 | $(JLIB): $(JCXX) bindings/cxx/libsigrokxx.la $(library_include_HEADERS) |
f2a189f0 | 488 | $(AM_V_GEN)$(CXX) $(CXXFLAGS) -L.libs -Lbindings/cxx/.libs \ |
90bd7656 ML |
489 | -fno-strict-aliasing -fPIC -shared $(JCLS)/classes_wrap.cxx \ |
490 | -lsigrokxx -o $(JLIB) | |
9fcf4d0b ML |
491 | |
492 | java-install: | |
493 | $(INSTALL) -d $(libdir)/jni | |
494 | $(INSTALL) $(JLIB) -t $(libdir)/jni | |
495 | $(INSTALL) -d $(datadir)/java | |
496 | $(INSTALL) $(JJAR) -t $(datadir)/java | |
497 | ||
498 | java-clean: | |
90bd7656 ML |
499 | rm -f $(JCXX) |
500 | rm -f $(JCLS)/*.java | |
501 | rm -f $(JCLS)/*.class | |
502 | rm -f $(JINT)/*.class | |
d1785122 ML |
503 | rm -f $(JJAR) |
504 | rm -f $(JLIB) | |
9fcf4d0b ML |
505 | |
506 | BUILD_EXTRA += java-build | |
507 | INSTALL_EXTRA += java-install | |
508 | CLEAN_EXTRA += java-clean | |
509 | ||
510 | endif | |
511 | ||
f7740954 ML |
512 | all-local: $(BUILD_EXTRA) |
513 | install-exec-local: $(INSTALL_EXTRA) | |
d1785122 | 514 | clean-local: $(CLEAN_EXTRA) |
f7740954 | 515 | |
c0958408 | 516 | MAINTAINERCLEANFILES = ChangeLog |
0fc12d66 UH |
517 | |
518 | .PHONY: ChangeLog | |
519 | ChangeLog: | |
bd58d8f3 | 520 | git --git-dir $(top_srcdir)/.git log > ChangeLog || touch ChangeLog |
0fc12d66 UH |
521 | |
522 | dist-hook: ChangeLog | |
523 |