]> ToastFreeware Gitweb - toast/airingbutler.git/blob - Makefile
annotate-output now accepts a datetime format, so let's use it
[toast/airingbutler.git] / Makefile
1 BOARD_TAG=uno
2
3 HOSTNAME=$(shell hostname)
4 ifeq ($(HOSTNAME),jadzia)
5 MONITOR_PORT=/dev/arduino
6 else
7 MONITOR_PORT=/dev/ttyACM0
8 endif
9
10 AVRDUDE_CONF=/etc/avrdude.conf
11
12 # ARDUINO_SKETCHBOOK=~/sketchbook
13 include /usr/share/arduino/Arduino.mk
14
15 all: $(CURDIR)
16
17 # log is the result of
18 # annotate-output ./log_mhz19.py -d /dev/ttyACM3 | tee -a log
19 # and we want log.csv for plot_mhz19.py
20 log.csv: log
21         cp $< $@
22         fromdos $@
23         sed -i -e '/Started/ d' -e '/Finished/ d' -e '/error: / d' -e '/,-[0-9]/ d' -e '/^I: / d' -e 's/ O: /,/g' $@
24         perl -ni -e 'BEGIN{$$i=0}; print if ($$_ !~ /CO2/ || $$i == 0); $$i++;' $@
25
26 plot: log.csv
27         ./plot_mhz19.py $<
28
29 .PHONY: log.csv plot