New Paparazzi Simulator (NPS) common files
Bindings between embedded autopilot code and a flight dynamic model (FDM).
Can run Software In The Loop (SITL) or Hardware In The Loop (HITL) simulations.
math
$(TARGET).MAKEFILE = $(TARGET)
$(TARGET).ARCHDIR = sim
# detect system arch and include rt and pthread library only on linux
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
$(TARGET).LDFLAGS += -lrt -pthread
endif
# sdl needed for joystick input
$(TARGET).LDFLAGS += $(shell sdl-config --libs)
# glib is still needed for some components (such as radio input)
$(TARGET).CFLAGS += $(shell pkg-config glib-2.0 --cflags)
$(TARGET).LDFLAGS += $(shell pkg-config glib-2.0 --libs)
#
# add the simulator and var directory to the make searchpath
#
VPATH += $(PAPARAZZI_SRC)/sw/simulator
VPATH += $(PAPARAZZI_HOME)/var/share
PCRE_CHECK = $(shell ldd /usr/lib/libivy.so | grep libpcre2-8)
ifneq ($(PCRE_CHECK),)
PCRE_LDFLAGS= $(shell pcre2-config --libs8)
else
PCRE_LDFLAGS= $(shell pcre-config --libs)
endif