-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (51 loc) · 1.61 KB
/
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
47
48
49
50
51
52
53
54
55
56
COMPILER_SAT_DEMO = arm-linux-gnueabihf-g++ -march=armv6 -marm -mfpu=vfpv2 -no-pie -fPIC
PROPERTIES_FILE = properties
IFLAGS = \
-Ilib/CrossPlatformDataBus/src \
-Ilib/WiringPi/wiringPi \
-Iinclude \
-Iinclude/Components \
-Iinclude/SubSystems
LFLAGS = \
-Llib/WiringPi/wiringPi
FLAGS = \
-s -O3 -std=gnu++17 -Wall -Wno-unused-variable \
-include include/Logger.hpp \
-D PROPERTIES_FILE=\"$(PROPERTIES_FILE)\" \
-D LOGGING \
-D LOGGING_FUNCTION_CALLS
LIBS = \
-lwiringPi \
-lpthread
OUT = satellite
SRC = \
lib/CrossPlatformDataBus/extras/i2c/wiringpi/src/WiringPiI2C.cpp \
lib/MPU/src/MPU.cpp \
lib/MPU/src/MPU9250.cpp \
lib/MPU/src/MPU9250_Master.cpp \
lib/MPU/src/MPU9250_Master_I2C.cpp \
src/Satellite.cpp \
src/Properties.cpp \
src/Components.cpp \
src/Components/IMU.cpp \
src/SubSystems.cpp \
src/SubSystems/Communication.cpp \
src/SubSystems/Measurement.cpp \
src/SubSystems/OrbitControl.cpp
OBJS = $(SRC:.cpp=.o)
build-sat-demo: $(OBJS)
@rm -f $(OUT)
@$(COMPILER_SAT_DEMO) $(IFLAGS) $(FLAGS) $(OBJS) -o $(OUT) $(LIBS) $(LFLAGS)
@rm -f $(OBJS)
load-sat-demo:
@scp -q $(PROPERTIES_FILE) $(OUT) sat-demo:~/
load-libs:
@rm -rf lib
@git clone https://github.com/Rogozin-high-school/WiringPi.git lib/WiringPi
@git clone https://github.com/Rogozin-high-school/CrossPlatformDataBus.git lib/CrossPlatformDataBus
@git clone https://github.com/Rogozin-high-school/MPU.git lib/MPU
@cd lib/WiringPi/wiringPi && make static
clean:
@rm -rf $(OUT) $(OBJS)
.cpp.o:
@$(COMPILER_SAT_DEMO) $(IFLAGS) $(FLAGS) -c $< -o $@