Makefile.am 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007
  1. # SPDX-License-Identifier: GPL-3.0-or-later
  2. AUTOMAKE_OPTIONS = foreign subdir-objects 1.11
  3. ACLOCAL_AMFLAGS = -I build/m4
  4. MAINTAINERCLEANFILES = \
  5. config.log config.status \
  6. $(srcdir)/Makefile.in \
  7. $(srcdir)/config.h.in $(srcdir)/config.h.in~ $(srcdir)/configure \
  8. $(srcdir)/install-sh $(srcdir)/ltmain.sh $(srcdir)/missing \
  9. $(srcdir)/compile $(srcdir)/depcomp $(srcdir)/aclocal.m4 \
  10. $(srcdir)/config.guess $(srcdir)/config.sub \
  11. $(srcdir)/m4/ltsugar.m4 $(srcdir)/m4/libtool.m4 \
  12. $(srcdir)/m4/ltversion.m4 $(srcdir)/m4/lt~obsolete.m4 \
  13. $(srcdir)/m4/ltoptions.m4 \
  14. $(srcdir)/pkcs11-helper.spec $(srcdir)/config-w32-vc.h
  15. CLEANFILES = \
  16. $(srcdir)/$(distdir).tar.gz
  17. EXTRA_DIST = \
  18. .gitignore \
  19. .csslintrc \
  20. .eslintignore \
  21. .eslintrc \
  22. .github/CODEOWNERS \
  23. build/m4/jemalloc.m4 \
  24. build/m4/ax_c___atomic.m4 \
  25. build/m4/ax_check_enable_debug.m4 \
  26. build/m4/ax_c_mallinfo.m4 \
  27. build/m4/ax_gcc_func_attribute.m4 \
  28. build/m4/ax_check_compile_flag.m4 \
  29. build/m4/ax_c_statement_expressions.m4 \
  30. build/m4/ax_pthread.m4 \
  31. build/m4/ax_c_lto.m4 \
  32. build/m4/ax_c_mallopt.m4 \
  33. build/m4/tcmalloc.m4 \
  34. build/m4/ax_c__generic.m4 \
  35. README.md \
  36. CONTRIBUTORS.md \
  37. CODE_OF_CONDUCT.md \
  38. LICENSE \
  39. REDISTRIBUTED.md \
  40. CONTRIBUTING.md \
  41. $(NULL)
  42. SUBDIRS = \
  43. diagrams \
  44. system \
  45. tests \
  46. $(NULL)
  47. dist_noinst_DATA = \
  48. CHANGELOG.md \
  49. cppcheck.sh \
  50. configs.signatures \
  51. contrib \
  52. netdata.cppcheck \
  53. netdata.spec \
  54. package.json \
  55. docs \
  56. packaging/version \
  57. packaging/dashboard.version \
  58. packaging/dashboard.checksums \
  59. packaging/go.d.version \
  60. packaging/go.d.checksums \
  61. packaging/jsonc.version \
  62. packaging/jsonc.checksums \
  63. packaging/judy.version \
  64. packaging/judy.checksums \
  65. packaging/libwebsockets.version \
  66. packaging/libwebsockets.checksums \
  67. packaging/mosquitto.version \
  68. packaging/mosquitto.checksums \
  69. packaging/bundle-dashboard.sh \
  70. packaging/bundle-ebpf.sh \
  71. packaging/bundle-judy.sh \
  72. packaging/bundle-libbpf.sh \
  73. packaging/bundle-mosquitto.sh \
  74. packaging/check-kernel-config.sh \
  75. packaging/libbpf.checksums \
  76. packaging/libbpf.version \
  77. packaging/ebpf.checksums \
  78. packaging/ebpf.version \
  79. packaging/bundle-lws.sh \
  80. packaging/installer/README.md \
  81. packaging/installer/UNINSTALL.md \
  82. packaging/installer/UPDATE.md \
  83. $(NULL)
  84. # until integrated within build
  85. # should be proper init.d/openrc/systemd usable
  86. dist_noinst_SCRIPTS = \
  87. coverity-scan.sh \
  88. packaging/installer/netdata-updater.sh \
  89. packaging/installer/netdata-uninstaller.sh \
  90. packaging/installer/kickstart.sh \
  91. packaging/installer/kickstart-static64.sh \
  92. packaging/installer/functions.sh \
  93. netdata-installer.sh
  94. $(NULL)
  95. # -----------------------------------------------------------------------------
  96. # Compile netdata binaries
  97. SUBDIRS += \
  98. backends \
  99. collectors \
  100. daemon \
  101. database \
  102. exporting \
  103. health \
  104. libnetdata \
  105. registry \
  106. streaming \
  107. web \
  108. claim \
  109. parser \
  110. aclk \
  111. spawn \
  112. $(NULL)
  113. AM_CFLAGS = \
  114. $(OPTIONAL_MATH_CFLAGS) \
  115. $(OPTIONAL_NFACCT_CFLAGS) \
  116. $(OPTIONAL_ZLIB_CFLAGS) \
  117. $(OPTIONAL_UUID_CFLAGS) \
  118. $(OPTIONAL_MQTT_CFLAGS) \
  119. $(OPTIONAL_LIBCAP_LIBS) \
  120. $(OPTIONAL_IPMIMONITORING_CFLAGS) \
  121. $(OPTIONAL_CUPS_CFLAGS) \
  122. $(OPTIONAL_XENSTAT_CFLAGS) \
  123. $(OPTIONAL_BPF_CFLAGS) \
  124. $(NULL)
  125. sbin_PROGRAMS =
  126. plugins_PROGRAMS =
  127. LIBNETDATA_FILES = \
  128. libnetdata/adaptive_resortable_list/adaptive_resortable_list.c \
  129. libnetdata/adaptive_resortable_list/adaptive_resortable_list.h \
  130. libnetdata/config/appconfig.c \
  131. libnetdata/config/appconfig.h \
  132. libnetdata/avl/avl.c \
  133. libnetdata/avl/avl.h \
  134. libnetdata/buffer/buffer.c \
  135. libnetdata/buffer/buffer.h \
  136. libnetdata/circular_buffer/circular_buffer.c \
  137. libnetdata/circular_buffer/circular_buffer.h \
  138. libnetdata/clocks/clocks.c \
  139. libnetdata/clocks/clocks.h \
  140. libnetdata/dictionary/dictionary.c \
  141. libnetdata/dictionary/dictionary.h \
  142. libnetdata/eval/eval.c \
  143. libnetdata/eval/eval.h \
  144. libnetdata/inlined.h \
  145. libnetdata/libnetdata.c \
  146. libnetdata/libnetdata.h \
  147. libnetdata/required_dummies.h \
  148. libnetdata/locks/locks.c \
  149. libnetdata/locks/locks.h \
  150. libnetdata/log/log.c \
  151. libnetdata/log/log.h \
  152. libnetdata/popen/popen.c \
  153. libnetdata/popen/popen.h \
  154. libnetdata/procfile/procfile.c \
  155. libnetdata/procfile/procfile.h \
  156. libnetdata/os.c \
  157. libnetdata/os.h \
  158. libnetdata/simple_pattern/simple_pattern.c \
  159. libnetdata/simple_pattern/simple_pattern.h \
  160. libnetdata/socket/socket.c \
  161. libnetdata/socket/socket.h \
  162. libnetdata/socket/security.c \
  163. libnetdata/socket/security.h \
  164. libnetdata/statistical/statistical.c \
  165. libnetdata/statistical/statistical.h \
  166. libnetdata/storage_number/storage_number.c \
  167. libnetdata/storage_number/storage_number.h \
  168. libnetdata/threads/threads.c \
  169. libnetdata/threads/threads.h \
  170. libnetdata/url/url.c \
  171. libnetdata/url/url.h \
  172. libnetdata/json/json.c \
  173. libnetdata/json/json.h \
  174. libnetdata/json/jsmn.c \
  175. libnetdata/json/jsmn.h \
  176. libnetdata/health/health.c \
  177. libnetdata/health/health.h \
  178. libnetdata/string/utf8.h \
  179. $(NULL)
  180. if ENABLE_PLUGIN_EBPF
  181. LIBNETDATA_FILES += \
  182. libnetdata/ebpf/ebpf.c \
  183. libnetdata/ebpf/ebpf.h \
  184. $(NULL)
  185. endif
  186. APPS_PLUGIN_FILES = \
  187. collectors/apps.plugin/apps_plugin.c \
  188. $(LIBNETDATA_FILES) \
  189. $(NULL)
  190. CHECKS_PLUGIN_FILES = \
  191. collectors/checks.plugin/plugin_checks.c \
  192. collectors/checks.plugin/plugin_checks.h \
  193. $(NULL)
  194. FREEBSD_PLUGIN_FILES = \
  195. collectors/freebsd.plugin/plugin_freebsd.c \
  196. collectors/freebsd.plugin/plugin_freebsd.h \
  197. collectors/freebsd.plugin/freebsd_sysctl.c \
  198. collectors/freebsd.plugin/freebsd_getmntinfo.c \
  199. collectors/freebsd.plugin/freebsd_getifaddrs.c \
  200. collectors/freebsd.plugin/freebsd_devstat.c \
  201. collectors/freebsd.plugin/freebsd_kstat_zfs.c \
  202. collectors/freebsd.plugin/freebsd_ipfw.c \
  203. collectors/proc.plugin/zfs_common.c \
  204. collectors/proc.plugin/zfs_common.h \
  205. $(NULL)
  206. HEALTH_PLUGIN_FILES = \
  207. health/health.c \
  208. health/health.h \
  209. health/health_config.c \
  210. health/health_json.c \
  211. health/health_log.c \
  212. $(NULL)
  213. IDLEJITTER_PLUGIN_FILES = \
  214. collectors/idlejitter.plugin/plugin_idlejitter.c \
  215. collectors/idlejitter.plugin/plugin_idlejitter.h \
  216. $(NULL)
  217. CGROUPS_PLUGIN_FILES = \
  218. collectors/cgroups.plugin/sys_fs_cgroup.c \
  219. collectors/cgroups.plugin/sys_fs_cgroup.h \
  220. $(NULL)
  221. CGROUP_NETWORK_FILES = \
  222. collectors/cgroups.plugin/cgroup-network.c \
  223. $(LIBNETDATA_FILES) \
  224. $(NULL)
  225. DISKSPACE_PLUGIN_FILES = \
  226. collectors/diskspace.plugin/plugin_diskspace.h \
  227. collectors/diskspace.plugin/plugin_diskspace.c \
  228. $(NULL)
  229. FREEIPMI_PLUGIN_FILES = \
  230. collectors/freeipmi.plugin/freeipmi_plugin.c \
  231. $(LIBNETDATA_FILES) \
  232. $(NULL)
  233. CUPS_PLUGIN_FILES = \
  234. collectors/cups.plugin/cups_plugin.c \
  235. $(LIBNETDATA_FILES) \
  236. $(NULL)
  237. NFACCT_PLUGIN_FILES = \
  238. collectors/nfacct.plugin/plugin_nfacct.c \
  239. $(LIBNETDATA_FILES) \
  240. $(NULL)
  241. SLABINFO_PLUGIN_FILES = \
  242. collectors/slabinfo.plugin/slabinfo.c \
  243. $(LIBNETDATA_FILES) \
  244. $(NULL)
  245. XENSTAT_PLUGIN_FILES = \
  246. collectors/xenstat.plugin/xenstat_plugin.c \
  247. $(LIBNETDATA_FILES) \
  248. $(NULL)
  249. PERF_PLUGIN_FILES = \
  250. collectors/perf.plugin/perf_plugin.c \
  251. $(LIBNETDATA_FILES) \
  252. $(NULL)
  253. EBPF_PLUGIN_FILES = \
  254. collectors/ebpf.plugin/ebpf.c \
  255. collectors/ebpf.plugin/ebpf_process.c \
  256. collectors/ebpf.plugin/ebpf_process.h \
  257. collectors/ebpf.plugin/ebpf_socket.c \
  258. collectors/ebpf.plugin/ebpf_socket.h \
  259. collectors/ebpf.plugin/ebpf.h \
  260. collectors/ebpf.plugin/ebpf_apps.c \
  261. collectors/ebpf.plugin/ebpf_apps.h \
  262. $(LIBNETDATA_FILES) \
  263. $(NULL)
  264. PROC_PLUGIN_FILES = \
  265. collectors/proc.plugin/ipc.c \
  266. collectors/proc.plugin/plugin_proc.c \
  267. collectors/proc.plugin/plugin_proc.h \
  268. collectors/proc.plugin/proc_diskstats.c \
  269. collectors/proc.plugin/proc_mdstat.c \
  270. collectors/proc.plugin/proc_interrupts.c \
  271. collectors/proc.plugin/proc_softirqs.c \
  272. collectors/proc.plugin/proc_loadavg.c \
  273. collectors/proc.plugin/proc_meminfo.c \
  274. collectors/proc.plugin/proc_pagetypeinfo.c \
  275. collectors/proc.plugin/proc_pressure.c \
  276. collectors/proc.plugin/proc_pressure.h \
  277. collectors/proc.plugin/proc_net_dev.c \
  278. collectors/proc.plugin/proc_net_wireless.c \
  279. collectors/proc.plugin/proc_net_ip_vs_stats.c \
  280. collectors/proc.plugin/proc_net_netstat.c \
  281. collectors/proc.plugin/proc_net_rpc_nfs.c \
  282. collectors/proc.plugin/proc_net_rpc_nfsd.c \
  283. collectors/proc.plugin/proc_net_snmp.c \
  284. collectors/proc.plugin/proc_net_snmp6.c \
  285. collectors/proc.plugin/proc_net_sctp_snmp.c \
  286. collectors/proc.plugin/proc_net_sockstat.c \
  287. collectors/proc.plugin/proc_net_sockstat6.c \
  288. collectors/proc.plugin/proc_net_softnet_stat.c \
  289. collectors/proc.plugin/proc_net_stat_conntrack.c \
  290. collectors/proc.plugin/proc_net_stat_synproxy.c \
  291. collectors/proc.plugin/proc_self_mountinfo.c \
  292. collectors/proc.plugin/proc_self_mountinfo.h \
  293. collectors/proc.plugin/zfs_common.c \
  294. collectors/proc.plugin/zfs_common.h \
  295. collectors/proc.plugin/proc_spl_kstat_zfs.c \
  296. collectors/proc.plugin/proc_stat.c \
  297. collectors/proc.plugin/proc_sys_kernel_random_entropy_avail.c \
  298. collectors/proc.plugin/proc_vmstat.c \
  299. collectors/proc.plugin/proc_uptime.c \
  300. collectors/proc.plugin/sys_kernel_mm_ksm.c \
  301. collectors/proc.plugin/sys_block_zram.c \
  302. collectors/proc.plugin/sys_devices_system_edac_mc.c \
  303. collectors/proc.plugin/sys_devices_system_node.c \
  304. collectors/proc.plugin/sys_fs_btrfs.c \
  305. collectors/proc.plugin/sys_class_power_supply.c \
  306. collectors/proc.plugin/sys_class_infiniband.c \
  307. $(NULL)
  308. TC_PLUGIN_FILES = \
  309. collectors/tc.plugin/plugin_tc.c \
  310. collectors/tc.plugin/plugin_tc.h \
  311. $(NULL)
  312. MACOS_PLUGIN_FILES = \
  313. collectors/macos.plugin/plugin_macos.c \
  314. collectors/macos.plugin/plugin_macos.h \
  315. collectors/macos.plugin/macos_sysctl.c \
  316. collectors/macos.plugin/macos_mach_smi.c \
  317. collectors/macos.plugin/macos_fw.c \
  318. $(NULL)
  319. PLUGINSD_PLUGIN_FILES = \
  320. collectors/plugins.d/plugins_d.c \
  321. collectors/plugins.d/plugins_d.h \
  322. collectors/plugins.d/pluginsd_parser.c \
  323. collectors/plugins.d/pluginsd_parser.h \
  324. $(NULL)
  325. RRD_PLUGIN_FILES = \
  326. database/rrdcalc.c \
  327. database/rrdcalc.h \
  328. database/rrdcalctemplate.c \
  329. database/rrdcalctemplate.h \
  330. database/rrddim.c \
  331. database/rrddimvar.c \
  332. database/rrddimvar.h \
  333. database/rrdfamily.c \
  334. database/rrdhost.c \
  335. database/rrd.c \
  336. database/rrd.h \
  337. database/rrdset.c \
  338. database/rrdsetvar.c \
  339. database/rrdsetvar.h \
  340. database/rrdvar.c \
  341. database/rrdvar.h \
  342. $(NULL)
  343. if ENABLE_DBENGINE
  344. RRD_PLUGIN_FILES += \
  345. database/engine/rrdengine.c \
  346. database/engine/rrdengine.h \
  347. database/engine/rrddiskprotocol.h \
  348. database/engine/datafile.c \
  349. database/engine/datafile.h \
  350. database/engine/journalfile.c \
  351. database/engine/journalfile.h \
  352. database/engine/rrdenginelib.c \
  353. database/engine/rrdenginelib.h \
  354. database/engine/rrdengineapi.c \
  355. database/engine/rrdengineapi.h \
  356. database/engine/pagecache.c \
  357. database/engine/pagecache.h \
  358. database/engine/rrdenglocking.c \
  359. database/engine/rrdenglocking.h \
  360. database/engine/metadata_log/metadatalog.c \
  361. database/engine/metadata_log/metadatalog.h \
  362. database/engine/metadata_log/metadatalogapi.c \
  363. database/engine/metadata_log/metadatalogapi.h \
  364. database/engine/metadata_log/logfile.h \
  365. database/engine/metadata_log/logfile.c \
  366. database/engine/metadata_log/metadatalogprotocol.h \
  367. database/engine/metadata_log/metalogpluginsd.c \
  368. database/engine/metadata_log/metalogpluginsd.h \
  369. database/engine/metadata_log/compaction.c \
  370. database/engine/metadata_log/compaction.h \
  371. database/engine/global_uuid_map/global_uuid_map.c \
  372. database/engine/global_uuid_map/global_uuid_map.h \
  373. $(NULL)
  374. endif
  375. API_PLUGIN_FILES = \
  376. web/api/badges/web_buffer_svg.c \
  377. web/api/badges/web_buffer_svg.h \
  378. web/api/exporters/allmetrics.c \
  379. web/api/exporters/allmetrics.h \
  380. web/api/exporters/shell/allmetrics_shell.c \
  381. web/api/exporters/shell/allmetrics_shell.h \
  382. web/api/queries/average/average.c \
  383. web/api/queries/average/average.h \
  384. web/api/queries/des/des.c \
  385. web/api/queries/des/des.h \
  386. web/api/queries/incremental_sum/incremental_sum.c \
  387. web/api/queries/incremental_sum/incremental_sum.h \
  388. web/api/queries/max/max.c \
  389. web/api/queries/max/max.h \
  390. web/api/queries/median/median.c \
  391. web/api/queries/median/median.h \
  392. web/api/queries/min/min.c \
  393. web/api/queries/min/min.h \
  394. web/api/queries/query.c \
  395. web/api/queries/query.h \
  396. web/api/queries/rrdr.c \
  397. web/api/queries/rrdr.h \
  398. web/api/queries/ses/ses.c \
  399. web/api/queries/ses/ses.h \
  400. web/api/queries/stddev/stddev.c \
  401. web/api/queries/stddev/stddev.h \
  402. web/api/queries/sum/sum.c \
  403. web/api/queries/sum/sum.h \
  404. web/api/formatters/rrd2json.c \
  405. web/api/formatters/rrd2json.h \
  406. web/api/formatters/csv/csv.c \
  407. web/api/formatters/csv/csv.h \
  408. web/api/formatters/json/json.c \
  409. web/api/formatters/json/json.h \
  410. web/api/formatters/ssv/ssv.c \
  411. web/api/formatters/ssv/ssv.h \
  412. web/api/formatters/value/value.c \
  413. web/api/formatters/value/value.h \
  414. web/api/formatters/json_wrapper.c \
  415. web/api/formatters/json_wrapper.h \
  416. web/api/formatters/charts2json.c \
  417. web/api/formatters/charts2json.h \
  418. web/api/formatters/rrdset2json.c \
  419. web/api/formatters/rrdset2json.h \
  420. web/api/health/health_cmdapi.c \
  421. web/api/health/health_cmdapi.h \
  422. web/api/web_api_v1.c \
  423. web/api/web_api_v1.h \
  424. $(NULL)
  425. STREAMING_PLUGIN_FILES = \
  426. streaming/rrdpush.c \
  427. streaming/sender.c \
  428. streaming/receiver.c \
  429. streaming/rrdpush.h \
  430. $(NULL)
  431. REGISTRY_PLUGIN_FILES = \
  432. registry/registry.c \
  433. registry/registry.h \
  434. registry/registry_db.c \
  435. registry/registry_init.c \
  436. registry/registry_internals.c \
  437. registry/registry_internals.h \
  438. registry/registry_log.c \
  439. registry/registry_machine.c \
  440. registry/registry_machine.h \
  441. registry/registry_person.c \
  442. registry/registry_person.h \
  443. registry/registry_url.c \
  444. registry/registry_url.h \
  445. $(NULL)
  446. STATSD_PLUGIN_FILES = \
  447. collectors/statsd.plugin/statsd.c \
  448. collectors/statsd.plugin/statsd.h \
  449. $(NULL)
  450. WEB_PLUGIN_FILES = \
  451. web/server/web_client.c \
  452. web/server/web_client.h \
  453. web/server/web_server.c \
  454. web/server/web_server.h \
  455. web/server/web_client_cache.c \
  456. web/server/web_client_cache.h \
  457. web/server/static/static-threaded.c \
  458. web/server/static/static-threaded.h \
  459. $(NULL)
  460. BACKENDS_PLUGIN_FILES = \
  461. backends/backends.c \
  462. backends/backends.h \
  463. backends/graphite/graphite.c \
  464. backends/graphite/graphite.h \
  465. backends/json/json.c \
  466. backends/json/json.h \
  467. backends/opentsdb/opentsdb.c \
  468. backends/opentsdb/opentsdb.h \
  469. backends/prometheus/backend_prometheus.c \
  470. backends/prometheus/backend_prometheus.h \
  471. $(NULL)
  472. CLAIM_FILES = \
  473. claim/claim.c \
  474. claim/claim.h \
  475. $(NULL)
  476. PARSER_FILES = \
  477. parser/parser.c \
  478. parser/parser.h \
  479. $(NULL)
  480. ACLK_FILES = \
  481. aclk/aclk_common.c \
  482. aclk/aclk_common.h \
  483. aclk/aclk_stats.c \
  484. aclk/aclk_stats.h
  485. $(NULL)
  486. if ENABLE_ACLK
  487. ACLK_FILES += \
  488. aclk/agent_cloud_link.c \
  489. aclk/agent_cloud_link.h \
  490. aclk/aclk_query.c \
  491. aclk/aclk_query.h \
  492. aclk/mqtt.c \
  493. aclk/mqtt.h \
  494. aclk/aclk_rx_msgs.c \
  495. aclk/aclk_rx_msgs.h \
  496. aclk/aclk_lws_wss_client.c \
  497. aclk/aclk_lws_wss_client.h \
  498. aclk/aclk_lws_https_client.c \
  499. aclk/aclk_lws_https_client.h \
  500. $(NULL)
  501. endif
  502. SPAWN_PLUGIN_FILES = \
  503. spawn/spawn.c \
  504. spawn/spawn_server.c \
  505. spawn/spawn_client.c \
  506. spawn/spawn.h \
  507. $(NULL)
  508. EXPORTING_ENGINE_FILES = \
  509. exporting/exporting_engine.c \
  510. exporting/exporting_engine.h \
  511. exporting/graphite/graphite.c \
  512. exporting/graphite/graphite.h \
  513. exporting/json/json.c \
  514. exporting/json/json.h \
  515. exporting/opentsdb/opentsdb.c \
  516. exporting/opentsdb/opentsdb.h \
  517. exporting/prometheus/prometheus.c \
  518. exporting/prometheus/prometheus.h \
  519. exporting/read_config.c \
  520. exporting/clean_connectors.c \
  521. exporting/init_connectors.c \
  522. exporting/process_data.c \
  523. exporting/check_filters.c \
  524. exporting/send_data.c \
  525. exporting/send_internal_metrics.c \
  526. $(NULL)
  527. PROMETHEUS_REMOTE_WRITE_EXPORTING_FILES = \
  528. exporting/prometheus/remote_write/remote_write.c \
  529. exporting/prometheus/remote_write/remote_write.h \
  530. exporting/prometheus/remote_write/remote_write_request.cc \
  531. exporting/prometheus/remote_write/remote_write_request.h \
  532. exporting/prometheus/remote_write/remote_write.proto \
  533. $(NULL)
  534. KINESIS_EXPORTING_FILES = \
  535. exporting/aws_kinesis/aws_kinesis.c \
  536. exporting/aws_kinesis/aws_kinesis.h \
  537. exporting/aws_kinesis/aws_kinesis_put_record.cc \
  538. exporting/aws_kinesis/aws_kinesis_put_record.h \
  539. $(NULL)
  540. PUBSUB_EXPORTING_FILES = \
  541. exporting/pubsub/pubsub.c \
  542. exporting/pubsub/pubsub.h \
  543. exporting/pubsub/pubsub_publish.cc \
  544. exporting/pubsub/pubsub_publish.h \
  545. $(NULL)
  546. MONGODB_EXPORTING_FILES = \
  547. exporting/mongodb/mongodb.c \
  548. exporting/mongodb/mongodb.h \
  549. $(NULL)
  550. KINESIS_BACKEND_FILES = \
  551. backends/aws_kinesis/aws_kinesis.c \
  552. backends/aws_kinesis/aws_kinesis.h \
  553. backends/aws_kinesis/aws_kinesis_put_record.cc \
  554. backends/aws_kinesis/aws_kinesis_put_record.h \
  555. $(NULL)
  556. PROMETHEUS_REMOTE_WRITE_BACKEND_FILES = \
  557. backends/prometheus/remote_write/remote_write.cc \
  558. backends/prometheus/remote_write/remote_write.h \
  559. $(NULL)
  560. MONGODB_BACKEND_FILES = \
  561. backends/mongodb/mongodb.c \
  562. backends/mongodb/mongodb.h \
  563. $(NULL)
  564. DAEMON_FILES = \
  565. daemon/buildinfo.c \
  566. daemon/buildinfo.h \
  567. daemon/common.c \
  568. daemon/common.h \
  569. daemon/daemon.c \
  570. daemon/daemon.h \
  571. daemon/global_statistics.c \
  572. daemon/global_statistics.h \
  573. daemon/main.c \
  574. daemon/main.h \
  575. daemon/signals.c \
  576. daemon/signals.h \
  577. daemon/commands.c \
  578. daemon/commands.h \
  579. daemon/unit_test.c \
  580. daemon/unit_test.h \
  581. $(NULL)
  582. NETDATA_FILES = \
  583. collectors/all.h \
  584. $(DAEMON_FILES) \
  585. $(LIBNETDATA_FILES) \
  586. $(API_PLUGIN_FILES) \
  587. $(BACKENDS_PLUGIN_FILES) \
  588. $(EXPORTING_ENGINE_FILES) \
  589. $(CHECKS_PLUGIN_FILES) \
  590. $(HEALTH_PLUGIN_FILES) \
  591. $(IDLEJITTER_PLUGIN_FILES) \
  592. $(PLUGINSD_PLUGIN_FILES) \
  593. $(REGISTRY_PLUGIN_FILES) \
  594. $(RRD_PLUGIN_FILES) \
  595. $(STREAMING_PLUGIN_FILES) \
  596. $(STATSD_PLUGIN_FILES) \
  597. $(WEB_PLUGIN_FILES) \
  598. $(CLAIM_FILES) \
  599. $(PARSER_FILES) \
  600. $(ACLK_FILES) \
  601. $(SPAWN_PLUGIN_FILES) \
  602. $(NULL)
  603. if FREEBSD
  604. NETDATA_FILES += \
  605. $(FREEBSD_PLUGIN_FILES) \
  606. $(NULL)
  607. endif
  608. if MACOS
  609. NETDATA_FILES += \
  610. $(MACOS_PLUGIN_FILES) \
  611. $(NULL)
  612. endif
  613. if LINUX
  614. NETDATA_FILES += \
  615. $(CGROUPS_PLUGIN_FILES) \
  616. $(DISKSPACE_PLUGIN_FILES) \
  617. $(PROC_PLUGIN_FILES) \
  618. $(TC_PLUGIN_FILES) \
  619. $(NULL)
  620. endif
  621. NETDATA_COMMON_LIBS = \
  622. $(OPTIONAL_MATH_LIBS) \
  623. $(OPTIONAL_BPF_LIBS) \
  624. $(OPTIONAL_ZLIB_LIBS) \
  625. $(OPTIONAL_SSL_LIBS) \
  626. $(OPTIONAL_UUID_LIBS) \
  627. $(OPTIONAL_MQTT_LIBS) \
  628. $(OPTIONAL_UV_LIBS) \
  629. $(OPTIONAL_LZ4_LIBS) \
  630. $(OPTIONAL_JUDY_LIBS) \
  631. $(OPTIONAL_SSL_LIBS) \
  632. $(OPTIONAL_JSONC_LIBS) \
  633. $(NULL)
  634. if LINK_STATIC_JSONC
  635. NETDATA_COMMON_LIBS += externaldeps/jsonc/libjson-c.a
  636. endif
  637. NETDATACLI_FILES = \
  638. daemon/commands.h \
  639. $(LIBNETDATA_FILES) \
  640. cli/cli.c \
  641. cli/cli.h \
  642. $(NULL)
  643. sbin_PROGRAMS += netdata
  644. netdata_SOURCES = $(NETDATA_FILES)
  645. if ENABLE_ACLK
  646. netdata_LDADD = \
  647. externaldeps/mosquitto/libmosquitto.a \
  648. $(OPTIONAL_LIBCAP_LIBS) \
  649. $(OPTIONAL_LWS_LIBS) \
  650. $(NETDATA_COMMON_LIBS) \
  651. $(NULL)
  652. else
  653. netdata_LDADD = \
  654. $(NETDATA_COMMON_LIBS) \
  655. $(NULL)
  656. endif
  657. if ENABLE_CXX_LINKER
  658. netdata_LINK = $(CXXLD) $(CXXFLAGS) $(LDFLAGS) -o $@
  659. else
  660. netdata_LINK = $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@
  661. endif
  662. sbin_PROGRAMS += netdatacli
  663. netdatacli_SOURCES = $(NETDATACLI_FILES)
  664. netdatacli_LDADD = \
  665. $(NETDATA_COMMON_LIBS) \
  666. $(NULL)
  667. if ENABLE_CXX_LINKER
  668. netdatacli_LINK = $(CXXLD) $(CXXFLAGS) $(LDFLAGS) -o $@
  669. else
  670. netdatacli_LINK = $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@
  671. endif
  672. if ENABLE_PLUGIN_APPS
  673. plugins_PROGRAMS += apps.plugin
  674. apps_plugin_SOURCES = $(APPS_PLUGIN_FILES)
  675. apps_plugin_LDADD = \
  676. $(NETDATA_COMMON_LIBS) \
  677. $(OPTIONAL_LIBCAP_LIBS) \
  678. $(NULL)
  679. endif
  680. if ENABLE_PLUGIN_CGROUP_NETWORK
  681. plugins_PROGRAMS += cgroup-network
  682. cgroup_network_SOURCES = $(CGROUP_NETWORK_FILES)
  683. cgroup_network_LDADD = \
  684. $(NETDATA_COMMON_LIBS) \
  685. $(NULL)
  686. endif
  687. if ENABLE_PLUGIN_FREEIPMI
  688. plugins_PROGRAMS += freeipmi.plugin
  689. freeipmi_plugin_SOURCES = $(FREEIPMI_PLUGIN_FILES)
  690. freeipmi_plugin_LDADD = \
  691. $(NETDATA_COMMON_LIBS) \
  692. $(OPTIONAL_IPMIMONITORING_LIBS) \
  693. $(NULL)
  694. endif
  695. if ENABLE_PLUGIN_EBPF
  696. plugins_PROGRAMS += ebpf.plugin
  697. ebpf_plugin_SOURCES = $(EBPF_PLUGIN_FILES)
  698. ebpf_plugin_LDADD = \
  699. $(NETDATA_COMMON_LIBS) \
  700. $(NULL)
  701. endif
  702. if ENABLE_PLUGIN_CUPS
  703. plugins_PROGRAMS += cups.plugin
  704. cups_plugin_SOURCES = $(CUPS_PLUGIN_FILES)
  705. cups_plugin_LDADD = \
  706. $(NETDATA_COMMON_LIBS) \
  707. $(OPTIONAL_CUPS_LIBS) \
  708. $(NULL)
  709. endif
  710. if ENABLE_PLUGIN_NFACCT
  711. plugins_PROGRAMS += nfacct.plugin
  712. nfacct_plugin_SOURCES = $(NFACCT_PLUGIN_FILES)
  713. nfacct_plugin_LDADD = \
  714. $(NETDATA_COMMON_LIBS) \
  715. $(OPTIONAL_NFACCT_LIBS) \
  716. $(NULL)
  717. endif
  718. if ENABLE_PLUGIN_XENSTAT
  719. plugins_PROGRAMS += xenstat.plugin
  720. xenstat_plugin_SOURCES = $(XENSTAT_PLUGIN_FILES)
  721. xenstat_plugin_LDADD = \
  722. $(NETDATA_COMMON_LIBS) \
  723. $(OPTIONAL_XENSTAT_LIBS) \
  724. $(NULL)
  725. endif
  726. if ENABLE_PLUGIN_PERF
  727. plugins_PROGRAMS += perf.plugin
  728. perf_plugin_SOURCES = $(PERF_PLUGIN_FILES)
  729. perf_plugin_LDADD = \
  730. $(NETDATA_COMMON_LIBS) \
  731. $(NULL)
  732. endif
  733. if ENABLE_PLUGIN_SLABINFO
  734. plugins_PROGRAMS += slabinfo.plugin
  735. slabinfo_plugin_SOURCES = $(SLABINFO_PLUGIN_FILES)
  736. slabinfo_plugin_LDADD = \
  737. $(NETDATA_COMMON_LIBS) \
  738. $(NULL)
  739. endif
  740. if ENABLE_BACKEND_KINESIS
  741. netdata_SOURCES += $(KINESIS_BACKEND_FILES) $(KINESIS_EXPORTING_FILES)
  742. netdata_LDADD += $(OPTIONAL_KINESIS_LIBS)
  743. endif
  744. if ENABLE_EXPORTING_PUBSUB
  745. netdata_SOURCES += $(PUBSUB_EXPORTING_FILES)
  746. netdata_LDADD += $(OPTIONAL_PUBSUB_LIBS)
  747. endif
  748. if ENABLE_BACKEND_PROMETHEUS_REMOTE_WRITE
  749. netdata_SOURCES += $(PROMETHEUS_REMOTE_WRITE_BACKEND_FILES) $(PROMETHEUS_REMOTE_WRITE_EXPORTING_FILES)
  750. netdata_LDADD += $(OPTIONAL_PROMETHEUS_REMOTE_WRITE_LIBS)
  751. BUILT_SOURCES = \
  752. exporting/prometheus/remote_write/remote_write.pb.cc \
  753. exporting/prometheus/remote_write/remote_write.pb.h \
  754. $(NULL)
  755. nodist_netdata_SOURCES = $(BUILT_SOURCES)
  756. exporting/prometheus/remote_write/remote_write.pb.cc \
  757. exporting/prometheus/remote_write/remote_write.pb.h: exporting/prometheus/remote_write/remote_write.proto
  758. $(PROTOC) --proto_path=$(srcdir) --cpp_out=$(builddir) $^
  759. endif
  760. if ENABLE_BACKEND_MONGODB
  761. netdata_SOURCES += $(MONGODB_BACKEND_FILES) $(MONGODB_EXPORTING_FILES)
  762. netdata_LDADD += $(OPTIONAL_MONGOC_LIBS)
  763. endif
  764. if ENABLE_UNITTESTS
  765. check_PROGRAMS = \
  766. libnetdata/tests/str2ld_testdriver \
  767. libnetdata/storage_number/tests/storage_number_testdriver \
  768. exporting/tests/exporting_engine_testdriver \
  769. web/api/tests/web_api_testdriver \
  770. web/api/tests/valid_urls_testdriver \
  771. $(NULL)
  772. TESTS = $(check_PROGRAMS)
  773. web_api_tests_valid_urls_testdriver_LDFLAGS = \
  774. -Wl,--wrap=rrdhost_find_by_hostname \
  775. -Wl,--wrap=finished_web_request_statistics \
  776. -Wl,--wrap=config_get \
  777. -Wl,--wrap=web_client_api_request_v1 \
  778. -Wl,--wrap=rrdhost_find_by_guid \
  779. -Wl,--wrap=rrdset_find_byname \
  780. -Wl,--wrap=rrdset_find \
  781. -Wl,--wrap=rrdpush_receiver_thread_spawn \
  782. -Wl,--wrap=debug_int \
  783. -Wl,--wrap=error_int \
  784. -Wl,--wrap=info_int \
  785. -Wl,--wrap=fatal_int \
  786. -Wl,--wrap=mysendfile \
  787. -DREMOVE_MYSENDFILE \
  788. $(TEST_LDFLAGS) \
  789. $(NULL)
  790. web_api_tests_valid_urls_testdriver_SOURCES = \
  791. web/api/tests/valid_urls.c \
  792. web/server/web_client.c \
  793. $(LIBNETDATA_FILES) \
  794. $(NULL)
  795. web_api_tests_valid_urls_testdriver_LDADD = $(NETDATA_COMMON_LIBS) $(TEST_LIBS)
  796. web_api_tests_web_api_testdriver_LDFLAGS = \
  797. -Wl,--wrap=rrdhost_find_by_hostname \
  798. -Wl,--wrap=finished_web_request_statistics \
  799. -Wl,--wrap=config_get \
  800. -Wl,--wrap=web_client_api_request_v1 \
  801. -Wl,--wrap=rrdhost_find_by_guid \
  802. -Wl,--wrap=rrdset_find_byname \
  803. -Wl,--wrap=rrdset_find \
  804. -Wl,--wrap=rrdpush_receiver_thread_spawn \
  805. -Wl,--wrap=debug_int \
  806. -Wl,--wrap=error_int \
  807. -Wl,--wrap=info_int \
  808. -Wl,--wrap=fatal_int \
  809. $(TEST_LDFLAGS) \
  810. $(NULL)
  811. web_api_tests_web_api_testdriver_SOURCES = \
  812. web/api/tests/web_api.c \
  813. web/server/web_client.c \
  814. $(LIBNETDATA_FILES) \
  815. $(NULL)
  816. web_api_tests_web_api_testdriver_LDADD = $(NETDATA_COMMON_LIBS) $(TEST_LIBS)
  817. libnetdata_tests_str2ld_testdriver_SOURCES = \
  818. libnetdata/tests/test_str2ld.c \
  819. $(LIBNETDATA_FILES) \
  820. $(NULL)
  821. libnetdata_tests_str2ld_testdriver_LDADD = $(NETDATA_COMMON_LIBS) $(TEST_LIBS)
  822. libnetdata_storage_number_tests_storage_number_testdriver_SOURCES = \
  823. libnetdata/storage_number/tests/test_storage_number.c \
  824. $(LIBNETDATA_FILES) \
  825. $(NULL)
  826. libnetdata_storage_number_tests_storage_number_testdriver_LDADD = $(NETDATA_COMMON_LIBS) $(TEST_LIBS)
  827. EXPORTING_ENGINE_TEST_FILES = \
  828. exporting/tests/test_exporting_engine.c \
  829. exporting/tests/test_exporting_engine.h \
  830. exporting/tests/exporting_fixtures.c \
  831. exporting/tests/exporting_doubles.c \
  832. exporting/tests/netdata_doubles.c \
  833. exporting/tests/system_doubles.c \
  834. $(NULL)
  835. exporting_tests_exporting_engine_testdriver_SOURCES = \
  836. $(EXPORTING_ENGINE_TEST_FILES) \
  837. $(EXPORTING_ENGINE_FILES) \
  838. $(LIBNETDATA_FILES) \
  839. $(NULL)
  840. exporting_tests_exporting_engine_testdriver_CFLAGS = \
  841. $(AM_CFLAGS) \
  842. -DUNIT_TESTING \
  843. $(NULL)
  844. exporting_tests_exporting_engine_testdriver_LDFLAGS = \
  845. -Wl,--wrap=read_exporting_config \
  846. -Wl,--wrap=init_connectors \
  847. -Wl,--wrap=mark_scheduled_instances \
  848. -Wl,--wrap=rrdhost_is_exportable \
  849. -Wl,--wrap=rrdset_is_exportable \
  850. -Wl,--wrap=exporting_calculate_value_from_stored_data \
  851. -Wl,--wrap=prepare_buffers \
  852. -Wl,--wrap=send_internal_metrics \
  853. -Wl,--wrap=now_realtime_sec \
  854. -Wl,--wrap=uv_thread_set_name_np \
  855. -Wl,--wrap=uv_thread_create \
  856. -Wl,--wrap=uv_mutex_lock \
  857. -Wl,--wrap=uv_mutex_unlock \
  858. -Wl,--wrap=uv_cond_signal \
  859. -Wl,--wrap=uv_cond_wait \
  860. -Wl,--wrap=strdupz \
  861. -Wl,--wrap=info_int \
  862. -Wl,--wrap=recv \
  863. -Wl,--wrap=send \
  864. -Wl,--wrap=connect_to_one_of \
  865. -Wl,--wrap=create_main_rusage_chart \
  866. -Wl,--wrap=send_main_rusage \
  867. $(TEST_LDFLAGS) \
  868. $(NULL)
  869. exporting_tests_exporting_engine_testdriver_LDADD = $(NETDATA_COMMON_LIBS) $(TEST_LIBS)
  870. if ENABLE_BACKEND_PROMETHEUS_REMOTE_WRITE
  871. exporting_tests_exporting_engine_testdriver_SOURCES += $(PROMETHEUS_REMOTE_WRITE_EXPORTING_FILES)
  872. exporting_tests_exporting_engine_testdriver_LDADD += $(OPTIONAL_PROMETHEUS_REMOTE_WRITE_LIBS)
  873. exporting_tests_exporting_engine_testdriver_LDFLAGS += \
  874. -Wl,--wrap=init_write_request \
  875. -Wl,--wrap=add_host_info \
  876. -Wl,--wrap=add_label \
  877. -Wl,--wrap=add_metric \
  878. $(NULL)
  879. nodist_exporting_tests_exporting_engine_testdriver_SOURCES = $(BUILT_SOURCES)
  880. endif
  881. if ENABLE_BACKEND_KINESIS
  882. exporting_tests_exporting_engine_testdriver_SOURCES += $(KINESIS_EXPORTING_FILES)
  883. exporting_tests_exporting_engine_testdriver_LDADD += $(OPTIONAL_KINESIS_LIBS)
  884. exporting_tests_exporting_engine_testdriver_LDFLAGS += \
  885. -Wl,--wrap=aws_sdk_init \
  886. -Wl,--wrap=kinesis_init \
  887. -Wl,--wrap=kinesis_put_record \
  888. -Wl,--wrap=kinesis_get_result \
  889. $(NULL)
  890. endif
  891. if ENABLE_EXPORTING_PUBSUB
  892. exporting_tests_exporting_engine_testdriver_SOURCES += $(PUBSUB_EXPORTING_FILES)
  893. exporting_tests_exporting_engine_testdriver_LDADD += $(OPTIONAL_PUBSUB_LIBS)
  894. exporting_tests_exporting_engine_testdriver_LDFLAGS += \
  895. -Wl,--wrap=pubsub_init \
  896. -Wl,--wrap=pubsub_add_message \
  897. -Wl,--wrap=pubsub_publish \
  898. -Wl,--wrap=pubsub_get_result \
  899. $(NULL)
  900. endif
  901. if ENABLE_BACKEND_MONGODB
  902. exporting_tests_exporting_engine_testdriver_SOURCES += $(MONGODB_EXPORTING_FILES)
  903. exporting_tests_exporting_engine_testdriver_LDADD += $(OPTIONAL_MONGOC_LIBS)
  904. exporting_tests_exporting_engine_testdriver_LDFLAGS += \
  905. -Wl,--wrap=mongoc_init \
  906. -Wl,--wrap=mongoc_uri_new_with_error \
  907. -Wl,--wrap=mongoc_uri_get_option_as_int32 \
  908. -Wl,--wrap=mongoc_uri_set_option_as_int32 \
  909. -Wl,--wrap=mongoc_client_new_from_uri \
  910. -Wl,--wrap=mongoc_client_set_appname \
  911. -Wl,--wrap=mongoc_client_get_collection \
  912. -Wl,--wrap=mongoc_uri_destroy \
  913. -Wl,--wrap=mongoc_collection_insert_many \
  914. $(NULL)
  915. endif
  916. endif