-
Notifications
You must be signed in to change notification settings - Fork 21
/
rules_common.mk
161 lines (139 loc) · 5.87 KB
/
rules_common.mk
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
####################################################################################################
# PROJECT NAME
####################################################################################################
# Ensure project name is defined
ifndef PROJ_NAME
PROJ_NAME = MAVRIC
endif
# Add to compile flags
CFLAGS += -DPROJECT_NAME=\"$(PROJ_NAME)\"
CXXFLAGS += -DPROJECT_NAME=\"$(PROJ_NAME)\"
# Report
$(info Project name = $(PROJ_NAME))
####################################################################################################
# GIT HASH
####################################################################################################
# Find git hash for project (current folder)
PROJECT_GIT_HASH := $(shell git describe --abbrev=7 --always)
# Find git hash for library
MAVRIC_GIT_HASH := $(shell cd $(MAVRIC_LIB) && git describe --abbrev=7 --always)
MAVRIC_GIT_TAG := $(shell cd $(MAVRIC_LIB) && git describe --tags)
# Add to compile flags
CFLAGS += -DMAVRIC_GIT_HASH=\"$(MAVRIC_GIT_HASH)\"
CFLAGS += -DPROJECT_GIT_HASH=\"$(PROJECT_GIT_HASH)\"
CXXFLAGS += -DMAVRIC_GIT_HASH=\"$(MAVRIC_GIT_HASH)\"
CXXFLAGS += -DPROJECT_GIT_HASH=\"$(PROJECT_GIT_HASH)\"
# Report
$(info Project git hash = $(PROJECT_GIT_HASH))
$(info Mavric git hash = $(MAVRIC_GIT_HASH))
$(info Mavric version = $(MAVRIC_GIT_TAG))
####################################################################################################
# COMMON SOURCE FILES
####################################################################################################
LIB_SRCS += communication/data_logging.cpp
LIB_SRCS += communication/data_logging_telemetry.cpp
LIB_SRCS += communication/hud_telemetry.cpp
LIB_SRCS += communication/mavlink_message_handler.cpp
LIB_SRCS += communication/mavlink_stream.cpp
LIB_SRCS += communication/mavlink_waypoint_handler.cpp
#LIB_SRCS += communication/mavlink_waypoint_handler_swarm.cpp
LIB_SRCS += communication/onboard_parameters.cpp
LIB_SRCS += communication/periodic_telemetry.cpp
LIB_SRCS += control/attitude_controller_p2.cpp
LIB_SRCS += control/attitude_error_estimator.cpp
LIB_SRCS += control/rate_controller.cpp
LIB_SRCS += control/attitude_controller.cpp
LIB_SRCS += control/velocity_controller.cpp
LIB_SRCS += control/velocity_controller_copter.cpp
LIB_SRCS += control/velocity_controller_holonomic.cpp
LIB_SRCS += control/position_controller.cpp
LIB_SRCS += control/pid_controller.cpp
LIB_SRCS += drivers/airspeed_analog.cpp
LIB_SRCS += drivers/battery.cpp
LIB_SRCS += drivers/barometer.cpp
LIB_SRCS += drivers/barometer_telemetry.cpp
LIB_SRCS += drivers/barometer_bmp085.cpp
LIB_SRCS += drivers/barometer_ms5611.cpp
LIB_SRCS += drivers/gps_ublox.cpp
LIB_SRCS += drivers/gps_telemetry.cpp
LIB_SRCS += drivers/gps_mocap.cpp
LIB_SRCS += drivers/hmc5883l.cpp
LIB_SRCS += drivers/lsm330dlc.cpp
LIB_SRCS += drivers/mpu_6050.cpp
LIB_SRCS += drivers/mpu_9250.cpp
LIB_SRCS += drivers/px4flow.cpp
LIB_SRCS += drivers/px4flow_i2c.cpp
LIB_SRCS += drivers/px4flow_serial.cpp
LIB_SRCS += drivers/px4flow_telemetry.cpp
LIB_SRCS += drivers/servo.cpp
LIB_SRCS += drivers/servos_telemetry.cpp
LIB_SRCS += drivers/sonar_i2cxl.cpp
LIB_SRCS += drivers/sonar_telemetry.cpp
LIB_SRCS += drivers/spektrum_satellite.cpp
LIB_SRCS += drivers/state_display.cpp
LIB_SRCS += drivers/state_display_megafly_rev4.cpp
LIB_SRCS += drivers/state_display_sparky_v2.cpp
LIB_SRCS += drones/mav.cpp
LIB_SRCS += drones/lequad.cpp
LIB_SRCS += hal/common/dbg.cpp
LIB_SRCS += hal/common/led_gpio.cpp
LIB_SRCS += hal/common/file.cpp
LIB_SRCS += hal/common/serial.cpp
LIB_SRCS += flight_controller/flight_controller_stack.cpp
LIB_SRCS += flight_controller/flight_controller_hexhog.cpp
LIB_SRCS += manual_control/joystick.cpp
LIB_SRCS += manual_control/joystick_telemetry.cpp
LIB_SRCS += manual_control/manual_control.cpp
LIB_SRCS += manual_control/manual_control_telemetry.cpp
LIB_SRCS += manual_control/remote.cpp
LIB_SRCS += manual_control/remote_telemetry.cpp
LIB_SRCS += mission/mission_planner.cpp
LIB_SRCS += mission/mission_handler_hold_position.cpp
LIB_SRCS += mission/mission_handler_landing.cpp
LIB_SRCS += mission/mission_handler_critical_landing.cpp
LIB_SRCS += mission/mission_handler_manual.cpp
LIB_SRCS += mission/mission_handler_navigating.cpp
LIB_SRCS += mission/mission_handler_critical_navigating.cpp
LIB_SRCS += mission/mission_handler_on_ground.cpp
LIB_SRCS += mission/mission_handler_registry.cpp
LIB_SRCS += mission/mission_handler_takeoff.cpp
LIB_SRCS += mission/waypoint.cpp
LIB_SRCS += navigation/dubin.cpp
LIB_SRCS += navigation/vector_field_waypoint.cpp
LIB_SRCS += navigation/navigation_directto.cpp
LIB_SRCS += runtime/scheduler.cpp
LIB_SRCS += runtime/scheduler_task.cpp
LIB_SRCS += runtime/scheduler_telemetry.cpp
LIB_SRCS += sensing/ahrs_ekf.cpp
LIB_SRCS += sensing/ahrs_ekf_mocap.cpp
LIB_SRCS += sensing/ahrs_qfilter.cpp
LIB_SRCS += sensing/ahrs_telemetry.cpp
LIB_SRCS += sensing/ahrs_madgwick.cpp
LIB_SRCS += sensing/altitude_estimation.cpp
LIB_SRCS += sensing/imu.cpp
LIB_SRCS += sensing/imu_telemetry.cpp
LIB_SRCS += sensing/ins.cpp
LIB_SRCS += sensing/ins_complementary.cpp
LIB_SRCS += sensing/ins_kf.cpp
LIB_SRCS += sensing/ins_telemetry.cpp
LIB_SRCS += simulation/accelerometer_sim.cpp
LIB_SRCS += simulation/barometer_sim.cpp
LIB_SRCS += simulation/dynamic_model_quad_diag.cpp
LIB_SRCS += simulation/dynamic_model_telemetry.cpp
LIB_SRCS += simulation/flow_sim.cpp
LIB_SRCS += simulation/gps_sim.cpp
LIB_SRCS += simulation/gyroscope_sim.cpp
LIB_SRCS += simulation/ins_ahrs_groundtruth.cpp
LIB_SRCS += simulation/magnetometer_sim.cpp
LIB_SRCS += simulation/simulation.cpp
LIB_SRCS += simulation/sonar_sim.cpp
LIB_SRCS += status/geofence_cylinder.cpp
LIB_SRCS += status/state.cpp
LIB_SRCS += status/state_machine.cpp
LIB_SRCS += status/state_telemetry.cpp
LIB_SRCS += util/coord_conventions.cpp
LIB_SRCS += util/matrix.cpp
LIB_SRCS += util/print_util.cpp
LIB_SRCS += util/quick_trig.cpp
LIB_SRCS += util/raytracing.cpp
LIB_SRCS += util/string_util.cpp