forked from mmurdoch/arduinounit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (33 loc) · 850 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
UNAME := $(shell uname)
ifeq ($(UNAME), Linux)
ARDUINO_DIR=/usr/share/arduino
endif
ifeq ($(UNAME), Darwin)
ARDUINO_DIR=$(HOME)/Documents/Arduino
endif
DOXYGEN=doxygen
all : firmware doc
.PHONY: doc
doc :
$(DOXYGEN)
.PHONY: test
test :
./bin/go compile upload tests
.PHONY: firmware
firmware:
./bin/go compile
.PHONY: install
install :
mkdir -p $(ARDUINO_DIR)/libraries/ArduinoUnit
/bin/rm -rf "$(ARDUINO_DIR)/libraries/ArduinoUnit/"*
rm -rf src/*~ src/*/*~ src/\#* src/.\#* src/utility/.\#*
cp -r src/* $(ARDUINO_DIR)/libraries/ArduinoUnit
.PHONY: clean
clean :
/bin/rm -rf `find . -name '*~' -o -name '#*' -o -name '.#*'`
.PHONY: scrapetests
scrapetests:
for f in tests/*.in ; do echo "$$f..."; ./bin/go run < $$f > $${f%%.in}.out; done
.PHONY: updatetests
updatetests:
for f in tests/*.in ; do cp $${f%%.in}.out $$f; done