aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2012-12-04 01:12:15 +0000
committerJonathan McCrohan <jmccrohan@gmail.com>2012-12-04 01:29:32 +0000
commit45b134f897572318f182aa5faa348c5bd39fa7ae (patch)
tree1dec0092e27d994750b39b809e88182515e4e705 /Makefile
parent9083b82a25bdb9c25e7da0cfb4ebe515186c71e1 (diff)
downloadverteco-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 'Makefile')
-rw-r--r--Makefile24
1 files changed, 13 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index aa4f279..ccdbb65 100644
--- a/Makefile
+++ b/Makefile
@@ -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
v-scan-tables.git/commit/isdb-t/br-to-PortoNacional?h=debian/0%2bgit20160503.4f192bd-1&id=6a4826f9d965ba04738085602e80a867c78c81f1&follow=1'>Imported Upstream version 0+git20141009.d26b627upstream/0+git20141009.d26b627Jonathan McCrohan2010-11120/+159271 2014-07-23Release 0+git20140611.14bd6c7-1debian/0+git20140611.14bd6c7-1Jonathan McCrohan1-2/+2 2014-07-23New Upstream Snapshot (commit 14bd6c7)Jonathan McCrohan1-2/+3 2014-07-23Imported Upstream version 0+git20140611.14bd6c7upstream/0+git20140611.14bd6c7Jonathan McCrohan7-11/+60 2014-05-13New Upstream Snapshot (commit 1246b27)Jonathan McCrohan1-0/+6 2014-05-13Imported Upstream version 0+git20140512.1246b27upstream/0+git20140512.1246b27Jonathan McCrohan391-301/+3983 2014-04-05Release 0+git20140326.cfc2975-1debian/0+git20140326.cfc2975-1Jonathan McCrohan1-2/+2 2014-04-05d/control: update Homepage (upstream has moved from Gitweb to cgit)Jonathan McCrohan2-1/+2 2014-04-05New Upstream Snapshot (commit cfc2975)Jonathan McCrohan1-0/+6 2014-04-05Imported Upstream version 0+git20140326.cfc2975upstream/0+git20140326.cfc2975Jonathan McCrohan118-656/+877 2014-01-16Release 0+git20140107.1850cf8-1debian/0+git20140107.1850cf8-1Jonathan McCrohan1-2/+2 2014-01-16Update Standards Version to 3.9.5Jonathan McCrohan2-1/+9