CC=gcc SDIR=src INSTALL=/usr/bin/install -c MODBUSLOGCFLAGS=-I/usr/include/modbus MODBUSLOGLIBS=-lmodbus -lconfig MODBUSLOGBINDIR=/usr/sbin MODBUSLOGCFGDIR=/etc MODBUSLOGLOGDIR=/var/modbuslog FTPHELPERCFLAGS= FTPHELPERLIBS=-lconfig FTPHELPERDIR=/usr/bin PHPSDIR=php WWWDIR=/var/www all: modbuslog ftphelper modbuslog: $(SDIR)/modbuslog.c $(CC) -o $(SDIR)/$@ $^ $(MODBUSLOGCFLAGS) $(MODBUSLOGLIBS) ftphelper: $(SDIR)/ftphelper.c $(CC) -o $(SDIR)/$@ $^ $(FTPHELPERCFLAGS) $(FTPHELPERLIBS) install: all $(INSTALL) $(SDIR)/modbuslog $(MODBUSLOGBINDIR)/modbuslog test -f $(MODBUSLOGCFGDIR)/modbuslog.cfg || $(INSTALL) -m 644 $(SDIR)/modbuslog.cfg $(MODBUSLOGCFGDIR)/modbuslog.cfg @if [ ! -d $(MODBUSLOGLOGDIR) ]; \ then \ mkdir $(MODBUSLOGLOGDIR); \ mkdir $(MODBUSLOGLOGDIR)/interval; \ mkdir $(MODBUSLOGLOGDIR)/archive; \ fi test -f $(MODBUSLOGLOGDIR)/interval/interval.txt || $(INSTALL) -m 644 $(SDIR)/interval.txt $(MODBUSLOGLOGDIR)/interval/interval.txt $(INSTALL) $(SDIR)/ftpupload $(FTPHELPERDIR)/ftpupload $(INSTALL) $(SDIR)/ftphelper $(FTPHELPERDIR)/ftphelper $(INSTALL) $(PHPSDIR)/readfile.php $(WWWDIR)/readfile.php fcdc8577be74594ca73a91bde'>refslogtreecommitdiffstats
path: root/Makefile (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2012-02-12Fix typo in README.Jonathan McCrohan1-1/+1
2012-02-12Add ftp upload function + add documentation.Jonathan McCrohan5-3/+151
2012-01-10Handle 32bit signed overflow.Jonathan McCrohan1-1/+6
2012-01-10Update README.Jonathan McCrohan1-1/+3