diff --git a/Makefile b/Makefile index b93e8972..816111e8 100644 --- a/Makefile +++ b/Makefile @@ -122,6 +122,9 @@ MANGRP := root MACHINE := $(shell uname -m) +# Extra non-default programs to build; e.g., sensord +# PROG_EXTRA := sensord + ################################################## # Below this, nothing should need to be changed. # ################################################## @@ -142,7 +145,7 @@ SRCDIRS := mkpatch ifeq ($(COMPILE_KERNEL),1) SRCDIRS += kernel kernel/busses kernel/chips kernel/include endif -SRCDIRS += lib prog/sensors prog/sensord prog/dump prog/detect etc +SRCDIRS += lib prog/sensors prog/dump prog/detect ${PROG_EXTRA:%=prog/%} etc # Some often-used commands with default options MKDIR := mkdir -p diff --git a/prog/sensord/Module.mk b/prog/sensord/Module.mk index 9e989778..c26fec74 100644 --- a/prog/sensord/Module.mk +++ b/prog/sensord/Module.mk @@ -15,6 +15,10 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# The round robin database (RRD) development headers and libraries are +# REQUIRED. Get this package from: +# http://ee-staff.ethz.ch/~oetiker/webtools/rrdtool + # Note that MODULE_DIR (the directory in which this file resides) is a # 'simply expanded variable'. That means that its value is substituted # verbatim in the rules, until it is redefined. @@ -37,13 +41,13 @@ $(PROGSENSORDTARGETS): $(PROGSENSORDSOURCES:.c=.ro) lib/$(LIBSHBASENAME) $(CC) -o $@ $(PROGSENSORDSOURCES:.c=.ro) -Llib -lsensors -lrrd all-prog-sensord: $(PROGSENSORDTARGETS) -# all :: all-prog-sensord +all :: all-prog-sensord install-prog-sensord: all-prog-sensord $(MKDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(PROGSENSORDMAN1DIR) $(INSTALL) -o root -g root -m 755 $(PROGSENSORDTARGETS) $(DESTDIR)$(SBINDIR) $(INSTALL) -o $(MANOWN) -g $(MANGRP) -m 644 $(PROGSENSORDMAN1FILES) $(DESTDIR)$(PROGSENSORDMAN1DIR) -# install :: install-prog-sensord +install :: install-prog-sensord clean-prog-sensord: $(RM) $(PROGSENSORDDIR)/*.rd $(PROGSENSORDDIR)/*.ro diff --git a/prog/sensord/README b/prog/sensord/README new file mode 100644 index 00000000..0c699773 --- /dev/null +++ b/prog/sensord/README @@ -0,0 +1,9 @@ +Daemon that periodically logs sensor readings to syslog or a round-robin +database, and warns of sensor alarms. + +Compile this program by making lm_sensors with the following argument: + make PROG_EXTRA:=sensord + +The RRD (Round Robin Database) development headers and libraries are +REQUIRED. Get this package from: + http://ee-staff.ethz.ch/~oetiker/webtools/rrdtool