diff options
Diffstat (limited to 'Makefile')
-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 |