17
17
# Points to the root of Google Test, relative to where this file is.
18
18
# Remember to tweak this if you move this file, or if you want to use
19
19
# a copy of Google Test at a different location.
20
- GTEST_DIR = ../../test/ googletest/googletest/
20
+ GTEST_DIR = ../googletest/googletest/
21
21
22
22
# Points to the root of Google Mock, relative to where this file is.
23
23
# Remember to tweak this if you move this file.
24
- GMOCK_DIR = ../../test/ googletest/googlemock/
24
+ GMOCK_DIR = ../googletest/googlemock/
25
25
26
26
# Points to the root of Arduino mock, relative to where this file is.
27
27
# Remember to tweak this if you move this file.
28
- ARDUINO_MOCK_DIR = ../../test/ arduino-mock/
28
+ ARDUINO_MOCK_DIR = ../arduino-mock/
29
29
30
30
# Where to find user code.
31
31
TEST_DIR = .
32
32
33
33
PROJECT_ROOT = ../../
34
+ SRC_ROOT = $(PROJECT_ROOT ) /src
34
35
35
36
# Flags passed to the preprocessor.
36
37
# Set Google Test and Google Mock's header directories as system
@@ -40,6 +41,7 @@ CPPFLAGS += -isystem $(GTEST_DIR)/include -isystem $(GMOCK_DIR)/include \
40
41
-I$(ARDUINO_MOCK_DIR ) /include/arduino-mock/ \
41
42
-I$(ARDUINO_MOCK_DIR ) /include/ \
42
43
-I$(PROJECT_ROOT ) /test/dummies \
44
+ -I$(PROJECT_ROOT ) /src \
43
45
-I$(PROJECT_ROOT )
44
46
45
47
# Flags passed to the C++ compiler.
@@ -122,16 +124,16 @@ arduino_mock_all.a : ArduinoMockAll.o
122
124
123
125
# Builds shared objects.
124
126
125
- Firebase.o : $(PROJECT_ROOT ) /Firebase.cpp
126
- $(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -c $(PROJECT_ROOT ) /Firebase.cpp
127
+ Firebase.o : $(SRC_ROOT ) /Firebase.cpp
128
+ $(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -c $(SRC_ROOT ) /Firebase.cpp
127
129
128
130
FirebaseHttpClient_dummy.o : $(PROJECT_ROOT ) /test/dummies/FirebaseHttpClient_dummy.cpp
129
131
$(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -c $(PROJECT_ROOT ) /test/dummies/FirebaseHttpClient_dummy.cpp
130
132
131
133
# Builds tests.
132
134
133
- get-command.o : $(PROJECT_ROOT ) /modem/get-command.cpp
134
- $(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -c $(PROJECT_ROOT ) /modem/get-command.cpp
135
+ get-command.o : $(SRC_ROOT ) /modem/get-command.cpp
136
+ $(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -c $(SRC_ROOT ) /modem/get-command.cpp
135
137
136
138
get-command_test.o : $(TEST_DIR ) /get-command_test.cpp $(GMOCK_HEADERS )
137
139
$(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -c $(TEST_DIR ) /get-command_test.cpp
@@ -141,8 +143,8 @@ get-command_test : get-command_test.o Firebase.o FirebaseHttpClient_dummy.o get-
141
143
$(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -lpthread $^ -o $@
142
144
143
145
144
- set-command.o : $(PROJECT_ROOT ) /modem/set-command.cpp
145
- $(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -c $(PROJECT_ROOT ) /modem/set-command.cpp
146
+ set-command.o : $(SRC_ROOT ) /modem/set-command.cpp
147
+ $(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -c $(SRC_ROOT ) /modem/set-command.cpp
146
148
147
149
set-command_test.o : $(TEST_DIR ) /set-command_test.cpp $(GMOCK_HEADERS )
148
150
$(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -c $(TEST_DIR ) /set-command_test.cpp
@@ -152,8 +154,8 @@ set-command_test : set-command.o set-command_test.o Firebase.o FirebaseHttpClien
152
154
$(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -lpthread $^ -o $@
153
155
154
156
155
- remove-command.o : $(PROJECT_ROOT ) /modem/remove-command.cpp
156
- $(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -c $(PROJECT_ROOT ) /modem/remove-command.cpp
157
+ remove-command.o : $(SRC_ROOT ) /modem/remove-command.cpp
158
+ $(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -c $(SRC_ROOT ) /modem/remove-command.cpp
157
159
158
160
remove-command_test.o : $(TEST_DIR ) /remove-command_test.cpp $(GMOCK_HEADERS )
159
161
$(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -c $(TEST_DIR ) /remove-command_test.cpp
@@ -163,8 +165,8 @@ remove-command_test : remove-command.o remove-command_test.o Firebase.o Firebase
163
165
$(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -lpthread $^ -o $@
164
166
165
167
166
- push-command.o : $(PROJECT_ROOT ) /modem/push-command.cpp
167
- $(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -c $(PROJECT_ROOT ) /modem/push-command.cpp
168
+ push-command.o : $(SRC_ROOT ) /modem/push-command.cpp
169
+ $(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -c $(SRC_ROOT ) /modem/push-command.cpp
168
170
169
171
push-command_test.o : $(TEST_DIR ) /push-command_test.cpp $(GMOCK_HEADERS )
170
172
$(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -c $(TEST_DIR ) /push-command_test.cpp
@@ -173,8 +175,8 @@ push-command_test : push-command.o push-command_test.o Firebase.o FirebaseHttpCl
173
175
arduino_mock_all.a
174
176
$(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -lpthread $^ -o $@
175
177
176
- begin-command.o : $(PROJECT_ROOT ) /modem/begin-command.cpp
177
- $(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -c $(PROJECT_ROOT ) /modem/begin-command.cpp
178
+ begin-command.o : $(SRC_ROOT ) /modem/begin-command.cpp
179
+ $(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -c $(SRC_ROOT ) /modem/begin-command.cpp
178
180
179
181
begin-command_test.o : $(TEST_DIR ) /begin-command_test.cpp $(GMOCK_HEADERS )
180
182
$(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -c $(TEST_DIR ) /begin-command_test.cpp
@@ -183,8 +185,8 @@ begin-command_test : begin-command.o begin-command_test.o Firebase.o FirebaseHtt
183
185
arduino_mock_all.a
184
186
$(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -lpthread $^ -o $@
185
187
186
- stream-command.o : $(PROJECT_ROOT ) /modem/stream-command.cpp
187
- $(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -c $(PROJECT_ROOT ) /modem/stream-command.cpp
188
+ stream-command.o : $(SRC_ROOT ) /modem/stream-command.cpp
189
+ $(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -c $(SRC_ROOT ) /modem/stream-command.cpp
188
190
189
191
stream-command_test.o : $(TEST_DIR ) /stream-command_test.cpp $(GMOCK_HEADERS )
190
192
$(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -c $(TEST_DIR ) /stream-command_test.cpp
0 commit comments