X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=src%2FMakefile.am;h=1c1dd33856e155706af1885c07b8508eadafc8ad;hb=8679670bdbe3c5928ec2e266d9c72e1a758fdf37;hp=32623f436d0650505a3e5e0331b65c2c79cb5949;hpb=0acd15dd4aae24a0366fafce03679c51feed779d;p=netdata.git diff --git a/src/Makefile.am b/src/Makefile.am index 32623f43..1c1dd338 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -12,11 +12,14 @@ AM_CPPFLAGS = \ -DRUN_DIR="\"$(localstatedir)/run/netdata\"" \ -DWEB_DIR="\"$(webdir)\"" \ $(NULL) + AM_CFLAGS = \ $(OPTIONAL_MATH_CFLAGS) \ $(OPTIONAL_NFACCT_CLFAGS) \ $(OPTIONAL_ZLIB_CFLAGS) \ $(OPTIONAL_UUID_CFLAGS) \ + $(OPTIONAL_LIBCAP_CFLAGS) \ + $(OPTIONAL_IPMIMONITORING_CFLAGS)\ $(NULL) sbin_PROGRAMS = netdata @@ -24,27 +27,142 @@ dist_cache_DATA = .keep dist_varlib_DATA = .keep dist_registry_DATA = .keep dist_log_DATA = .keep -plugins_PROGRAMS = apps.plugin +plugins_PROGRAMS = + +if ENABLE_PLUGIN_APPS +plugins_PROGRAMS += apps.plugin +endif + +if ENABLE_PLUGIN_FREEIPMI +plugins_PROGRAMS += freeipmi.plugin +endif netdata_SOURCES = \ - appconfig.c appconfig.h \ - avl.c avl.h \ - common.c common.h \ - daemon.c daemon.h \ - dictionary.c dictionary.h \ - eval.c eval.h \ - global_statistics.c global_statistics.h \ - health.c health.h \ + adaptive_resortable_list.c \ + adaptive_resortable_list.h \ + appconfig.c \ + appconfig.h \ + avl.c \ + avl.h \ + backends.c \ + backends.h \ + clocks.c \ + clocks.h \ + common.c \ + common.h \ + daemon.c \ + daemon.h \ + dictionary.c \ + dictionary.h \ + eval.c \ + eval.h \ + global_statistics.c \ + global_statistics.h \ + health.c \ + health.h \ + health_config.c \ + health_json.c \ + health_log.c \ + inlined.h \ + locks.h \ + log.c \ + log.h \ + main.c \ + main.h \ + plugin_checks.c \ + plugin_checks.h \ + plugin_idlejitter.c \ + plugin_idlejitter.h \ + plugin_nfacct.c \ + plugin_nfacct.h \ + plugin_tc.c \ + plugin_tc.h \ + plugins_d.c \ + plugins_d.h \ + popen.c \ + popen.h \ + proc_self_mountinfo.c \ + proc_self_mountinfo.h \ + procfile.c \ + procfile.h \ + registry.c \ + registry.h \ + registry_db.c \ + registry_init.c \ + registry_internals.c \ + registry_internals.h \ + registry_log.c \ + registry_machine.c \ + registry_machine.h \ + registry_person.c \ + registry_person.h \ + registry_url.c \ + registry_url.h \ + rrd.c \ + rrd.h \ + rrd2json.c \ + rrd2json.h \ + rrd2json_api_old.c \ + rrd2json_api_old.h \ + rrdcalc.c \ + rrdcalctemplate.c \ + rrddim.c \ + rrddimvar.c \ + rrdfamily.c \ + rrdhost.c \ + rrdpush.c \ + rrdpush.h \ + rrdset.c \ + rrdsetvar.c \ + rrdvar.c \ + simple_pattern.c \ + simple_pattern.h \ + socket.c \ + socket.h \ + storage_number.c \ + storage_number.h \ + sys_devices_system_edac_mc.c \ + sys_devices_system_node.c \ + sys_fs_cgroup.c \ + unit_test.c \ + unit_test.h \ + url.c url.h \ + web_api_old.c \ + web_api_old.h \ + web_api_v1.c \ + web_api_v1.h \ + web_buffer.c \ + web_buffer.h \ + web_buffer_svg.c \ + web_buffer_svg.h \ + web_client.c \ + web_client.h \ + web_server.c \ + web_server.h \ + $(NULL) + +if FREEBSD +netdata_SOURCES += \ + plugin_freebsd.c \ + plugin_freebsd.h \ + freebsd_sysctl.c \ + $(NULL) +else +if MACOS +netdata_SOURCES += \ + plugin_macos.c \ + plugin_macos.h \ + macos_sysctl.c \ + macos_mach_smi.c \ + macos_fw.c \ + $(NULL) +else +netdata_SOURCES += \ ipc.c ipc.h \ - log.c log.h \ - main.c main.h \ - plugin_checks.c plugin_checks.h \ - plugin_idlejitter.c plugin_idlejitter.h \ - plugin_nfacct.c plugin_nfacct.h \ - plugin_proc.c plugin_proc.h \ - plugin_tc.c plugin_tc.h \ - plugins_d.c plugins_d.h \ - popen.c popen.h \ + plugin_proc.c \ + plugin_proc.h \ + plugin_proc_diskspace.c \ + plugin_proc_diskspace.h \ proc_diskstats.c \ proc_interrupts.c \ proc_softirqs.c \ @@ -61,23 +179,14 @@ netdata_SOURCES = \ proc_net_stat_conntrack.c \ proc_net_stat_synproxy.c \ proc_stat.c \ - proc_self_mountinfo.c proc_self_mountinfo.h \ proc_sys_kernel_random_entropy_avail.c \ proc_vmstat.c \ + proc_uptime.c \ sys_kernel_mm_ksm.c \ - sys_fs_cgroup.c \ - procfile.c procfile.h \ - registry.c registry.h \ - rrd.c rrd.h \ - rrd2json.c rrd2json.h \ - storage_number.c storage_number.h \ - unit_test.c unit_test.h \ - url.c url.h \ - web_buffer.c web_buffer.h \ - web_buffer_svg.c web_buffer_svg.h \ - web_client.c web_client.h \ - web_server.c web_server.h \ $(NULL) +endif +endif + netdata_LDADD = \ $(OPTIONAL_MATH_LIBS) \ $(OPTIONAL_NFACCT_LIBS) \ @@ -88,25 +197,34 @@ netdata_LDADD = \ apps_plugin_SOURCES = \ apps_plugin.c \ avl.c avl.h \ + clocks.c clocks.h \ common.c common.h \ + inlined.h \ log.c log.h \ procfile.c procfile.h \ web_buffer.c web_buffer.h \ $(NULL) -install-data-hook: - if [ `id -u` == 0 ]; then \ - chown root '$(DESTDIR)$(pluginsdir)/apps.plugin' && \ - chmod 0755 '$(DESTDIR)$(pluginsdir)/apps.plugin' && \ - ( setcap cap_dac_read_search,cap_sys_ptrace+ep '$(DESTDIR)$(pluginsdir)/apps.plugin' || \ - chmod 4755 '$(DESTDIR)$(pluginsdir)/apps.plugin' ); \ - else \ - echo; \ - echo "ATTENTION"; \ - echo; \ - echo "$(pluginsdir)/apps.plugin requires escalated capabilities:"; \ - echo "sudo chown root '$(DESTDIR)$(pluginsdir)/apps.plugin'"; \ - echo "sudo chmod 0755 '$(DESTDIR)$(pluginsdir)/apps.plugin'"; \ - echo "sudo setcap cap_dac_read_search,cap_sys_ptrace+ep '$(DESTDIR)$(pluginsdir)/apps.plugin'"; \ - echo; \ - fi +if FREEBSD +apps_plugin_SOURCES += \ + plugin_freebsd.h \ + $(NULL) +endif + +apps_plugin_LDADD = \ + $(OPTIONAL_MATH_LIBS) \ + $(OPTIONAL_LIBCAP_LIBS) \ + $(NULL) + +freeipmi_plugin_SOURCES = \ + freeipmi_plugin.c \ + clocks.c clocks.h \ + common.c common.h \ + inlined.h \ + log.c log.h \ + procfile.c procfile.h \ + $(NULL) + +freeipmi_plugin_LDADD = \ + $(OPTIONAL_IPMIMONITORING_LIBS) \ + $(NULL)