mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-04 13:55:40 +08:00
[conf] cleanup NPS makefiles
This commit is contained in:
@@ -202,3 +202,12 @@ ap.CFLAGS += $(ns_CFLAGS)
|
|||||||
ap.srcs += $(ns_srcs)
|
ap.srcs += $(ns_srcs)
|
||||||
fbw.CFLAGS += $(ns_CFLAGS)
|
fbw.CFLAGS += $(ns_CFLAGS)
|
||||||
fbw.srcs += $(ns_srcs)
|
fbw.srcs += $(ns_srcs)
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
##
|
||||||
|
## include firmware independent nps makefile and add rotorcraft specifics
|
||||||
|
##
|
||||||
|
include $(CFG_SHARED)/nps.makefile
|
||||||
|
nps.srcs += nps/nps_autopilot_rotorcraft.c
|
||||||
|
nps.srcs += $(SRC_FIRMWARE)/rotorcraft_telemetry.c
|
||||||
|
nps.srcs += subsystems/datalink/datalink.c $(SRC_FIRMWARE)/rotorcraft_datalink.c
|
||||||
|
|||||||
@@ -231,3 +231,16 @@ fbw.srcs += $(fbw_srcs) $(ns_srcs)
|
|||||||
|
|
||||||
ap.CFLAGS += $(ap_CFLAGS) $(ns_CFLAGS)
|
ap.CFLAGS += $(ap_CFLAGS) $(ns_CFLAGS)
|
||||||
ap.srcs += $(ap_srcs) $(ns_srcs)
|
ap.srcs += $(ap_srcs) $(ns_srcs)
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
##
|
||||||
|
## include firmware independent nps makefile and add fixedwing specifics
|
||||||
|
##
|
||||||
|
include $(CFG_SHARED)/nps.makefile
|
||||||
|
nps.srcs += nps/nps_autopilot_fixedwing.c
|
||||||
|
nps.srcs += subsystems/datalink/datalink.c $(SRC_FIRMWARE)/fixedwing_datalink.c
|
||||||
|
nps.srcs += $(SRC_FIRMWARE)/ap_downlink.c $(SRC_FIRMWARE)/fbw_downlink.c
|
||||||
|
|
||||||
|
# add normal ap and fbw sources
|
||||||
|
nps.CFLAGS += $(fbw_CFLAGS) $(ap_CFLAGS)
|
||||||
|
nps.srcs += $(fbw_srcs) $(ap_srcs)
|
||||||
|
|||||||
@@ -1,57 +1,7 @@
|
|||||||
# Hey Emacs, this is a -*- makefile -*-
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
|
|
||||||
#
|
#
|
||||||
# SITL Simulator based on CRRCSIM (MNAV inputdev)
|
# NPS SITL Simulator FDM backend based on CRRCSIM (MNAV inputdev)
|
||||||
#
|
#
|
||||||
|
|
||||||
SRC_FIRMWARE=firmwares/fixedwing
|
nps.srcs += nps/nps_fdm_crrcsim.c
|
||||||
|
|
||||||
SRC_BOARD=boards/$(BOARD)
|
|
||||||
|
|
||||||
nps.ARCHDIR = sim
|
|
||||||
|
|
||||||
# include Makefile.nps instead of Makefile.sim
|
|
||||||
nps.MAKEFILE = nps
|
|
||||||
|
|
||||||
# add normal ap and fbw sources define in autopilot.makefile
|
|
||||||
nps.CFLAGS += $(fbw_CFLAGS) $(ap_CFLAGS)
|
|
||||||
nps.srcs += $(fbw_srcs) $(ap_srcs)
|
|
||||||
|
|
||||||
nps.CFLAGS += -DSITL -DUSE_NPS
|
|
||||||
nps.CFLAGS += $(shell pkg-config glib-2.0 --cflags)
|
|
||||||
nps.LDFLAGS += $(shell pkg-config glib-2.0 --libs) -lm -lglibivy $(shell pcre-config --libs) -lgsl -lgslcblas
|
|
||||||
nps.CFLAGS += -I$(SRC_FIRMWARE) -I$(SRC_BOARD) -I$(PAPARAZZI_SRC)/sw/simulator -I$(PAPARAZZI_SRC)/sw/simulator/nps -I$(PAPARAZZI_HOME)/conf/simulator/nps
|
|
||||||
nps.LDFLAGS += $(shell sdl-config --libs)
|
|
||||||
|
|
||||||
#
|
|
||||||
# add the simulator directory to the make searchpath
|
|
||||||
#
|
|
||||||
VPATH += $(PAPARAZZI_SRC)/sw/simulator
|
|
||||||
|
|
||||||
NPSDIR = nps
|
|
||||||
nps.srcs += $(NPSDIR)/nps_main.c \
|
|
||||||
$(NPSDIR)/nps_fdm_crrcsim.c \
|
|
||||||
$(NPSDIR)/nps_random.c \
|
|
||||||
$(NPSDIR)/nps_sensors.c \
|
|
||||||
$(NPSDIR)/nps_sensors_utils.c \
|
|
||||||
$(NPSDIR)/nps_sensor_gyro.c \
|
|
||||||
$(NPSDIR)/nps_sensor_accel.c \
|
|
||||||
$(NPSDIR)/nps_sensor_mag.c \
|
|
||||||
$(NPSDIR)/nps_sensor_baro.c \
|
|
||||||
$(NPSDIR)/nps_sensor_sonar.c \
|
|
||||||
$(NPSDIR)/nps_sensor_gps.c \
|
|
||||||
$(NPSDIR)/nps_sensor_airspeed.c \
|
|
||||||
$(NPSDIR)/nps_sensor_temperature.c \
|
|
||||||
$(NPSDIR)/nps_electrical.c \
|
|
||||||
$(NPSDIR)/nps_atmosphere.c \
|
|
||||||
$(NPSDIR)/nps_radio_control.c \
|
|
||||||
$(NPSDIR)/nps_radio_control_joystick.c \
|
|
||||||
$(NPSDIR)/nps_radio_control_spektrum.c \
|
|
||||||
$(NPSDIR)/nps_autopilot_fixedwing.c \
|
|
||||||
$(NPSDIR)/nps_ivy.c \
|
|
||||||
$(NPSDIR)/nps_flightgear.c \
|
|
||||||
|
|
||||||
|
|
||||||
include $(CFG_SHARED)/telemetry_transparent_udp.makefile
|
|
||||||
nps.srcs += subsystems/datalink/datalink.c $(SRC_FIRMWARE)/fixedwing_datalink.c
|
|
||||||
nps.srcs += $(SRC_FIRMWARE)/ap_downlink.c $(SRC_FIRMWARE)/fbw_downlink.c
|
|
||||||
|
|||||||
@@ -1,73 +0,0 @@
|
|||||||
# Hey Emacs, this is a -*- makefile -*-
|
|
||||||
|
|
||||||
#
|
|
||||||
# SITL Simulator
|
|
||||||
#
|
|
||||||
|
|
||||||
JSBSIM_ROOT ?= /opt/jsbsim
|
|
||||||
JSBSIM_INC = $(JSBSIM_ROOT)/include/JSBSim
|
|
||||||
JSBSIM_LIB = $(JSBSIM_ROOT)/lib
|
|
||||||
|
|
||||||
SRC_FIRMWARE=firmwares/fixedwing
|
|
||||||
|
|
||||||
SRC_BOARD=boards/$(BOARD)
|
|
||||||
|
|
||||||
nps.ARCHDIR = sim
|
|
||||||
|
|
||||||
# include Makefile.nps instead of Makefile.sim
|
|
||||||
nps.MAKEFILE = nps
|
|
||||||
|
|
||||||
# add normal ap and fbw sources define in autopilot.makefile
|
|
||||||
nps.CFLAGS += $(fbw_CFLAGS) $(ap_CFLAGS)
|
|
||||||
nps.srcs += $(fbw_srcs) $(ap_srcs)
|
|
||||||
|
|
||||||
nps.CFLAGS += -DSITL -DUSE_NPS
|
|
||||||
nps.CFLAGS += $(shell pkg-config glib-2.0 --cflags)
|
|
||||||
nps.LDFLAGS += $(shell pkg-config glib-2.0 --libs) -lm -lglibivy $(shell pcre-config --libs) -lgsl -lgslcblas
|
|
||||||
nps.CFLAGS += -I$(SRC_FIRMWARE) -I$(SRC_BOARD) -I$(PAPARAZZI_SRC)/sw/simulator -I$(PAPARAZZI_SRC)/sw/simulator/nps -I$(PAPARAZZI_HOME)/conf/simulator/nps
|
|
||||||
nps.LDFLAGS += $(shell sdl-config --libs)
|
|
||||||
|
|
||||||
# use the paparazzi-jsbsim package if it is installed, otherwise look for JSBsim under /opt/jsbsim
|
|
||||||
JSBSIM_PKG ?= $(shell pkg-config JSBSim --exists && echo 'yes')
|
|
||||||
ifeq ($(JSBSIM_PKG), yes)
|
|
||||||
nps.CFLAGS += $(shell pkg-config JSBSim --cflags)
|
|
||||||
nps.LDFLAGS += $(shell pkg-config JSBSim --libs)
|
|
||||||
else
|
|
||||||
JSBSIM_PKG = no
|
|
||||||
nps.CFLAGS += -I$(JSBSIM_INC)
|
|
||||||
nps.LDFLAGS += -L$(JSBSIM_LIB) -lJSBSim
|
|
||||||
endif
|
|
||||||
|
|
||||||
#
|
|
||||||
# add the simulator directory to the make searchpath
|
|
||||||
#
|
|
||||||
VPATH += $(PAPARAZZI_SRC)/sw/simulator
|
|
||||||
|
|
||||||
NPSDIR = nps
|
|
||||||
nps.srcs += $(NPSDIR)/nps_main.c \
|
|
||||||
$(NPSDIR)/nps_fdm_jsbsim.cpp \
|
|
||||||
$(NPSDIR)/nps_random.c \
|
|
||||||
$(NPSDIR)/nps_sensors.c \
|
|
||||||
$(NPSDIR)/nps_sensors_utils.c \
|
|
||||||
$(NPSDIR)/nps_sensor_gyro.c \
|
|
||||||
$(NPSDIR)/nps_sensor_accel.c \
|
|
||||||
$(NPSDIR)/nps_sensor_mag.c \
|
|
||||||
$(NPSDIR)/nps_sensor_baro.c \
|
|
||||||
$(NPSDIR)/nps_sensor_sonar.c \
|
|
||||||
$(NPSDIR)/nps_sensor_gps.c \
|
|
||||||
$(NPSDIR)/nps_sensor_airspeed.c \
|
|
||||||
$(NPSDIR)/nps_sensor_temperature.c \
|
|
||||||
$(NPSDIR)/nps_electrical.c \
|
|
||||||
$(NPSDIR)/nps_atmosphere.c \
|
|
||||||
$(NPSDIR)/nps_radio_control.c \
|
|
||||||
$(NPSDIR)/nps_radio_control_joystick.c \
|
|
||||||
$(NPSDIR)/nps_radio_control_spektrum.c \
|
|
||||||
$(NPSDIR)/nps_autopilot_fixedwing.c \
|
|
||||||
$(NPSDIR)/nps_ivy.c \
|
|
||||||
$(NPSDIR)/nps_flightgear.c \
|
|
||||||
|
|
||||||
nps.srcs += math/pprz_geodetic_wmm2015.c
|
|
||||||
|
|
||||||
include $(CFG_SHARED)/telemetry_transparent_udp.makefile
|
|
||||||
nps.srcs += subsystems/datalink/datalink.c $(SRC_FIRMWARE)/fixedwing_datalink.c
|
|
||||||
nps.srcs += $(SRC_FIRMWARE)/ap_downlink.c $(SRC_FIRMWARE)/fbw_downlink.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
$(error The fdm_nps subsystem has been renamed, please replace <subsystem name="fdm" type="nps"/> with <subsystem name="fdm" type="jsbsim"/> in your airframe file.)
|
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
|
|
||||||
|
#
|
||||||
|
# JSBSim FDM backend for NPS Simulator
|
||||||
|
#
|
||||||
|
|
||||||
|
JSBSIM_ROOT ?= /opt/jsbsim
|
||||||
|
JSBSIM_INC = $(JSBSIM_ROOT)/include/JSBSim
|
||||||
|
JSBSIM_LIB = $(JSBSIM_ROOT)/lib
|
||||||
|
|
||||||
|
# use the paparazzi-jsbsim package if it is installed, otherwise look for JSBsim under /opt/jsbsim
|
||||||
|
JSBSIM_PKG ?= $(shell pkg-config JSBSim --exists && echo 'yes')
|
||||||
|
ifeq ($(JSBSIM_PKG), yes)
|
||||||
|
nps.CFLAGS += $(shell pkg-config JSBSim --cflags)
|
||||||
|
nps.LDFLAGS += $(shell pkg-config JSBSim --libs)
|
||||||
|
else
|
||||||
|
JSBSIM_PKG = no
|
||||||
|
nps.CFLAGS += -I$(JSBSIM_INC)
|
||||||
|
nps.LDFLAGS += -L$(JSBSIM_LIB) -lJSBSim
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
nps.srcs += nps/nps_fdm_jsbsim.cpp
|
||||||
+4
-23
@@ -1,16 +1,11 @@
|
|||||||
# Hey Emacs, this is a -*- makefile -*-
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
|
|
||||||
#
|
#
|
||||||
# SITL Simulator
|
# NPS SITL Simulator
|
||||||
|
#
|
||||||
|
# still needs a FDM backend to be specified, e.g.
|
||||||
|
# <subsystem name="fdm" type="jsbsim"/>
|
||||||
#
|
#
|
||||||
|
|
||||||
JSBSIM_ROOT ?= /opt/jsbsim
|
|
||||||
JSBSIM_INC = $(JSBSIM_ROOT)/include/JSBSim
|
|
||||||
JSBSIM_LIB = $(JSBSIM_ROOT)/lib
|
|
||||||
|
|
||||||
SRC_FIRMWARE=firmwares/rotorcraft
|
|
||||||
|
|
||||||
SRC_BOARD=boards/$(BOARD)
|
|
||||||
|
|
||||||
nps.ARCHDIR = sim
|
nps.ARCHDIR = sim
|
||||||
|
|
||||||
@@ -23,16 +18,6 @@ nps.LDFLAGS += $(shell pkg-config glib-2.0 --libs) -lm -lglibivy $(shell pcre-co
|
|||||||
nps.CFLAGS += -I$(SRC_FIRMWARE) -I$(SRC_BOARD) -I$(PAPARAZZI_SRC)/sw/simulator -I$(PAPARAZZI_SRC)/sw/simulator/nps -I$(PAPARAZZI_HOME)/conf/simulator/nps
|
nps.CFLAGS += -I$(SRC_FIRMWARE) -I$(SRC_BOARD) -I$(PAPARAZZI_SRC)/sw/simulator -I$(PAPARAZZI_SRC)/sw/simulator/nps -I$(PAPARAZZI_HOME)/conf/simulator/nps
|
||||||
nps.LDFLAGS += $(shell sdl-config --libs)
|
nps.LDFLAGS += $(shell sdl-config --libs)
|
||||||
|
|
||||||
# use the paparazzi-jsbsim package if it is installed, otherwise look for JSBsim under /opt/jsbsim
|
|
||||||
JSBSIM_PKG ?= $(shell pkg-config JSBSim --exists && echo 'yes')
|
|
||||||
ifeq ($(JSBSIM_PKG), yes)
|
|
||||||
nps.CFLAGS += $(shell pkg-config JSBSim --cflags)
|
|
||||||
nps.LDFLAGS += $(shell pkg-config JSBSim --libs)
|
|
||||||
else
|
|
||||||
JSBSIM_PKG = no
|
|
||||||
nps.CFLAGS += -I$(JSBSIM_INC)
|
|
||||||
nps.LDFLAGS += -L$(JSBSIM_LIB) -lJSBSim
|
|
||||||
endif
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# add the simulator directory to the make searchpath
|
# add the simulator directory to the make searchpath
|
||||||
@@ -41,7 +26,6 @@ VPATH += $(PAPARAZZI_SRC)/sw/simulator
|
|||||||
|
|
||||||
NPSDIR = nps
|
NPSDIR = nps
|
||||||
nps.srcs += $(NPSDIR)/nps_main.c \
|
nps.srcs += $(NPSDIR)/nps_main.c \
|
||||||
$(NPSDIR)/nps_fdm_jsbsim.cpp \
|
|
||||||
$(NPSDIR)/nps_random.c \
|
$(NPSDIR)/nps_random.c \
|
||||||
$(NPSDIR)/nps_sensors.c \
|
$(NPSDIR)/nps_sensors.c \
|
||||||
$(NPSDIR)/nps_sensors_utils.c \
|
$(NPSDIR)/nps_sensors_utils.c \
|
||||||
@@ -58,7 +42,6 @@ nps.srcs += $(NPSDIR)/nps_main.c \
|
|||||||
$(NPSDIR)/nps_radio_control.c \
|
$(NPSDIR)/nps_radio_control.c \
|
||||||
$(NPSDIR)/nps_radio_control_joystick.c \
|
$(NPSDIR)/nps_radio_control_joystick.c \
|
||||||
$(NPSDIR)/nps_radio_control_spektrum.c \
|
$(NPSDIR)/nps_radio_control_spektrum.c \
|
||||||
$(NPSDIR)/nps_autopilot_rotorcraft.c \
|
|
||||||
$(NPSDIR)/nps_ivy.c \
|
$(NPSDIR)/nps_ivy.c \
|
||||||
$(NPSDIR)/nps_flightgear.c
|
$(NPSDIR)/nps_flightgear.c
|
||||||
|
|
||||||
@@ -66,5 +49,3 @@ nps.srcs += $(NPSDIR)/nps_main.c \
|
|||||||
nps.srcs += math/pprz_geodetic_wmm2015.c
|
nps.srcs += math/pprz_geodetic_wmm2015.c
|
||||||
|
|
||||||
include $(CFG_SHARED)/telemetry_transparent_udp.makefile
|
include $(CFG_SHARED)/telemetry_transparent_udp.makefile
|
||||||
nps.srcs += $(SRC_FIRMWARE)/rotorcraft_telemetry.c
|
|
||||||
nps.srcs += subsystems/datalink/datalink.c $(SRC_FIRMWARE)/rotorcraft_datalink.c
|
|
||||||
Reference in New Issue
Block a user