mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-26 16:30:07 +08:00
simplifly Makefiles a bit, use ?= instead of ifndef
This commit is contained in:
+2
-3
@@ -33,9 +33,8 @@ ACINCLUDE = $(PAPARAZZI_HOME)/var/$(AIRCRAFT)
|
||||
AIRCRAFT_CONF_DIR = $(ACINCLUDE)/conf
|
||||
AC_GENERATED = $(ACINCLUDE)/generated
|
||||
|
||||
ifndef PERIODIC_FREQ
|
||||
PERIODIC_FREQ = 60
|
||||
endif
|
||||
# periodic frequency defaults to 60Hz
|
||||
PERIODIC_FREQ ?= 60
|
||||
|
||||
AIRFRAME_H=$(AC_GENERATED)/airframe.h
|
||||
PERIODIC_H=$(AC_GENERATED)/periodic_telemetry.h
|
||||
|
||||
+1
-3
@@ -126,9 +126,7 @@ LDFLAGS +=-T$(LDSCRIPT)
|
||||
|
||||
# Settings and variables:
|
||||
LPC21ISP = lpc21isp
|
||||
ifndef LPC21ISP_PORT
|
||||
LPC21ISP_PORT = /dev/ttyS0
|
||||
endif
|
||||
LPC21ISP_PORT ?= /dev/ttyS0
|
||||
LPC21ISP_FLASHFILE = $(OBJDIR)/$(TARGET).hex
|
||||
# verbose output:
|
||||
#LPC21ISP_DEBUG = -debug
|
||||
|
||||
+5
-9
@@ -45,9 +45,7 @@ OPT = s
|
||||
#OPT = 0
|
||||
|
||||
|
||||
ifndef $(PYTHON)
|
||||
PYTHON = $(shell which python)
|
||||
endif
|
||||
PYTHON ?= $(shell which python)
|
||||
|
||||
ifneq ($(BOARD_SERIAL),)
|
||||
OOCD_OPTIONS = -c "ft2232_serial $(BOARD_SERIAL)"
|
||||
@@ -266,11 +264,10 @@ upload: $(OBJDIR)/$(TARGET).hex
|
||||
-c shutdown
|
||||
else
|
||||
# jtag via BMP
|
||||
ifndef $(BMP_UPLOAD_SCRIPT)
|
||||
BMP_UPLOAD_SCRIPT = $(PAPARAZZI_SRC)/conf/boards/upload_scripts/bmp_jtag_flash.scr
|
||||
endif
|
||||
BMP_UPLOAD_SCRIPT ?= $(PAPARAZZI_SRC)/conf/boards/upload_scripts/bmp_jtag_flash.scr
|
||||
|
||||
upload: $(OBJDIR)/$(TARGET).elf
|
||||
@echo "Assuming luftboot bootloader: $(ASSUMING_LUFTBOOT)"
|
||||
@echo "Using Black Magic Probe with JTAG"
|
||||
@echo "Using GDB = $(GDB)"
|
||||
@echo " BMP\t$<"
|
||||
@@ -284,10 +281,9 @@ endif
|
||||
else ifeq ($(FLASH_MODE),SWD)
|
||||
# only works if BMP_PORT is defined
|
||||
ifneq ($(BMP_PORT),)
|
||||
ifndef $(BMP_UPLOAD_SCRIPT)
|
||||
BMP_UPLOAD_SCRIPT = $(PAPARAZZI_SRC)/conf/boards/upload_scripts/bmp_swd_flash.scr
|
||||
endif
|
||||
BMP_UPLOAD_SCRIPT ?= $(PAPARAZZI_SRC)/conf/boards/upload_scripts/bmp_swd_flash.scr
|
||||
upload: $(OBJDIR)/$(TARGET).elf
|
||||
@echo "Assuming luftboot bootloader: $(ASSUMING_LUFTBOOT)"
|
||||
@echo "Using Black Magic Probe with SWD"
|
||||
@echo "Using GDB = $(GDB)"
|
||||
@echo " BMP\t$<"
|
||||
|
||||
Reference in New Issue
Block a user