diff --git a/conf/chibios/chibios_rules.mk b/conf/chibios/chibios_rules.mk index 8d74f87b0c..b5dece601d 100644 --- a/conf/chibios/chibios_rules.mk +++ b/conf/chibios/chibios_rules.mk @@ -99,7 +99,7 @@ endif CPPFLAGS += -MD -MP -MF .dep/$(@F).d # Paths where to search for sources -VPATH = $(SRCPATHS) +VPATH += $(SRCPATHS) # # Include user extra rules if any diff --git a/conf/firmwares/demo.makefile b/conf/firmwares/demo.makefile index cb5e311046..c0070243a8 100644 --- a/conf/firmwares/demo.makefile +++ b/conf/firmwares/demo.makefile @@ -35,6 +35,7 @@ SRC_MODULES=modules CFG_SHARED=$(PAPARAZZI_SRC)/conf/firmwares/subsystems/shared +VPATH += $(PAPARAZZI_HOME)/var/share # # common test diff --git a/conf/firmwares/fixedwing.makefile b/conf/firmwares/fixedwing.makefile index aaa3ba7644..e89c0d512e 100644 --- a/conf/firmwares/fixedwing.makefile +++ b/conf/firmwares/fixedwing.makefile @@ -20,7 +20,7 @@ SRC_MODULES=modules FIXEDWING_INC = -I$(SRC_FIRMWARE) -I$(SRC_FIXEDWING) -I$(SRC_BOARD) - +VPATH += $(PAPARAZZI_HOME)/var/share # Standard Fixed Wing Code include $(CFG_FIXEDWING)/autopilot.makefile diff --git a/conf/firmwares/rotorcraft.makefile b/conf/firmwares/rotorcraft.makefile index 75b00bc6b5..87307f7b45 100644 --- a/conf/firmwares/rotorcraft.makefile +++ b/conf/firmwares/rotorcraft.makefile @@ -33,10 +33,11 @@ SRC_ARCH=arch/$(ARCH) ROTORCRAFT_INC = -I$(SRC_FIRMWARE) -I$(SRC_BOARD) - ap.ARCHDIR = $(ARCH) +VPATH += $(PAPARAZZI_HOME)/var/share + ###################################################################### ## ## COMMON ROTORCRAFT ALL TARGETS (AP + NPS) diff --git a/conf/firmwares/setup.makefile b/conf/firmwares/setup.makefile index 1458cc015d..6b5a179a7e 100644 --- a/conf/firmwares/setup.makefile +++ b/conf/firmwares/setup.makefile @@ -12,6 +12,8 @@ CFG_SHARED=$(PAPARAZZI_SRC)/conf/firmwares/subsystems/shared SRC_FIRMWARE=firmwares/setup +VPATH += $(PAPARAZZI_HOME)/var/share + # # common setup # @@ -110,7 +112,7 @@ setup_actuators.CFLAGS += -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD) SETUP_ACTUATORS_MODEM_PORT_LOWER=$(shell echo $(MODEM_PORT) | tr A-Z a-z) setup_actuators.CFLAGS += -DDOWNLINK -DDOWNLINK_DEVICE=$(SETUP_ACTUATORS_MODEM_PORT_LOWER) -DPPRZ_UART=$(SETUP_ACTUATORS_MODEM_PORT_LOWER) setup_actuators.CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=PPRZ -setup_actuators.srcs += subsystems/datalink/downlink.c $(PAPARAZZI_HOME)/var/share/pprzlink/src/pprz_transport.c +setup_actuators.srcs += subsystems/datalink/downlink.c pprzlink/src/pprz_transport.c setup_actuators.srcs += subsystems/actuators.c setup_actuators.srcs += $(SRC_FIRMWARE)/setup_actuators.c diff --git a/conf/firmwares/subsystems/fixedwing/autopilot.makefile b/conf/firmwares/subsystems/fixedwing/autopilot.makefile index 02e17682ba..8b03cf0c3b 100644 --- a/conf/firmwares/subsystems/fixedwing/autopilot.makefile +++ b/conf/firmwares/subsystems/fixedwing/autopilot.makefile @@ -196,7 +196,7 @@ sim.CFLAGS += -DSITL sim.srcs += $(SRC_ARCH)/sim_ap.c sim.CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_TRANSPORT=ivy_tp -DDOWNLINK_DEVICE=ivy_tp -sim.srcs += subsystems/datalink/downlink.c subsystems/datalink/datalink.c $(SRC_FIRMWARE)/fixedwing_datalink.c $(PAPARAZZI_HOME)/var/share/pprzlink/src/ivy_transport.c subsystems/datalink/telemetry.c $(SRC_FIRMWARE)/ap_downlink.c $(SRC_FIRMWARE)/fbw_downlink.c +sim.srcs += subsystems/datalink/downlink.c subsystems/datalink/datalink.c $(SRC_FIRMWARE)/fixedwing_datalink.c pprzlink/src/ivy_transport.c subsystems/datalink/telemetry.c $(SRC_FIRMWARE)/ap_downlink.c $(SRC_FIRMWARE)/fbw_downlink.c sim.srcs += $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_adc_generic.c diff --git a/conf/firmwares/subsystems/fixedwing/fdm_crrcsim.makefile b/conf/firmwares/subsystems/fixedwing/fdm_crrcsim.makefile index 121fcb3b43..23677fb1f0 100644 --- a/conf/firmwares/subsystems/fixedwing/fdm_crrcsim.makefile +++ b/conf/firmwares/subsystems/fixedwing/fdm_crrcsim.makefile @@ -26,7 +26,7 @@ nps.LDFLAGS += $(shell sdl-config --libs) # # add the simulator directory to the make searchpath # -VPATH = $(PAPARAZZI_SRC)/sw/simulator +VPATH += $(PAPARAZZI_SRC)/sw/simulator NPSDIR = nps nps.srcs += $(NPSDIR)/nps_main.c \ diff --git a/conf/firmwares/subsystems/fixedwing/fdm_jsbsim.makefile b/conf/firmwares/subsystems/fixedwing/fdm_jsbsim.makefile index 2828d69b1a..540c3286cb 100644 --- a/conf/firmwares/subsystems/fixedwing/fdm_jsbsim.makefile +++ b/conf/firmwares/subsystems/fixedwing/fdm_jsbsim.makefile @@ -41,7 +41,7 @@ endif # # add the simulator directory to the make searchpath # -VPATH = $(PAPARAZZI_SRC)/sw/simulator +VPATH += $(PAPARAZZI_SRC)/sw/simulator NPSDIR = nps nps.srcs += $(NPSDIR)/nps_main.c \ diff --git a/conf/firmwares/subsystems/rotorcraft/fdm_jsbsim.makefile b/conf/firmwares/subsystems/rotorcraft/fdm_jsbsim.makefile index 8c9c594aad..1f18514478 100644 --- a/conf/firmwares/subsystems/rotorcraft/fdm_jsbsim.makefile +++ b/conf/firmwares/subsystems/rotorcraft/fdm_jsbsim.makefile @@ -37,7 +37,7 @@ endif # # add the simulator directory to the make searchpath # -VPATH = $(PAPARAZZI_SRC)/sw/simulator +VPATH += $(PAPARAZZI_SRC)/sw/simulator NPSDIR = nps nps.srcs += $(NPSDIR)/nps_main.c \ diff --git a/conf/firmwares/subsystems/rotorcraft/intermcu_uart.makefile b/conf/firmwares/subsystems/rotorcraft/intermcu_uart.makefile index ee82ff1437..3199bbd3fd 100644 --- a/conf/firmwares/subsystems/rotorcraft/intermcu_uart.makefile +++ b/conf/firmwares/subsystems/rotorcraft/intermcu_uart.makefile @@ -7,7 +7,7 @@ ifeq ($(TARGET),fbw) INTERMCU_PORT_LOWER = $(shell echo $(INTERMCU_PORT) | tr A-Z a-z) fbw.CFLAGS += -DINTERMCU_LINK=$(INTERMCU_PORT_LOWER) -DUSE_$(INTERMCU_PORT) -D$(INTERMCU_PORT)_BAUD=B230400 fbw.CFLAGS += -DINTER_MCU_FBW -DDOWNLINK - fbw.srcs += $(PAPARAZZI_HOME)/var/share/pprzlink/src/pprz_transport.c + fbw.srcs += pprzlink/src/pprz_transport.c fbw.srcs += subsystems/intermcu/intermcu_fbw.c else INTERMCU_PORT ?= UART3 @@ -18,6 +18,6 @@ else $(TARGET).CFLAGS += -DRADIO_CONTROL_LED=$(RADIO_CONTROL_LED) ap.srcs += subsystems/intermcu/intermcu_ap.c - ap.srcs += $(PAPARAZZI_HOME)/var/share/pprzlink/src/pprz_transport.c + ap.srcs += pprzlink/src/pprz_transport.c $(TARGET).srcs += subsystems/radio_control.c endif diff --git a/conf/firmwares/subsystems/shared/sdlog.makefile b/conf/firmwares/subsystems/shared/sdlog.makefile index d4437b46cb..6a49f8b973 100644 --- a/conf/firmwares/subsystems/shared/sdlog.makefile +++ b/conf/firmwares/subsystems/shared/sdlog.makefile @@ -1,7 +1,7 @@ # Hey Emacs, this is a -*- makefile -*- sdlog_CFLAGS = -DDOWNLINK -DUSE_PPRZLOG -sdlog_srcs = subsystems/datalink/downlink.c $(PAPARAZZI_HOME)/var/share/pprzlink/src/pprzlog_transport.c +sdlog_srcs = subsystems/datalink/downlink.c pprzlink/src/pprzlog_transport.c ap.CFLAGS += $(sdlog_CFLAGS) ap.srcs += $(sdlog_srcs) diff --git a/conf/firmwares/subsystems/shared/telemetry_bluegiga.makefile b/conf/firmwares/subsystems/shared/telemetry_bluegiga.makefile index 3a101e64e7..45e995ae66 100644 --- a/conf/firmwares/subsystems/shared/telemetry_bluegiga.makefile +++ b/conf/firmwares/subsystems/shared/telemetry_bluegiga.makefile @@ -32,4 +32,4 @@ ap.CFLAGS += -DMODEM_LED=$(MODEM_LED) endif ap.srcs += $(SRC_SUBSYSTEMS)/datalink/downlink.c subsystems/datalink/datalink.c $(SRC_SUBSYSTEMS)/datalink/bluegiga.c -ap.srcs += $(PAPARAZZI_HOME)/var/share/pprzlink/src/pprz_transport.c $(SRC_SUBSYSTEMS)/datalink/telemetry.c +ap.srcs += pprzlink/src/pprz_transport.c $(SRC_SUBSYSTEMS)/datalink/telemetry.c diff --git a/conf/firmwares/subsystems/shared/telemetry_ivy.makefile b/conf/firmwares/subsystems/shared/telemetry_ivy.makefile index 4f2b7aa249..6236da98d4 100644 --- a/conf/firmwares/subsystems/shared/telemetry_ivy.makefile +++ b/conf/firmwares/subsystems/shared/telemetry_ivy.makefile @@ -1,3 +1,3 @@ $(TARGET).CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_TRANSPORT=ivy_tp -DDOWNLINK_DEVICE=ivy_tp -$(TARGET).srcs += $(PAPARAZZI_HOME)/var/share/pprzlink/src/ivy_transport.c +$(TARGET).srcs += pprzlink/src/ivy_transport.c $(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/datalink.c subsystems/datalink/telemetry.c diff --git a/conf/firmwares/subsystems/shared/telemetry_superbitrf.makefile b/conf/firmwares/subsystems/shared/telemetry_superbitrf.makefile index 4c697039eb..56a180c4c8 100644 --- a/conf/firmwares/subsystems/shared/telemetry_superbitrf.makefile +++ b/conf/firmwares/subsystems/shared/telemetry_superbitrf.makefile @@ -7,4 +7,4 @@ $(TARGET).CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_DEVICE=superbitrf $(TARGET).CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=SUPERBITRF $(TARGET).srcs += peripherals/cyrf6936.c -$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/datalink.c subsystems/datalink/superbitrf.c $(PAPARAZZI_HOME)/var/share/pprzlink/src/pprz_transport.c subsystems/datalink/telemetry.c +$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/datalink.c subsystems/datalink/superbitrf.c pprzlink/src/pprz_transport.c subsystems/datalink/telemetry.c diff --git a/conf/firmwares/subsystems/shared/telemetry_transparent.makefile b/conf/firmwares/subsystems/shared/telemetry_transparent.makefile index 804e6b9637..47f1aca1f1 100644 --- a/conf/firmwares/subsystems/shared/telemetry_transparent.makefile +++ b/conf/firmwares/subsystems/shared/telemetry_transparent.makefile @@ -13,5 +13,5 @@ $(TARGET).CFLAGS += -D$(PPRZ_MODEM_PORT_UPPER)_BAUD=$(MODEM_BAUD) $(TARGET).CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_DEVICE=$(PPRZ_MODEM_PORT_LOWER) -DPPRZ_UART=$(PPRZ_MODEM_PORT_LOWER) $(TARGET).CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=PPRZ -$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/datalink.c $(PAPARAZZI_HOME)/var/share/pprzlink/src/pprz_transport.c subsystems/datalink/telemetry.c +$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/datalink.c pprzlink/src/pprz_transport.c subsystems/datalink/telemetry.c diff --git a/conf/firmwares/subsystems/shared/telemetry_transparent_udp.makefile b/conf/firmwares/subsystems/shared/telemetry_transparent_udp.makefile index ae95aed8fa..0c6c40041e 100644 --- a/conf/firmwares/subsystems/shared/telemetry_transparent_udp.makefile +++ b/conf/firmwares/subsystems/shared/telemetry_transparent_udp.makefile @@ -19,5 +19,5 @@ TELEM_CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=PPRZ $(TARGET).CFLAGS += $(MODEM_CFLAGS) $(TELEM_CFLAGS) -$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/datalink.c $(PAPARAZZI_HOME)/var/share/pprzlink/src/pprz_transport.c subsystems/datalink/telemetry.c +$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/datalink.c pprzlink/src/pprz_transport.c subsystems/datalink/telemetry.c diff --git a/conf/firmwares/subsystems/shared/telemetry_transparent_usb.makefile b/conf/firmwares/subsystems/shared/telemetry_transparent_usb.makefile index 9cb35f198b..4ac1679d54 100644 --- a/conf/firmwares/subsystems/shared/telemetry_transparent_usb.makefile +++ b/conf/firmwares/subsystems/shared/telemetry_transparent_usb.makefile @@ -4,7 +4,7 @@ $(TARGET).CFLAGS += -DDOWNLINK -DDOWNLINK_DEVICE=usb_serial -DPPRZ_UART=usb_serial $(TARGET).CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=PPRZ -DUSE_USB_SERIAL $(TARGET).CFLAGS += -DPERIODIC_TELEMETRY -$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/datalink.c $(PAPARAZZI_HOME)/var/share/pprzlink/src/pprz_transport.c subsystems/datalink/telemetry.c +$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/datalink.c pprzlink/src/pprz_transport.c subsystems/datalink/telemetry.c ifeq ($(ARCH), lpc21) $(TARGET).srcs += $(SRC_ARCH)/usb_ser_hw.c $(SRC_ARCH)/lpcusb/usbhw_lpc.c $(SRC_ARCH)/lpcusb/usbcontrol.c diff --git a/conf/firmwares/subsystems/shared/telemetry_w5100.makefile b/conf/firmwares/subsystems/shared/telemetry_w5100.makefile index 090d1cc828..83cb26413b 100644 --- a/conf/firmwares/subsystems/shared/telemetry_w5100.makefile +++ b/conf/firmwares/subsystems/shared/telemetry_w5100.makefile @@ -10,7 +10,7 @@ W5100_MULTICAST_PORT ?= "1234" $(TARGET).CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_DEVICE=chip0 $(TARGET).CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=W5100 $(TARGET).CFLAGS += -DW5100_IP=$(W5100_IP) -DW5100_SUBNET=$(W5100_SUBNET) -DW5100_MULTICAST_IP=$(W5100_MULTICAST_IP) -DW5100_MULTICAST_PORT=$(W5100_MULTICAST_PORT) -$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/datalink.c subsystems/datalink/w5100.c $(PAPARAZZI_HOME)/var/share/pprzlink/src/pprz_transport.c subsystems/datalink/telemetry.c +$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/datalink.c subsystems/datalink/w5100.c pprzlink/src/pprz_transport.c subsystems/datalink/telemetry.c ifeq ($(ARCH), lpc21) # only an issue of setting the DRDY pin in w5100.c, which is stm32 specific diff --git a/conf/firmwares/subsystems/shared/telemetry_xbee_api.makefile b/conf/firmwares/subsystems/shared/telemetry_xbee_api.makefile index 920585468f..54552871c7 100644 --- a/conf/firmwares/subsystems/shared/telemetry_xbee_api.makefile +++ b/conf/firmwares/subsystems/shared/telemetry_xbee_api.makefile @@ -14,4 +14,4 @@ $(TARGET).CFLAGS += -D$(XBEE_MODEM_PORT_UPPER)_BAUD=$(MODEM_BAUD) -DXBEE_BAUD=$( $(TARGET).CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_DEVICE=$(XBEE_MODEM_PORT_LOWER) -DXBEE_UART=$(XBEE_MODEM_PORT_LOWER) $(TARGET).CFLAGS += -DDOWNLINK_TRANSPORT=xbee_tp -DDATALINK=XBEE -$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/datalink.c $(PAPARAZZI_HOME)/var/share/pprzlink/src/xbee_transport.c subsystems/datalink/telemetry.c +$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/datalink.c pprzlink/src/xbee_transport.c subsystems/datalink/telemetry.c diff --git a/conf/firmwares/test_progs.makefile b/conf/firmwares/test_progs.makefile index bb815daa46..46b00af392 100644 --- a/conf/firmwares/test_progs.makefile +++ b/conf/firmwares/test_progs.makefile @@ -35,6 +35,7 @@ SRC_MODULES=modules CFG_SHARED=$(PAPARAZZI_SRC)/conf/firmwares/subsystems/shared +VPATH += $(PAPARAZZI_HOME)/var/share # # common test @@ -70,7 +71,7 @@ endif # pprz downlink/datalink COMMON_TELEMETRY_CFLAGS = -DDOWNLINK -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=PPRZ -COMMON_TELEMETRY_SRCS = subsystems/datalink/downlink.c $(PAPARAZZI_HOME)/var/share/pprzlink/src/pprz_transport.c +COMMON_TELEMETRY_SRCS = subsystems/datalink/downlink.c pprzlink/src/pprz_transport.c # check if we are using UDP ifneq (,$(findstring UDP, $(MODEM_DEV)))