Makefile.am 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884
  1. ##
  2. ## This file is part of the libsigrok project.
  3. ##
  4. ## Copyright (C) 2010-2012 Bert Vermeulen <bert@biot.com>
  5. ## Copyright (C) 2012 Alexandru Gagniuc <mr.nuke.me@gmail.com>
  6. ##
  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.
  11. ##
  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.
  16. ##
  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/>.
  19. ##
  20. ACLOCAL_AMFLAGS = -I m4
  21. AM_LIBTOOLFLAGS = --silent
  22. GNUMAKEFLAGS = --no-print-directory
  23. # distutils/setuptools cause trouble on distcheck. Disable for now.
  24. DISTCHECK_CONFIGURE_FLAGS = --disable-python
  25. FIRMWARE_DIR = $(datadir)/sigrok-firmware
  26. local_includes = -Iinclude -I$(srcdir)/include -I$(srcdir)/src -I.
  27. if BINDINGS_CXX
  28. local_includes += -Ibindings/cxx/include -I$(srcdir)/bindings/cxx/include -Ibindings/cxx
  29. endif
  30. # Do not hard-code the firmware location on Windows.
  31. if WIN32
  32. global_defs =
  33. else
  34. global_defs = -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"'
  35. endif
  36. # Ensure that local include directories are always searched first.
  37. AM_CPPFLAGS = $(local_includes) $(global_defs)
  38. # The tests CFLAGS are a superset of the libsigrok CFLAGS, and the
  39. # python bindings CFLAGS are a superset of the C++ bindings CFLAGS.
  40. AM_CFLAGS = $(SR_EXTRA_CFLAGS) $(SR_WFLAGS) $(TESTS_CFLAGS)
  41. AM_CXXFLAGS = $(SR_WXXFLAGS) $(LIBSIGROKCXX_CFLAGS)
  42. lib_LTLIBRARIES = libsigrok.la
  43. # Backend files
  44. libsigrok_la_SOURCES = \
  45. src/backend.c \
  46. src/conversion.c \
  47. src/device.c \
  48. src/session.c \
  49. src/session_file.c \
  50. src/session_driver.c \
  51. src/hwdriver.c \
  52. src/trigger.c \
  53. src/soft-trigger.c \
  54. src/analog.c \
  55. src/fallback.c \
  56. src/resource.c \
  57. src/strutil.c \
  58. src/log.c \
  59. src/version.c \
  60. src/error.c \
  61. src/std.c \
  62. src/sw_limits.c
  63. # Input modules
  64. libsigrok_la_SOURCES += \
  65. src/input/input.c \
  66. src/input/binary.c \
  67. src/input/chronovu_la8.c \
  68. src/input/csv.c \
  69. src/input/raw_analog.c \
  70. src/input/trace32_ad.c \
  71. src/input/vcd.c \
  72. src/input/wav.c
  73. # Output modules
  74. libsigrok_la_SOURCES += \
  75. src/output/output.c \
  76. src/output/analog.c \
  77. src/output/ascii.c \
  78. src/output/bits.c \
  79. src/output/binary.c \
  80. src/output/csv.c \
  81. src/output/chronovu_la8.c \
  82. src/output/wav.c \
  83. src/output/hex.c \
  84. src/output/ols.c \
  85. src/output/srzip.c \
  86. src/output/vcd.c
  87. # Transform modules
  88. libsigrok_la_SOURCES += \
  89. src/transform/transform.c \
  90. src/transform/nop.c \
  91. src/transform/scale.c \
  92. src/transform/invert.c
  93. # SCPI support
  94. libsigrok_la_SOURCES += \
  95. src/scpi.h \
  96. src/scpi/scpi.c \
  97. src/scpi/helpers.c \
  98. src/scpi/scpi_tcp.c
  99. if NEED_RPC
  100. libsigrok_la_SOURCES += \
  101. src/scpi/scpi_vxi.c \
  102. src/scpi/vxi_clnt.c \
  103. src/scpi/vxi_xdr.c \
  104. src/scpi/vxi.h
  105. endif
  106. if NEED_SERIAL
  107. libsigrok_la_SOURCES += \
  108. src/serial.c \
  109. src/scpi/scpi_serial.c
  110. endif
  111. if NEED_USB
  112. libsigrok_la_SOURCES += \
  113. src/ezusb.c \
  114. src/usb.c \
  115. src/scpi/scpi_usbtmc_libusb.c
  116. endif
  117. if NEED_VISA
  118. libsigrok_la_SOURCES += \
  119. src/scpi/scpi_visa.c
  120. endif
  121. if NEED_GPIB
  122. libsigrok_la_SOURCES += \
  123. src/scpi/scpi_libgpib.c
  124. endif
  125. # Modbus support
  126. libsigrok_la_SOURCES += \
  127. src/modbus/modbus.c
  128. if NEED_SERIAL
  129. libsigrok_la_SOURCES += \
  130. src/modbus/modbus_serial_rtu.c
  131. endif
  132. # Hardware (DMM chip parsers)
  133. libsigrok_la_SOURCES += \
  134. src/dmm/es519xx.c \
  135. src/dmm/fs9721.c \
  136. src/dmm/fs9922.c \
  137. src/dmm/m2110.c \
  138. src/dmm/metex14.c \
  139. src/dmm/asycii.c \
  140. src/dmm/rs9lcd.c \
  141. src/dmm/bm25x.c \
  142. src/dmm/ut71x.c \
  143. src/dmm/ut372.c \
  144. src/dmm/vc870.c \
  145. src/dmm/dtm0660.c
  146. # Hardware (LCR chip parsers)
  147. if NEED_SERIAL
  148. libsigrok_la_SOURCES += \
  149. src/lcr/es51919.c
  150. endif
  151. # Hardware (Scale protocol parsers)
  152. libsigrok_la_SOURCES += \
  153. src/scale/kern.c
  154. # Hardware drivers
  155. noinst_LTLIBRARIES = src/libdrivers.la \
  156. src/libdrivers_head.la src/libdrivers_tail.la
  157. src/libdrivers.o: src/libdrivers.la \
  158. src/libdrivers_head.la src/libdrivers_tail.la
  159. $(AM_V_CCLD)$(LINK) src/libdrivers_head.la src/libdrivers.la \
  160. src/libdrivers_tail.la
  161. src/libdrivers.lo: src/libdrivers.o
  162. $(AM_V_GEN)echo "# Generated by libtool" > $@
  163. $(AM_V_at)echo "pic_object='libdrivers.o'" >> $@
  164. $(AM_V_at)echo "non_pic_object='libdrivers.o'" >> $@
  165. src_libdrivers_head_la_SOURCES = src/driver_list_start.c
  166. src_libdrivers_tail_la_SOURCES = src/driver_list_stop.c
  167. src_libdrivers_la_SOURCES = src/drivers.c
  168. if HW_AGILENT_DMM
  169. src_libdrivers_la_SOURCES += \
  170. src/hardware/agilent-dmm/protocol.h \
  171. src/hardware/agilent-dmm/protocol.c \
  172. src/hardware/agilent-dmm/api.c
  173. endif
  174. if HW_APPA_55II
  175. src_libdrivers_la_SOURCES += \
  176. src/hardware/appa-55ii/protocol.h \
  177. src/hardware/appa-55ii/protocol.c \
  178. src/hardware/appa-55ii/api.c
  179. endif
  180. if HW_ARACHNID_LABS_RE_LOAD_PRO
  181. src_libdrivers_la_SOURCES += \
  182. src/hardware/arachnid-labs-re-load-pro/protocol.h \
  183. src/hardware/arachnid-labs-re-load-pro/protocol.c \
  184. src/hardware/arachnid-labs-re-load-pro/api.c
  185. endif
  186. if HW_ASIX_SIGMA
  187. src_libdrivers_la_SOURCES += \
  188. src/hardware/asix-sigma/protocol.h \
  189. src/hardware/asix-sigma/protocol.c \
  190. src/hardware/asix-sigma/api.c
  191. endif
  192. if HW_ATTEN_PPS3XXX
  193. src_libdrivers_la_SOURCES += \
  194. src/hardware/atten-pps3xxx/protocol.h \
  195. src/hardware/atten-pps3xxx/protocol.c \
  196. src/hardware/atten-pps3xxx/api.c
  197. endif
  198. if HW_BAYLIBRE_ACME
  199. src_libdrivers_la_SOURCES += \
  200. src/hardware/baylibre-acme/protocol.h \
  201. src/hardware/baylibre-acme/protocol.c \
  202. src/hardware/baylibre-acme/api.c \
  203. src/hardware/baylibre-acme/gpio.h \
  204. src/hardware/baylibre-acme/gpio.c
  205. endif
  206. if HW_BEAGLELOGIC
  207. src_libdrivers_la_SOURCES += \
  208. src/hardware/beaglelogic/beaglelogic.h \
  209. src/hardware/beaglelogic/protocol.h \
  210. src/hardware/beaglelogic/protocol.c \
  211. src/hardware/beaglelogic/api.c
  212. endif
  213. if HW_BRYMEN_BM86X
  214. src_libdrivers_la_SOURCES += \
  215. src/hardware/brymen-bm86x/protocol.h \
  216. src/hardware/brymen-bm86x/protocol.c \
  217. src/hardware/brymen-bm86x/api.c
  218. endif
  219. if HW_BRYMEN_DMM
  220. src_libdrivers_la_SOURCES += \
  221. src/hardware/brymen-dmm/parser.c \
  222. src/hardware/brymen-dmm/protocol.h \
  223. src/hardware/brymen-dmm/protocol.c \
  224. src/hardware/brymen-dmm/api.c
  225. endif
  226. if HW_CEM_DT_885X
  227. src_libdrivers_la_SOURCES += \
  228. src/hardware/cem-dt-885x/protocol.h \
  229. src/hardware/cem-dt-885x/protocol.c \
  230. src/hardware/cem-dt-885x/api.c
  231. endif
  232. if HW_CENTER_3XX
  233. src_libdrivers_la_SOURCES += \
  234. src/hardware/center-3xx/protocol.h \
  235. src/hardware/center-3xx/protocol.c \
  236. src/hardware/center-3xx/api.c
  237. endif
  238. if HW_CHRONOVU_LA
  239. src_libdrivers_la_SOURCES += \
  240. src/hardware/chronovu-la/protocol.h \
  241. src/hardware/chronovu-la/protocol.c \
  242. src/hardware/chronovu-la/api.c
  243. endif
  244. if HW_COLEAD_SLM
  245. src_libdrivers_la_SOURCES += \
  246. src/hardware/colead-slm/protocol.h \
  247. src/hardware/colead-slm/protocol.c \
  248. src/hardware/colead-slm/api.c
  249. endif
  250. if HW_CONRAD_DIGI_35_CPU
  251. src_libdrivers_la_SOURCES += \
  252. src/hardware/conrad-digi-35-cpu/protocol.h \
  253. src/hardware/conrad-digi-35-cpu/protocol.c \
  254. src/hardware/conrad-digi-35-cpu/api.c
  255. endif
  256. if HW_DEMO
  257. src_libdrivers_la_SOURCES += \
  258. src/hardware/demo/protocol.h \
  259. src/hardware/demo/protocol.c \
  260. src/hardware/demo/api.c
  261. endif
  262. if HW_DREAMSOURCELAB_DSLOGIC
  263. src_libdrivers_la_SOURCES += \
  264. src/hardware/dreamsourcelab-dslogic/protocol.h \
  265. src/hardware/dreamsourcelab-dslogic/protocol.c \
  266. src/hardware/dreamsourcelab-dslogic/api.c
  267. endif
  268. if HW_FLUKE_DMM
  269. src_libdrivers_la_SOURCES += \
  270. src/hardware/fluke-dmm/protocol.h \
  271. src/hardware/fluke-dmm/protocol.c \
  272. src/hardware/fluke-dmm/api.c
  273. endif
  274. if HW_FTDI_LA
  275. src_libdrivers_la_SOURCES += \
  276. src/hardware/ftdi-la/protocol.h \
  277. src/hardware/ftdi-la/protocol.c \
  278. src/hardware/ftdi-la/api.c
  279. endif
  280. if HW_FX2LAFW
  281. src_libdrivers_la_SOURCES += \
  282. src/hardware/fx2lafw/protocol.h \
  283. src/hardware/fx2lafw/protocol.c \
  284. src/hardware/fx2lafw/api.c
  285. endif
  286. if HW_GMC_MH_1X_2X
  287. src_libdrivers_la_SOURCES += \
  288. src/hardware/gmc-mh-1x-2x/protocol.h \
  289. src/hardware/gmc-mh-1x-2x/protocol.c \
  290. src/hardware/gmc-mh-1x-2x/api.c
  291. endif
  292. if HW_GWINSTEK_GDS_800
  293. src_libdrivers_la_SOURCES += \
  294. src/hardware/gwinstek-gds-800/protocol.h \
  295. src/hardware/gwinstek-gds-800/protocol.c \
  296. src/hardware/gwinstek-gds-800/api.c
  297. endif
  298. if HW_HAMEG_HMO
  299. src_libdrivers_la_SOURCES += \
  300. src/hardware/hameg-hmo/protocol.h \
  301. src/hardware/hameg-hmo/protocol.c \
  302. src/hardware/hameg-hmo/api.c
  303. endif
  304. if HW_HANTEK_6XXX
  305. src_libdrivers_la_SOURCES += \
  306. src/hardware/hantek-6xxx/protocol.h \
  307. src/hardware/hantek-6xxx/protocol.c \
  308. src/hardware/hantek-6xxx/api.c
  309. endif
  310. if HW_HANTEK_DSO
  311. src_libdrivers_la_SOURCES += \
  312. src/hardware/hantek-dso/protocol.h \
  313. src/hardware/hantek-dso/protocol.c \
  314. src/hardware/hantek-dso/api.c
  315. endif
  316. if HW_HP_3457A
  317. src_libdrivers_la_SOURCES += \
  318. src/hardware/hp-3457a/protocol.h \
  319. src/hardware/hp-3457a/protocol.c \
  320. src/hardware/hp-3457a/api.c
  321. endif
  322. if HW_HUNG_CHANG_DSO_2100
  323. src_libdrivers_la_SOURCES += \
  324. src/hardware/hung-chang-dso-2100/protocol.h \
  325. src/hardware/hung-chang-dso-2100/protocol.c \
  326. src/hardware/hung-chang-dso-2100/api.c
  327. endif
  328. if HW_IKALOGIC_SCANALOGIC2
  329. src_libdrivers_la_SOURCES += \
  330. src/hardware/ikalogic-scanalogic2/protocol.h \
  331. src/hardware/ikalogic-scanalogic2/protocol.c \
  332. src/hardware/ikalogic-scanalogic2/api.c
  333. endif
  334. if HW_IKALOGIC_SCANAPLUS
  335. src_libdrivers_la_SOURCES += \
  336. src/hardware/ikalogic-scanaplus/protocol.h \
  337. src/hardware/ikalogic-scanaplus/protocol.c \
  338. src/hardware/ikalogic-scanaplus/api.c
  339. endif
  340. if HW_KECHENG_KC_330B
  341. src_libdrivers_la_SOURCES += \
  342. src/hardware/kecheng-kc-330b/protocol.h \
  343. src/hardware/kecheng-kc-330b/protocol.c \
  344. src/hardware/kecheng-kc-330b/api.c
  345. endif
  346. if HW_KERN_SCALE
  347. src_libdrivers_la_SOURCES += \
  348. src/hardware/kern-scale/protocol.h \
  349. src/hardware/kern-scale/protocol.c \
  350. src/hardware/kern-scale/api.c
  351. endif
  352. if HW_KORAD_KAXXXXP
  353. src_libdrivers_la_SOURCES += \
  354. src/hardware/korad-kaxxxxp/protocol.h \
  355. src/hardware/korad-kaxxxxp/protocol.c \
  356. src/hardware/korad-kaxxxxp/api.c
  357. endif
  358. if HW_LASCAR_EL_USB
  359. src_libdrivers_la_SOURCES += \
  360. src/hardware/lascar-el-usb/protocol.h \
  361. src/hardware/lascar-el-usb/protocol.c \
  362. src/hardware/lascar-el-usb/api.c
  363. endif
  364. if HW_LECROY_LOGICSTUDIO
  365. src_libdrivers_la_SOURCES += \
  366. src/hardware/lecroy-logicstudio/protocol.h \
  367. src/hardware/lecroy-logicstudio/protocol.c \
  368. src/hardware/lecroy-logicstudio/api.c
  369. endif
  370. if HW_LECROY_XSTREAM
  371. src_libdrivers_la_SOURCES += \
  372. src/hardware/lecroy-xstream/protocol.h \
  373. src/hardware/lecroy-xstream/protocol.c \
  374. src/hardware/lecroy-xstream/api.c
  375. endif
  376. if HW_MANSON_HCS_3XXX
  377. src_libdrivers_la_SOURCES += \
  378. src/hardware/manson-hcs-3xxx/protocol.h \
  379. src/hardware/manson-hcs-3xxx/protocol.c \
  380. src/hardware/manson-hcs-3xxx/api.c
  381. endif
  382. if HW_MAYNUO_M97
  383. src_libdrivers_la_SOURCES += \
  384. src/hardware/maynuo-m97/protocol.h \
  385. src/hardware/maynuo-m97/protocol.c \
  386. src/hardware/maynuo-m97/api.c
  387. endif
  388. if HW_MIC_985XX
  389. src_libdrivers_la_SOURCES += \
  390. src/hardware/mic-985xx/protocol.h \
  391. src/hardware/mic-985xx/protocol.c \
  392. src/hardware/mic-985xx/api.c
  393. endif
  394. if HW_MOTECH_LPS_30X
  395. src_libdrivers_la_SOURCES += \
  396. src/hardware/motech-lps-30x/protocol.h \
  397. src/hardware/motech-lps-30x/protocol.c \
  398. src/hardware/motech-lps-30x/api.c
  399. endif
  400. if HW_NORMA_DMM
  401. src_libdrivers_la_SOURCES += \
  402. src/hardware/norma-dmm/protocol.h \
  403. src/hardware/norma-dmm/protocol.c \
  404. src/hardware/norma-dmm/api.c
  405. endif
  406. if HW_OPENBENCH_LOGIC_SNIFFER
  407. src_libdrivers_la_SOURCES += \
  408. src/hardware/openbench-logic-sniffer/protocol.h \
  409. src/hardware/openbench-logic-sniffer/protocol.c \
  410. src/hardware/openbench-logic-sniffer/api.c
  411. endif
  412. if HW_PCE_322A
  413. src_libdrivers_la_SOURCES += \
  414. src/hardware/pce-322a/protocol.h \
  415. src/hardware/pce-322a/protocol.c \
  416. src/hardware/pce-322a/api.c
  417. endif
  418. if HW_PIPISTRELLO_OLS
  419. src_libdrivers_la_SOURCES += \
  420. src/hardware/pipistrello-ols/protocol.h \
  421. src/hardware/pipistrello-ols/protocol.c \
  422. src/hardware/pipistrello-ols/api.c
  423. endif
  424. if HW_RIGOL_DS
  425. src_libdrivers_la_SOURCES += \
  426. src/hardware/rigol-ds/protocol.h \
  427. src/hardware/rigol-ds/protocol.c \
  428. src/hardware/rigol-ds/api.c
  429. endif
  430. if HW_ROHDE_SCHWARZ_SME_0X
  431. src_libdrivers_la_SOURCES += \
  432. src/hardware/rohde-schwarz-sme-0x/protocol.h \
  433. src/hardware/rohde-schwarz-sme-0x/protocol.c \
  434. src/hardware/rohde-schwarz-sme-0x/api.c
  435. endif
  436. if HW_SALEAE_LOGIC16
  437. src_libdrivers_la_SOURCES += \
  438. src/hardware/saleae-logic16/protocol.h \
  439. src/hardware/saleae-logic16/protocol.c \
  440. src/hardware/saleae-logic16/api.c
  441. endif
  442. if HW_SALEAE_LOGIC_PRO
  443. src_libdrivers_la_SOURCES += \
  444. src/hardware/saleae-logic-pro/protocol.h \
  445. src/hardware/saleae-logic-pro/protocol.c \
  446. src/hardware/saleae-logic-pro/api.c
  447. endif
  448. if HW_SCPI_PPS
  449. src_libdrivers_la_SOURCES += \
  450. src/hardware/scpi-pps/protocol.h \
  451. src/hardware/scpi-pps/protocol.c \
  452. src/hardware/scpi-pps/profiles.c \
  453. src/hardware/scpi-pps/api.c
  454. endif
  455. if HW_SERIAL_DMM
  456. src_libdrivers_la_SOURCES += \
  457. src/hardware/serial-dmm/protocol.h \
  458. src/hardware/serial-dmm/protocol.c \
  459. src/hardware/serial-dmm/api.c
  460. endif
  461. if HW_SERIAL_LCR
  462. src_libdrivers_la_SOURCES += \
  463. src/hardware/serial-lcr/api.c
  464. endif
  465. if HW_SYSCLK_LWLA
  466. src_libdrivers_la_SOURCES += \
  467. src/hardware/sysclk-lwla/lwla.h \
  468. src/hardware/sysclk-lwla/lwla.c \
  469. src/hardware/sysclk-lwla/lwla1016.c \
  470. src/hardware/sysclk-lwla/lwla1034.c \
  471. src/hardware/sysclk-lwla/protocol.h \
  472. src/hardware/sysclk-lwla/protocol.c \
  473. src/hardware/sysclk-lwla/api.c
  474. endif
  475. if HW_TELEINFO
  476. src_libdrivers_la_SOURCES += \
  477. src/hardware/teleinfo/protocol.h \
  478. src/hardware/teleinfo/protocol.c \
  479. src/hardware/teleinfo/api.c
  480. endif
  481. if HW_TESTO
  482. src_libdrivers_la_SOURCES += \
  483. src/hardware/testo/protocol.h \
  484. src/hardware/testo/protocol.c \
  485. src/hardware/testo/api.c
  486. endif
  487. if HW_TONDAJ_SL_814
  488. src_libdrivers_la_SOURCES += \
  489. src/hardware/tondaj-sl-814/protocol.h \
  490. src/hardware/tondaj-sl-814/protocol.c \
  491. src/hardware/tondaj-sl-814/api.c
  492. endif
  493. if HW_UNI_T_DMM
  494. src_libdrivers_la_SOURCES += \
  495. src/hardware/uni-t-dmm/protocol.h \
  496. src/hardware/uni-t-dmm/protocol.c \
  497. src/hardware/uni-t-dmm/api.c
  498. endif
  499. if HW_UNI_T_UT32X
  500. src_libdrivers_la_SOURCES += \
  501. src/hardware/uni-t-ut32x/protocol.h \
  502. src/hardware/uni-t-ut32x/protocol.c \
  503. src/hardware/uni-t-ut32x/api.c
  504. endif
  505. if HW_VICTOR_DMM
  506. src_libdrivers_la_SOURCES += \
  507. src/hardware/victor-dmm/protocol.h \
  508. src/hardware/victor-dmm/protocol.c \
  509. src/hardware/victor-dmm/api.c
  510. endif
  511. if HW_YOKOGAWA_DLM
  512. src_libdrivers_la_SOURCES += \
  513. src/hardware/yokogawa-dlm/protocol.h \
  514. src/hardware/yokogawa-dlm/protocol.c \
  515. src/hardware/yokogawa-dlm/protocol_wrappers.h \
  516. src/hardware/yokogawa-dlm/protocol_wrappers.c \
  517. src/hardware/yokogawa-dlm/api.c
  518. endif
  519. if HW_ZEROPLUS_LOGIC_CUBE
  520. src_libdrivers_la_SOURCES += \
  521. src/hardware/zeroplus-logic-cube/analyzer.c \
  522. src/hardware/zeroplus-logic-cube/analyzer.h \
  523. src/hardware/zeroplus-logic-cube/gl_usb.h \
  524. src/hardware/zeroplus-logic-cube/gl_usb.c \
  525. src/hardware/zeroplus-logic-cube/protocol.h \
  526. src/hardware/zeroplus-logic-cube/protocol.c \
  527. src/hardware/zeroplus-logic-cube/api.c
  528. endif
  529. libsigrok_la_LIBADD = src/libdrivers.lo $(SR_EXTRA_LIBS) $(LIBSIGROK_LIBS)
  530. libsigrok_la_LDFLAGS = -version-info $(SR_LIB_VERSION) -no-undefined
  531. library_includedir = $(includedir)/libsigrok
  532. library_include_HEADERS = \
  533. include/libsigrok/libsigrok.h \
  534. include/libsigrok/proto.h
  535. nodist_library_include_HEADERS = \
  536. include/libsigrok/version.h
  537. noinst_HEADERS = src/libsigrok-internal.h
  538. pkgconfigdir = $(libdir)/pkgconfig
  539. pkgconfig_DATA = libsigrok.pc
  540. mimeappdir = $(datadir)/mime/packages
  541. mimeapp_DATA = contrib/vnd.sigrok.session.xml
  542. mimeicondir = $(datadir)/icons/hicolor/48x48/mimetypes
  543. mimeicon_DATA = contrib/libsigrok.png
  544. mimeiconscalabledir = $(datadir)/icons/hicolor/scalable/mimetypes
  545. mimeiconscalable_DATA = contrib/libsigrok.svg
  546. EXTRA_DIST = \
  547. Doxyfile \
  548. HACKING \
  549. README.devices \
  550. bindings/cxx/ConfigKey_methods.cpp \
  551. bindings/cxx/ConfigKey_methods.hpp \
  552. bindings/cxx/ConfigKey_methods.i \
  553. bindings/cxx/Doxyfile \
  554. bindings/cxx/QuantityFlag_methods.cpp \
  555. bindings/cxx/QuantityFlag_methods.hpp \
  556. bindings/cxx/enums.py \
  557. bindings/python/Doxyfile \
  558. bindings/python/setup.py \
  559. bindings/python/sigrok/__init__.py \
  560. bindings/python/sigrok/core/__init__.py \
  561. bindings/python/sigrok/core/classes.i \
  562. bindings/ruby/classes.i \
  563. bindings/java/Doxyfile \
  564. bindings/java/org/sigrok/core/classes/classes.i \
  565. bindings/java/org/sigrok/core/interfaces/DatafeedCallback.java \
  566. bindings/java/org/sigrok/core/interfaces/LogCallback.java \
  567. bindings/swig/classes.i \
  568. bindings/swig/doc.py \
  569. bindings/swig/templates.i \
  570. contrib/libsigrok_112x112.png \
  571. contrib/libsigrok.png \
  572. contrib/libsigrok.svg \
  573. contrib/vnd.sigrok.session.xml \
  574. contrib/z60_libsigrok.rules
  575. if HAVE_CHECK
  576. TESTS = tests/main
  577. check_PROGRAMS = ${TESTS}
  578. endif
  579. tests_main_SOURCES = \
  580. include/libsigrok/libsigrok.h \
  581. tests/lib.c \
  582. tests/lib.h \
  583. tests/main.c \
  584. tests/core.c \
  585. tests/input_all.c \
  586. tests/input_binary.c \
  587. tests/output_all.c \
  588. tests/transform_all.c \
  589. tests/session.c \
  590. tests/strutil.c \
  591. tests/version.c \
  592. tests/driver_all.c \
  593. tests/device.c \
  594. tests/trigger.c \
  595. tests/analog.c
  596. tests_main_LDADD = libsigrok.la $(SR_EXTRA_LIBS) $(TESTS_LIBS)
  597. BUILD_EXTRA =
  598. INSTALL_EXTRA =
  599. UNINSTALL_EXTRA =
  600. CLEAN_EXTRA =
  601. libsigrok-uninstall:
  602. -rmdir $(DESTDIR)$(includedir)/libsigrok
  603. UNINSTALL_EXTRA += libsigrok-uninstall
  604. if BINDINGS_CXX
  605. lib_LTLIBRARIES += bindings/cxx/libsigrokcxx.la
  606. bindings_cxx_libsigrokcxx_la_SOURCES = bindings/cxx/classes.cpp
  607. bindings_cxx_libsigrokcxx_la_LIBADD = libsigrok.la $(SR_EXTRA_LIBS) $(LIBSIGROKCXX_LIBS) $(SR_EXTRA_CXX_LIBS)
  608. bindings_cxx_libsigrokcxx_la_LDFLAGS = -version-info $(SR_LIB_VERSION) -no-undefined
  609. bindings_cxx_libsigrokcxx_la_includedir = $(includedir)/libsigrokcxx
  610. bindings_cxx_libsigrokcxx_la_include_HEADERS = \
  611. bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp
  612. nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS = \
  613. bindings/cxx/include/libsigrokcxx/enums.hpp
  614. pkgconfig_DATA += bindings/cxx/libsigrokcxx.pc
  615. doxy/xml/index.xml: include/libsigrok/libsigrok.h
  616. $(AM_V_GEN)cd $(srcdir) && BUILDDIR=$(abs_builddir)/ doxygen Doxyfile 2>/dev/null
  617. bindings/swig/enums.i: bindings/cxx/enums.timestamp
  618. bindings/cxx/enums.cpp: bindings/cxx/enums.timestamp
  619. bindings/cxx/include/libsigrokcxx/enums.hpp: bindings/cxx/enums.timestamp
  620. bindings/cxx/enums.timestamp: $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml \
  621. bindings/cxx/ConfigKey_methods.cpp bindings/cxx/QuantityFlag_methods.cpp
  622. $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/cxx/enums.py doxy/xml/index.xml
  623. $(AM_V_at)touch $@
  624. bindings/cxx/classes.lo: bindings/cxx/classes.cpp bindings/cxx/enums.cpp \
  625. $(library_include_HEADERS) $(nodist_library_include_HEADERS)
  626. cxx-clean:
  627. rm -rf doxy/
  628. rm -rf bindings/cxx/doxy/
  629. rm -f bindings/swig/enums.i
  630. rm -f bindings/cxx/enums.cpp
  631. rm -f bindings/cxx/include/libsigrokcxx/enums.hpp
  632. rm -f bindings/cxx/enums.timestamp
  633. CLEAN_EXTRA += cxx-clean
  634. cxx-uninstall:
  635. -rmdir $(DESTDIR)$(includedir)/libsigrokcxx
  636. UNINSTALL_EXTRA += cxx-uninstall
  637. endif
  638. CPPXMLDOC = bindings/cxx/doxy/xml/index.xml
  639. $(CPPXMLDOC): bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp \
  640. bindings/cxx/enums.timestamp
  641. $(AM_V_GEN)cd $(srcdir)/bindings/cxx && BUILDDIR=$(abs_builddir)/bindings/cxx/ doxygen Doxyfile 2>/dev/null
  642. # Macro definitions to be used by the SWIG parser.
  643. swig_defs = -Dnoexcept= -Dprivate=protected -DG_GNUC_BEGIN_IGNORE_DEPRECATIONS= -DG_GNUC_END_IGNORE_DEPRECATIONS=
  644. if BINDINGS_PYTHON
  645. PDIR = bindings/python
  646. PDOC_START = bindings/python/sigrok/core/doc_start.i
  647. PDOC_END = bindings/python/sigrok/core/doc_end.i
  648. setup_vars = VERSION='$(PACKAGE_VERSION)' CC='$(CXX)' CXX='$(CXX)' CFLAGS='$(CXXFLAGS) $(SR_WXXFLAGS) $(PYSIGROK_CFLAGS)' CXXFLAGS='$(CXXFLAGS) $(SR_WXXFLAGS) $(PYSIGROK_CFLAGS)' LDADD='$(PYSIGROK_LIBS)'
  649. setup_quiet = --quiet
  650. setup_py = $(PYTHON) $(srcdir)/$(PDIR)/setup.py $(setup_vars) $(setup_quiet)
  651. $(PDOC_START): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC)
  652. $(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core
  653. $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py python $(CPPXMLDOC) start > $@
  654. $(PDOC_END): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC)
  655. $(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core
  656. $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py python $(CPPXMLDOC) end > $@
  657. python-build: $(PDIR)/timestamp
  658. $(PDIR)/timestamp: $(PDIR)/sigrok/core/classes.i \
  659. bindings/swig/classes.i bindings/swig/templates.i \
  660. bindings/swig/enums.i $(PDOC_START) $(PDOC_END) \
  661. $(library_include_HEADERS) \
  662. $(nodist_library_include_HEADERS) \
  663. $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \
  664. $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) \
  665. @ORDER@ bindings/cxx/libsigrokcxx.la
  666. $(AM_V_at)$(setup_py) clean --all 2>/dev/null
  667. $(AM_V_GEN)$(setup_py) build_ext --swig "$(SWIG)" --swig-opts '$(swig_defs)' build_py
  668. $(AM_V_at): >$@
  669. python-install:
  670. $(AM_V_at)$(MKDIR_P) "$(DESTDIR)$(prefix)" "$(DESTDIR)$(exec_prefix)"
  671. destdir='$(DESTDIR)'; $(setup_py) install $${destdir:+"--root=$$destdir"} \
  672. --prefix "$(prefix)" --exec-prefix "$(exec_prefix)"
  673. python-clean:
  674. -$(AM_V_at)rm -f $(PDIR)/timestamp
  675. -$(AM_V_at)rm -fr $(PDIR)/doxy
  676. -$(AM_V_at)$(setup_py) clean --all 2>/dev/null
  677. python-doc:
  678. $(AM_V_at)cd $(srcdir)/$(PDIR) && BUILDDIR="$(abs_builddir)/$(PDIR)/" doxygen Doxyfile 2>/dev/null
  679. BUILD_EXTRA += python-build
  680. INSTALL_EXTRA += python-install
  681. CLEAN_EXTRA += python-clean
  682. endif
  683. if BINDINGS_RUBY
  684. RDIR = bindings/ruby
  685. RDOC = $(RDIR)/doc.i
  686. RWRAP = $(RDIR)/classes_wrap.cpp
  687. ROBJ = $(RWRAP:.cpp=.o)
  688. REXT = $(RDIR)/sigrok.$(RUBY_DLEXT)
  689. $(RDOC): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC)
  690. $(AM_V_at)test -d $(RDIR) || $(MKDIR_P) $(RDIR)
  691. $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py ruby $(CPPXMLDOC) > $@
  692. $(RWRAP): $(srcdir)/$(RDIR)/classes.i $(RDOC) \
  693. bindings/swig/classes.i bindings/swig/templates.i \
  694. bindings/swig/enums.i
  695. $(AM_V_GEN)$(SWIG) -ruby -c++ -Ibindings -Ibindings/cxx/include -I$(RDIR) $(local_includes) $(swig_defs) -o $@ $(srcdir)/$(RDIR)/classes.i
  696. $(ROBJ): $(RWRAP) \
  697. $(library_include_HEADERS) \
  698. $(nodist_library_include_HEADERS) \
  699. $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \
  700. $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS)
  701. $(AM_V_CXX)$(CXX) $(RBSIGROK_CFLAGS) -I. -Iinclude -Ibindings/cxx/include $(local_includes) -fPIC -o $@ -c $(RWRAP)
  702. $(REXT): $(ROBJ) @ORDER@ bindings/cxx/libsigrokcxx.la
  703. $(AM_V_CXXLD)$(CXX) -shared -o $@ $(ROBJ) -lsigrokcxx -Lbindings/cxx/.libs $(RBSIGROK_LIBS)
  704. ruby-build: $(REXT)
  705. ruby-install: $(REXT)
  706. $(INSTALL) -d $(DESTDIR)$(prefix)/$(RBSIGROK_EXTDIR)
  707. $(INSTALL) $(REXT) $(DESTDIR)$(prefix)/$(RBSIGROK_EXTDIR)
  708. ruby-uninstall:
  709. rm -f $(DESTDIR)$(prefix)/$(RBSIGROK_EXTDIR)/sigrok.$(RUBY_DLEXT)
  710. ruby-clean:
  711. -$(AM_V_at)rm -fr $(RDIR)/doc
  712. -$(AM_V_at)rm -f $(REXT) $(ROBJ) $(RWRAP) $(RDOC)
  713. ruby-doc: $(RWRAP)
  714. $(AM_V_at)yard doc -o $(RDIR)/doc $(RWRAP)
  715. BUILD_EXTRA += ruby-build
  716. INSTALL_EXTRA += ruby-install
  717. UNINSTALL_EXTRA += ruby-uninstall
  718. CLEAN_EXTRA += ruby-clean
  719. endif
  720. if BINDINGS_JAVA
  721. JDIR = bindings/java
  722. JPKG = org/sigrok/core
  723. JCLS = $(JDIR)/$(JPKG)/classes
  724. JINT = $(JDIR)/$(JPKG)/interfaces
  725. JSRC = $(JCLS)/*.java $(srcdir)/$(JINT)/*.java
  726. JSWG = $(JCLS)/classes.i
  727. JDOC = $(JCLS)/doc.i
  728. JCXX = $(JCLS)/classes_wrap.cxx
  729. JLIB = $(JDIR)/libsigrok_java_core_classes.so
  730. JJAR = $(JDIR)/sigrok-core.jar
  731. java_cleanfiles = $(JCXX) $(JCLS)/*.java $(JCLS)/*.class $(JINT)/*.class $(JJAR) $(JLIB)
  732. java-build: $(JJAR) $(JLIB)
  733. $(JDOC): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC)
  734. $(AM_V_at)test -d $(JCLS) || $(MKDIR_P) $(JCLS)
  735. $(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py java $(CPPXMLDOC) > $@
  736. $(JCXX): $(srcdir)/$(JSWG) $(JDOC) bindings/swig/classes.i \
  737. bindings/swig/templates.i bindings/swig/enums.i \
  738. $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \
  739. $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS)
  740. -$(AM_V_at)rm -f $(java_cleanfiles)
  741. $(AM_V_GEN)$(SWIG) -c++ $(swig_defs) \
  742. -java -package org.sigrok.core.classes \
  743. -Ibindings -I$(JCLS) $(local_includes) -I$(srcdir) $(JNI_CPPFLAGS) \
  744. -outdir $(JCLS) -o $@ $(srcdir)/$(JSWG)
  745. $(JJAR): $(JCXX)
  746. $(AM_V_GEN)$(JAVAC) -d $(JDIR) $(JSRC)
  747. $(AM_V_at)jar cf $(JJAR) -C $(JDIR) $(JPKG)
  748. $(JLIB): $(JCXX) \
  749. $(library_include_HEADERS) $(nodist_library_include_HEADERS) \
  750. $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \
  751. $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) \
  752. @ORDER@ bindings/cxx/libsigrokcxx.la
  753. $(AM_V_GEN)$(CXXCOMPILE) $(JNI_CPPFLAGS) $(LDFLAGS) -L.libs -Lbindings/cxx/.libs \
  754. -fno-strict-aliasing -fPIC -shared $(JCLS)/classes_wrap.cxx \
  755. -lsigrokcxx $(LIBSIGROKCXX_LIBS) $(SR_EXTRA_CXX_LIBS) -o $(JLIB)
  756. java-install:
  757. $(INSTALL) -d $(DESTDIR)$(libdir)/jni
  758. $(INSTALL) $(JLIB) $(DESTDIR)$(libdir)/jni
  759. $(INSTALL) -d $(DESTDIR)$(datadir)/java
  760. $(INSTALL) $(JJAR) $(DESTDIR)$(datadir)/java
  761. java-uninstall:
  762. -rm -f $(DESTDIR)$(datadir)/java/sigrok-core.jar
  763. -rm -f $(DESTDIR)$(libdir)/jni/libsigrok_java_core_classes.so
  764. java-clean:
  765. -$(AM_V_at)rm -f $(java_cleanfiles) $(JDOC)
  766. -$(AM_V_at)rm -fr $(JDIR)/doxy
  767. java-doc:
  768. $(AM_V_at)cd $(srcdir)/$(JDIR) && BUILDDIR="$(abs_builddir)/$(JDIR)/" doxygen Doxyfile
  769. BUILD_EXTRA += java-build
  770. INSTALL_EXTRA += java-install
  771. UNINSTALL_EXTRA += java-uninstall
  772. CLEAN_EXTRA += java-clean
  773. endif
  774. all-local: $(BUILD_EXTRA)
  775. install-exec-local: $(INSTALL_EXTRA)
  776. uninstall-hook: $(UNINSTALL_EXTRA)
  777. clean-local: $(CLEAN_EXTRA)
  778. .PHONY: dist-changelog
  779. dist-hook: dist-changelog
  780. dist-changelog:
  781. $(AM_V_at)if test ! -d '$(top_srcdir)/.git'; then \
  782. cp -f '$(top_srcdir)/ChangeLog' "$(top_distdir)/ChangeLog"; \
  783. elif git -C '$(top_srcdir)' log >.ChangeLog.tmp; then \
  784. mv -f .ChangeLog.tmp "$(top_distdir)/ChangeLog"; \
  785. else \
  786. rm -f .ChangeLog.tmp; exit 1; \
  787. fi