diff options
author | Jonathan McCrohan <jmccrohan@gmail.com> | 2012-12-04 01:12:15 +0000 |
---|---|---|
committer | Jonathan McCrohan <jmccrohan@gmail.com> | 2012-12-04 01:29:32 +0000 |
commit | 45b134f897572318f182aa5faa348c5bd39fa7ae (patch) | |
tree | 1dec0092e27d994750b39b809e88182515e4e705 /Makefile | |
parent | 9083b82a25bdb9c25e7da0cfb4ebe515186c71e1 (diff) | |
download | verteco-45b134f897572318f182aa5faa348c5bd39fa7ae.tar.gz |
ftpupload: decouple ftpupload from modbuslog
Allow ftpupload to be used as an independent program. This enables it
to be used by both modbuslog and phidgetcontrol.
The ftp stanza in /etc/modbuslog has been split out into a separate
ftpupload configuration file located at /etc/ftpupload. ftpupload now
reads the $UPLOADTYPE variable to determine which type of upload to
execute. If $UPLOADTYPE has not been set, ftpupload will default to
modbuslog.
Diffstat (limited to '')
-rw-r--r-- | Makefile | 24 |
1 files changed, 13 insertions, 11 deletions
@@ -8,9 +8,10 @@ MODBUSLOGBINDIR=/usr/sbin MODBUSLOGCFGDIR=/etc MODBUSLOGLOGDIR=/var/modbuslog MODBUSLOGCRONDIR=/etc/cron.d -FTPHELPERCFLAGS= -FTPHELPERLIBS=-lconfig -FTPHELPERDIR=/usr/bin +FTPUPLOADCFLAGS= +FTPUPLOADLIBS=-lconfig +FTPUPLOADCFGDIR=/etc +FTPUPLOADBINDIR=/usr/bin LIGHTINGCONTROLCFLAGS= LIGHTINGCONTROLLIBS=-lconfig LIGHTINGCONTROLBINDIR=/usr/sbin @@ -28,11 +29,11 @@ WWWDIR=/var/www GITTAGFLAG := -D'VERSION_STRING="$(shell LC_ALL=C git describe --tags)"' MODBUSLOGCFLAGS += $(GITTAGFLAG) -FTPHELPERCFLAGS += $(GITTAGFLAG) +FTPUPLOADCFLAGS += $(GITTAGFLAG) LIGHTINGCONTROLCFLAGS += $(GITTAGFLAG) PHIDGETCONTROLCFLAGS += $(GITTAGFLAG) -all: modbuslog ftphelper lightingcontrol phidgetcontrol weatherstation_test +all: modbuslog ftpupload lightingcontrol phidgetcontrol weatherstation_test clean: rm -f $(SDIR)/modbuslog @@ -44,8 +45,8 @@ clean: modbuslog: $(SDIR)/modbuslog.c $(CC) -o $(SDIR)/$@ $^ $(MODBUSLOGCFLAGS) $(MODBUSLOGLIBS) -ftphelper: $(SDIR)/ftphelper.c - $(CC) -o $(SDIR)/$@ $^ $(FTPHELPERCFLAGS) $(FTPHELPERLIBS) +ftpupload: $(SDIR)/ftphelper.c + $(CC) -o $(SDIR)/ftphelper $^ $(FTPUPLOADCFLAGS) $(FTPUPLOADLIBS) lightingcontrol: $(SDIR)/lightingcontrol.c $(CC) -o $(SDIR)/$@ $^ $(LIGHTINGCONTROLCFLAGS) $(LIGHTINGCONTROLLIBS) @@ -69,9 +70,10 @@ install_modbuslog: test -f $(MODBUSLOGCRONDIR)/modbuslog || $(INSTALL) -m 644 $(CRONDIR)/modbuslog $(MODBUSLOGCRONDIR)/modbuslog $(INSTALL) $(PHPSDIR)/readfile.php $(WWWDIR)/readfile.php -install_ftphelper: - $(INSTALL) $(SDIR)/ftpupload $(FTPHELPERDIR)/ftpupload - $(INSTALL) $(SDIR)/ftphelper $(FTPHELPERDIR)/ftphelper +install_ftpupload: + test -f $(CFGDIR)/ftpupload.cfg || $(INSTALL) -m 644 $(SDIR)/ftpupload.cfg $(FTPUPLOADCFGDIR)/ftpupload.cfg + $(INSTALL) $(SDIR)/ftpupload $(FTPUPLOADBINDIR)/ftpupload + $(INSTALL) $(SDIR)/ftphelper $(FTPUPLOADBINDIR)/ftphelper install_lightingcontrol: $(INSTALL) $(SDIR)/lightingcontrol $(LIGHTINGCONTROLDIR)/lightingcontrol @@ -89,6 +91,6 @@ install_phidgetcontrol: fi test -f $(PHIDGETCONTROLCRONDIR)/phidgetcontrol || $(INSTALL) -m 644 $(CRONDIR)/phidgetcontrol $(PHIDGETCONTROLCRONDIR)/phidgetcontrol -installall: install_modbuslog install_ftphelper install_lightingcontrol install_phidgetcontrol +installall: install_modbuslog install_ftpupload install_lightingcontrol install_phidgetcontrol install: all installall |