-
Notifications
You must be signed in to change notification settings - Fork 19
/
Makefile
46 lines (31 loc) · 976 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
44
45
46
.SUFFIXES: .rb
GTEST=/usr/src/googletest/googletest
GMOCK=/usr/src/googletest/googlemock
CXX = g++
RSPEC = rspec
RM_F = rm -f
all: all-recursive
check: check-controller check-client
check-controller: test-suite
./test-suite
check-client:
$(RSPEC)
upload:
cd arduino && $(MAKE) upload && cd ..
repl:
cd arduino && $(MAKE) repl && cd ..
test-suite: test-suite.o gtest-all.o gmock-all.o
$(CXX) -o $@ test-suite.o gtest-all.o gmock-all.o -lpthread
test-suite.o: test-suite.cc controllerbase.hh calibration.hh profile.hh path.hh
$(CXX) -c -I$(GMOCK)/include -I$(GTEST)/include -o $@ $<
gtest-all.o: $(GTEST)/src/gtest-all.cc
$(CXX) -c -I$(GTEST)/include -I$(GTEST) -o $@ $<
gmock-all.o: $(GMOCK)/src/gmock-all.cc
$(CXX) -c -I$(GMOCK)/include -I$(GTEST)/include -I$(GMOCK) -o $@ $<
clean: clean-recursive clean-local
clean-local:
$(RM_F) -f test-suite *.o
all-recursive:
cd arduino && $(MAKE) && cd ..
clean-recursive:
cd arduino && $(MAKE) clean && cd ..