Makefile.am 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533
  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. .codacy.yml \
  20. .codeclimate.yml \
  21. .csslintrc \
  22. .eslintignore \
  23. .eslintrc \
  24. .lgtm.yml \
  25. .travis \
  26. .github/CODEOWNERS \
  27. build/m4/jemalloc.m4 \
  28. build/m4/ax_c___atomic.m4 \
  29. build/m4/ax_check_enable_debug.m4 \
  30. build/m4/ax_c_mallinfo.m4 \
  31. build/m4/ax_gcc_func_attribute.m4 \
  32. build/m4/ax_check_compile_flag.m4 \
  33. build/m4/ax_c_statement_expressions.m4 \
  34. build/m4/ax_pthread.m4 \
  35. build/m4/ax_c_lto.m4 \
  36. build/m4/ax_c_mallopt.m4 \
  37. build/m4/tcmalloc.m4 \
  38. build/m4/ax_c__generic.m4 \
  39. README.md \
  40. CONTRIBUTORS.md \
  41. CODE_OF_CONDUCT.md \
  42. LICENSE \
  43. REDISTRIBUTED.md \
  44. CONTRIBUTING.md \
  45. $(NULL)
  46. SUBDIRS = \
  47. diagrams \
  48. system \
  49. tests \
  50. $(NULL)
  51. dist_noinst_DATA= \
  52. cppcheck.sh \
  53. configs.signatures \
  54. contrib \
  55. netdata.cppcheck \
  56. netdata.spec \
  57. package.json \
  58. docs \
  59. packaging/version \
  60. packaging/go.d.checksums \
  61. packaging/installer/README.md \
  62. packaging/installer/UNINSTALL.md \
  63. packaging/installer/UPDATE.md \
  64. netlify.toml \
  65. $(NULL)
  66. # until integrated within build
  67. # should be proper init.d/openrc/systemd usable
  68. dist_noinst_SCRIPTS= \
  69. coverity-scan.sh \
  70. coverity-install.sh \
  71. packaging/installer/netdata-updater.sh \
  72. packaging/installer/netdata-uninstaller.sh \
  73. packaging/installer/kickstart.sh \
  74. packaging/installer/kickstart-static64.sh \
  75. packaging/installer/functions.sh \
  76. netdata-installer.sh \
  77. docs/generator/buildhtml.sh \
  78. docs/generator/buildyaml.sh \
  79. docs/generator/checklinks.sh \
  80. docs/generator/requirements.txt \
  81. docs/generator/runtime.txt \
  82. $(NULL)
  83. # -----------------------------------------------------------------------------
  84. # Compile netdata binaries
  85. SUBDIRS += \
  86. backends \
  87. collectors \
  88. daemon \
  89. database \
  90. health \
  91. libnetdata \
  92. registry \
  93. streaming \
  94. web \
  95. $(NULL)
  96. AM_CFLAGS = \
  97. $(OPTIONAL_MATH_CFLAGS) \
  98. $(OPTIONAL_NFACCT_CLFAGS) \
  99. $(OPTIONAL_ZLIB_CFLAGS) \
  100. $(OPTIONAL_UUID_CFLAGS) \
  101. $(OPTIONAL_LIBCAP_LIBS) \
  102. $(OPTIONAL_IPMIMONITORING_CFLAGS) \
  103. $(OPTIONAL_CUPS_CFLAGS) \
  104. $(OPTIONAL_XENSTAT_CFLAGS) \
  105. $(NULL)
  106. sbin_PROGRAMS =
  107. dist_cache_DATA = packaging/installer/.keep
  108. dist_varlib_DATA = packaging/installer/.keep
  109. dist_registry_DATA = packaging/installer/.keep
  110. dist_log_DATA = packaging/installer/.keep
  111. plugins_PROGRAMS =
  112. LIBNETDATA_FILES = \
  113. libnetdata/adaptive_resortable_list/adaptive_resortable_list.c \
  114. libnetdata/adaptive_resortable_list/adaptive_resortable_list.h \
  115. libnetdata/config/appconfig.c \
  116. libnetdata/config/appconfig.h \
  117. libnetdata/avl/avl.c \
  118. libnetdata/avl/avl.h \
  119. libnetdata/buffer/buffer.c \
  120. libnetdata/buffer/buffer.h \
  121. libnetdata/clocks/clocks.c \
  122. libnetdata/clocks/clocks.h \
  123. libnetdata/dictionary/dictionary.c \
  124. libnetdata/dictionary/dictionary.h \
  125. libnetdata/eval/eval.c \
  126. libnetdata/eval/eval.h \
  127. libnetdata/inlined.h \
  128. libnetdata/libnetdata.c \
  129. libnetdata/libnetdata.h \
  130. libnetdata/locks/locks.c \
  131. libnetdata/locks/locks.h \
  132. libnetdata/log/log.c \
  133. libnetdata/log/log.h \
  134. libnetdata/popen/popen.c \
  135. libnetdata/popen/popen.h \
  136. libnetdata/procfile/procfile.c \
  137. libnetdata/procfile/procfile.h \
  138. libnetdata/os.c \
  139. libnetdata/os.h \
  140. libnetdata/simple_pattern/simple_pattern.c \
  141. libnetdata/simple_pattern/simple_pattern.h \
  142. libnetdata/socket/socket.c \
  143. libnetdata/socket/socket.h \
  144. libnetdata/statistical/statistical.c \
  145. libnetdata/statistical/statistical.h \
  146. libnetdata/storage_number/storage_number.c \
  147. libnetdata/storage_number/storage_number.h \
  148. libnetdata/threads/threads.c \
  149. libnetdata/threads/threads.h \
  150. libnetdata/url/url.c \
  151. libnetdata/url/url.h \
  152. $(NULL)
  153. APPS_PLUGIN_FILES = \
  154. collectors/apps.plugin/apps_plugin.c \
  155. $(LIBNETDATA_FILES) \
  156. $(NULL)
  157. CHECKS_PLUGIN_FILES = \
  158. collectors/checks.plugin/plugin_checks.c \
  159. collectors/checks.plugin/plugin_checks.h \
  160. $(NULL)
  161. FREEBSD_PLUGIN_FILES = \
  162. collectors/freebsd.plugin/plugin_freebsd.c \
  163. collectors/freebsd.plugin/plugin_freebsd.h \
  164. collectors/freebsd.plugin/freebsd_sysctl.c \
  165. collectors/freebsd.plugin/freebsd_getmntinfo.c \
  166. collectors/freebsd.plugin/freebsd_getifaddrs.c \
  167. collectors/freebsd.plugin/freebsd_devstat.c \
  168. collectors/freebsd.plugin/freebsd_kstat_zfs.c \
  169. collectors/freebsd.plugin/freebsd_ipfw.c \
  170. collectors/proc.plugin/zfs_common.c \
  171. collectors/proc.plugin/zfs_common.h \
  172. $(NULL)
  173. HEALTH_PLUGIN_FILES = \
  174. health/health.c \
  175. health/health.h \
  176. health/health_config.c \
  177. health/health_json.c \
  178. health/health_log.c \
  179. $(NULL)
  180. IDLEJITTER_PLUGIN_FILES = \
  181. collectors/idlejitter.plugin/plugin_idlejitter.c \
  182. collectors/idlejitter.plugin/plugin_idlejitter.h \
  183. $(NULL)
  184. CGROUPS_PLUGIN_FILES = \
  185. collectors/cgroups.plugin/sys_fs_cgroup.c \
  186. collectors/cgroups.plugin/sys_fs_cgroup.h \
  187. $(NULL)
  188. CGROUP_NETWORK_FILES = \
  189. collectors/cgroups.plugin/cgroup-network.c \
  190. $(LIBNETDATA_FILES) \
  191. $(NULL)
  192. DISKSPACE_PLUGIN_FILES = \
  193. collectors/diskspace.plugin/plugin_diskspace.h \
  194. collectors/diskspace.plugin/plugin_diskspace.c \
  195. $(NULL)
  196. FREEIPMI_PLUGIN_FILES = \
  197. collectors/freeipmi.plugin/freeipmi_plugin.c \
  198. $(LIBNETDATA_FILES) \
  199. $(NULL)
  200. CUPS_PLUGIN_FILES = \
  201. collectors/cups.plugin/cups_plugin.c \
  202. $(LIBNETDATA_FILES) \
  203. $(NULL)
  204. NFACCT_PLUGIN_FILES = \
  205. collectors/nfacct.plugin/plugin_nfacct.c \
  206. $(LIBNETDATA_FILES) \
  207. $(NULL)
  208. XENSTAT_PLUGIN_FILES = \
  209. collectors/xenstat.plugin/xenstat_plugin.c \
  210. $(LIBNETDATA_FILES) \
  211. $(NULL)
  212. PROC_PLUGIN_FILES = \
  213. collectors/proc.plugin/ipc.c \
  214. collectors/proc.plugin/plugin_proc.c \
  215. collectors/proc.plugin/plugin_proc.h \
  216. collectors/proc.plugin/proc_diskstats.c \
  217. collectors/proc.plugin/proc_mdstat.c \
  218. collectors/proc.plugin/proc_interrupts.c \
  219. collectors/proc.plugin/proc_softirqs.c \
  220. collectors/proc.plugin/proc_loadavg.c \
  221. collectors/proc.plugin/proc_meminfo.c \
  222. collectors/proc.plugin/proc_net_dev.c \
  223. collectors/proc.plugin/proc_net_ip_vs_stats.c \
  224. collectors/proc.plugin/proc_net_netstat.c \
  225. collectors/proc.plugin/proc_net_rpc_nfs.c \
  226. collectors/proc.plugin/proc_net_rpc_nfsd.c \
  227. collectors/proc.plugin/proc_net_snmp.c \
  228. collectors/proc.plugin/proc_net_snmp6.c \
  229. collectors/proc.plugin/proc_net_sctp_snmp.c \
  230. collectors/proc.plugin/proc_net_sockstat.c \
  231. collectors/proc.plugin/proc_net_sockstat6.c \
  232. collectors/proc.plugin/proc_net_softnet_stat.c \
  233. collectors/proc.plugin/proc_net_stat_conntrack.c \
  234. collectors/proc.plugin/proc_net_stat_synproxy.c \
  235. collectors/proc.plugin/proc_self_mountinfo.c \
  236. collectors/proc.plugin/proc_self_mountinfo.h \
  237. collectors/proc.plugin/zfs_common.c \
  238. collectors/proc.plugin/zfs_common.h \
  239. collectors/proc.plugin/proc_spl_kstat_zfs.c \
  240. collectors/proc.plugin/proc_stat.c \
  241. collectors/proc.plugin/proc_sys_kernel_random_entropy_avail.c \
  242. collectors/proc.plugin/proc_vmstat.c \
  243. collectors/proc.plugin/proc_uptime.c \
  244. collectors/proc.plugin/sys_kernel_mm_ksm.c \
  245. collectors/proc.plugin/sys_devices_system_edac_mc.c \
  246. collectors/proc.plugin/sys_devices_system_node.c \
  247. collectors/proc.plugin/sys_fs_btrfs.c \
  248. collectors/proc.plugin/sys_class_power_supply.c \
  249. $(NULL)
  250. TC_PLUGIN_FILES = \
  251. collectors/tc.plugin/plugin_tc.c \
  252. collectors/tc.plugin/plugin_tc.h \
  253. $(NULL)
  254. MACOS_PLUGIN_FILES = \
  255. collectors/macos.plugin/plugin_macos.c \
  256. collectors/macos.plugin/plugin_macos.h \
  257. collectors/macos.plugin/macos_sysctl.c \
  258. collectors/macos.plugin/macos_mach_smi.c \
  259. collectors/macos.plugin/macos_fw.c \
  260. $(NULL)
  261. PLUGINSD_PLUGIN_FILES = \
  262. collectors/plugins.d/plugins_d.c \
  263. collectors/plugins.d/plugins_d.h \
  264. $(NULL)
  265. RRD_PLUGIN_FILES = \
  266. database/rrdcalc.c \
  267. database/rrdcalc.h \
  268. database/rrdcalctemplate.c \
  269. database/rrdcalctemplate.h \
  270. database/rrddim.c \
  271. database/rrddimvar.c \
  272. database/rrddimvar.h \
  273. database/rrdfamily.c \
  274. database/rrdhost.c \
  275. database/rrd.c \
  276. database/rrd.h \
  277. database/rrdset.c \
  278. database/rrdsetvar.c \
  279. database/rrdsetvar.h \
  280. database/rrdvar.c \
  281. database/rrdvar.h \
  282. $(NULL)
  283. API_PLUGIN_FILES = \
  284. web/api/badges/web_buffer_svg.c \
  285. web/api/badges/web_buffer_svg.h \
  286. web/api/exporters/allmetrics.c \
  287. web/api/exporters/allmetrics.h \
  288. web/api/exporters/shell/allmetrics_shell.c \
  289. web/api/exporters/shell/allmetrics_shell.h \
  290. web/api/queries/average/average.c \
  291. web/api/queries/average/average.h \
  292. web/api/queries/des/des.c \
  293. web/api/queries/des/des.h \
  294. web/api/queries/incremental_sum/incremental_sum.c \
  295. web/api/queries/incremental_sum/incremental_sum.h \
  296. web/api/queries/max/max.c \
  297. web/api/queries/max/max.h \
  298. web/api/queries/median/median.c \
  299. web/api/queries/median/median.h \
  300. web/api/queries/min/min.c \
  301. web/api/queries/min/min.h \
  302. web/api/queries/query.c \
  303. web/api/queries/query.h \
  304. web/api/queries/rrdr.c \
  305. web/api/queries/rrdr.h \
  306. web/api/queries/ses/ses.c \
  307. web/api/queries/ses/ses.h \
  308. web/api/queries/stddev/stddev.c \
  309. web/api/queries/stddev/stddev.h \
  310. web/api/queries/sum/sum.c \
  311. web/api/queries/sum/sum.h \
  312. web/api/formatters/rrd2json.c \
  313. web/api/formatters/rrd2json.h \
  314. web/api/formatters/csv/csv.c \
  315. web/api/formatters/csv/csv.h \
  316. web/api/formatters/json/json.c \
  317. web/api/formatters/json/json.h \
  318. web/api/formatters/ssv/ssv.c \
  319. web/api/formatters/ssv/ssv.h \
  320. web/api/formatters/value/value.c \
  321. web/api/formatters/value/value.h \
  322. web/api/formatters/json_wrapper.c \
  323. web/api/formatters/json_wrapper.h \
  324. web/api/formatters/charts2json.c \
  325. web/api/formatters/charts2json.h \
  326. web/api/formatters/rrdset2json.c \
  327. web/api/formatters/rrdset2json.h \
  328. web/api/health/health_cmdapi.c \
  329. web/api/health/health_cmdapi.h \
  330. web/api/web_api_v1.c \
  331. web/api/web_api_v1.h \
  332. $(NULL)
  333. STREAMING_PLUGIN_FILES = \
  334. streaming/rrdpush.c \
  335. streaming/rrdpush.h \
  336. $(NULL)
  337. REGISTRY_PLUGIN_FILES = \
  338. registry/registry.c \
  339. registry/registry.h \
  340. registry/registry_db.c \
  341. registry/registry_init.c \
  342. registry/registry_internals.c \
  343. registry/registry_internals.h \
  344. registry/registry_log.c \
  345. registry/registry_machine.c \
  346. registry/registry_machine.h \
  347. registry/registry_person.c \
  348. registry/registry_person.h \
  349. registry/registry_url.c \
  350. registry/registry_url.h \
  351. $(NULL)
  352. STATSD_PLUGIN_FILES = \
  353. collectors/statsd.plugin/statsd.c \
  354. collectors/statsd.plugin/statsd.h \
  355. $(NULL)
  356. WEB_PLUGIN_FILES = \
  357. web/server/web_client.c \
  358. web/server/web_client.h \
  359. web/server/web_server.c \
  360. web/server/web_server.h \
  361. web/server/web_client_cache.c \
  362. web/server/web_client_cache.h \
  363. web/server/static/static-threaded.c \
  364. web/server/static/static-threaded.h \
  365. $(NULL)
  366. BACKENDS_PLUGIN_FILES = \
  367. backends/backends.c \
  368. backends/backends.h \
  369. backends/graphite/graphite.c \
  370. backends/graphite/graphite.h \
  371. backends/json/json.c \
  372. backends/json/json.h \
  373. backends/opentsdb/opentsdb.c \
  374. backends/opentsdb/opentsdb.h \
  375. backends/prometheus/backend_prometheus.c \
  376. backends/prometheus/backend_prometheus.h \
  377. $(NULL)
  378. DAEMON_FILES = \
  379. daemon/common.c \
  380. daemon/common.h \
  381. daemon/daemon.c \
  382. daemon/daemon.h \
  383. daemon/global_statistics.c \
  384. daemon/global_statistics.h \
  385. daemon/main.c \
  386. daemon/main.h \
  387. daemon/signals.c \
  388. daemon/signals.h \
  389. daemon/unit_test.c \
  390. daemon/unit_test.h \
  391. $(NULL)
  392. NETDATA_FILES = \
  393. collectors/all.h \
  394. $(DAEMON_FILES) \
  395. $(LIBNETDATA_FILES) \
  396. $(API_PLUGIN_FILES) \
  397. $(BACKENDS_PLUGIN_FILES) \
  398. $(CHECKS_PLUGIN_FILES) \
  399. $(HEALTH_PLUGIN_FILES) \
  400. $(IDLEJITTER_PLUGIN_FILES) \
  401. $(PLUGINSD_PLUGIN_FILES) \
  402. $(REGISTRY_PLUGIN_FILES) \
  403. $(RRD_PLUGIN_FILES) \
  404. $(STREAMING_PLUGIN_FILES) \
  405. $(STATSD_PLUGIN_FILES) \
  406. $(WEB_PLUGIN_FILES) \
  407. $(NULL)
  408. if FREEBSD
  409. NETDATA_FILES += \
  410. $(FREEBSD_PLUGIN_FILES) \
  411. $(NULL)
  412. endif
  413. if MACOS
  414. NETDATA_FILES += \
  415. $(MACOS_PLUGIN_FILES) \
  416. $(NULL)
  417. endif
  418. if LINUX
  419. NETDATA_FILES += \
  420. $(CGROUPS_PLUGIN_FILES) \
  421. $(DISKSPACE_PLUGIN_FILES) \
  422. $(PROC_PLUGIN_FILES) \
  423. $(TC_PLUGIN_FILES) \
  424. $(NULL)
  425. endif
  426. NETDATA_COMMON_LIBS = \
  427. $(OPTIONAL_MATH_LIBS) \
  428. $(OPTIONAL_ZLIB_LIBS) \
  429. $(OPTIONAL_UUID_LIBS) \
  430. $(NULL)
  431. sbin_PROGRAMS += netdata
  432. netdata_SOURCES = $(NETDATA_FILES)
  433. netdata_LDADD = \
  434. $(NETDATA_COMMON_LIBS) \
  435. $(NULL)
  436. if ENABLE_PLUGIN_APPS
  437. plugins_PROGRAMS += apps.plugin
  438. apps_plugin_SOURCES = $(APPS_PLUGIN_FILES)
  439. apps_plugin_LDADD = \
  440. $(NETDATA_COMMON_LIBS) \
  441. $(OPTIONAL_LIBCAP_LIBS) \
  442. $(NULL)
  443. endif
  444. if ENABLE_PLUGIN_CGROUP_NETWORK
  445. plugins_PROGRAMS += cgroup-network
  446. cgroup_network_SOURCES = $(CGROUP_NETWORK_FILES)
  447. cgroup_network_LDADD = \
  448. $(NETDATA_COMMON_LIBS) \
  449. $(NULL)
  450. endif
  451. if ENABLE_PLUGIN_FREEIPMI
  452. plugins_PROGRAMS += freeipmi.plugin
  453. freeipmi_plugin_SOURCES = $(FREEIPMI_PLUGIN_FILES)
  454. freeipmi_plugin_LDADD = \
  455. $(NETDATA_COMMON_LIBS) \
  456. $(OPTIONAL_IPMIMONITORING_LIBS) \
  457. $(NULL)
  458. endif
  459. if ENABLE_PLUGIN_CUPS
  460. plugins_PROGRAMS += cups.plugin
  461. cups_plugin_SOURCES = $(CUPS_PLUGIN_FILES)
  462. cups_plugin_LDADD = \
  463. $(NETDATA_COMMON_LIBS) \
  464. $(OPTIONAL_CUPS_LIBS) \
  465. $(NULL)
  466. endif
  467. if ENABLE_PLUGIN_NFACCT
  468. plugins_PROGRAMS += nfacct.plugin
  469. nfacct_plugin_SOURCES = $(NFACCT_PLUGIN_FILES)
  470. nfacct_plugin_LDADD = \
  471. $(NETDATA_COMMON_LIBS) \
  472. $(OPTIONAL_NFACCT_LIBS) \
  473. $(NULL)
  474. endif
  475. if ENABLE_PLUGIN_XENSTAT
  476. plugins_PROGRAMS += xenstat.plugin
  477. xenstat_plugin_SOURCES = $(XENSTAT_PLUGIN_FILES)
  478. xenstat_plugin_LDADD = \
  479. $(NETDATA_COMMON_LIBS) \
  480. $(OPTIONAL_XENSTAT_LIBS) \
  481. $(NULL)
  482. endif