mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
Rename makefiles to help categorise them.
This commit is contained in:
9
Makefile
9
Makefile
@@ -69,13 +69,14 @@ $(STAGED_FIRMWARES): $(IMAGE_DIR)/%.px4: $(BUILD_DIR)/%.build/firmware.px4
|
|||||||
#
|
#
|
||||||
# Generate FIRMWARES.
|
# Generate FIRMWARES.
|
||||||
#
|
#
|
||||||
|
.PHONY: $(FIRMWARES)
|
||||||
$(BUILD_DIR)/%.build/firmware.px4: config = $(patsubst $(BUILD_DIR)/%.build/firmware.px4,%,$@)
|
$(BUILD_DIR)/%.build/firmware.px4: config = $(patsubst $(BUILD_DIR)/%.build/firmware.px4,%,$@)
|
||||||
$(BUILD_DIR)/%.build/firmware.px4: work_dir = $(BUILD_DIR)/$(config).build
|
$(BUILD_DIR)/%.build/firmware.px4: work_dir = $(BUILD_DIR)/$(config).build
|
||||||
$(FIRMWARES): $(BUILD_DIR)/%.build/firmware.px4:
|
$(FIRMWARES): $(BUILD_DIR)/%.build/firmware.px4:
|
||||||
@echo %%%% Building $(config) in $(work_dir)
|
@echo %%%% Building $(config) in $(work_dir)
|
||||||
$(Q) mkdir -p $(work_dir)
|
$(Q) mkdir -p $(work_dir)
|
||||||
$(Q) make -C $(work_dir) \
|
$(Q) make -C $(work_dir) \
|
||||||
-f $(PX4_BASE)/makefiles/$(config).mk \
|
-f $(PX4_BASE)/makefiles/config_$(config).mk \
|
||||||
WORK_DIR=$(work_dir)
|
WORK_DIR=$(work_dir)
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -89,19 +90,19 @@ $(FIRMWARES): $(BUILD_DIR)/%.build/firmware.px4:
|
|||||||
# XXX Should support fetching/unpacking from a separate directory to permit
|
# XXX Should support fetching/unpacking from a separate directory to permit
|
||||||
# downloads of the prebuilt archives as well...
|
# downloads of the prebuilt archives as well...
|
||||||
#
|
#
|
||||||
# XXX PX4IO config name is bad - we should just call them all "px4"
|
# XXX PX4IO configuration name is bad - NuttX configs should probably all be "px4"
|
||||||
#
|
#
|
||||||
NUTTX_ARCHIVES = $(foreach platform,$(PLATFORMS),$(ARCHIVE_DIR)/$(platform).export)
|
NUTTX_ARCHIVES = $(foreach platform,$(PLATFORMS),$(ARCHIVE_DIR)/$(platform).export)
|
||||||
.PHONY: archives
|
.PHONY: archives
|
||||||
archives: $(NUTTX_ARCHIVES)
|
archives: $(NUTTX_ARCHIVES)
|
||||||
|
|
||||||
$(ARCHIVE_DIR)/%.export: platform = $(notdir $(basename $@))
|
$(ARCHIVE_DIR)/%.export: platform = $(notdir $(basename $@))
|
||||||
$(ARCHIVE_DIR)/%.export: config = $(if $(filter $(platform),px4io),io,nsh)
|
$(ARCHIVE_DIR)/%.export: configuration = $(if $(filter $(platform),px4io),io,nsh)
|
||||||
$(NUTTX_ARCHIVES): $(ARCHIVE_DIR)/%.export: $(NUTTX_SRC) $(NUTTX_APPS)
|
$(NUTTX_ARCHIVES): $(ARCHIVE_DIR)/%.export: $(NUTTX_SRC) $(NUTTX_APPS)
|
||||||
@echo %% Configuring NuttX for $(platform)
|
@echo %% Configuring NuttX for $(platform)
|
||||||
$(Q) (cd $(NUTTX_SRC) && $(RMDIR) nuttx-export)
|
$(Q) (cd $(NUTTX_SRC) && $(RMDIR) nuttx-export)
|
||||||
$(Q) make -C $(NUTTX_SRC) -r $(MQUIET) distclean
|
$(Q) make -C $(NUTTX_SRC) -r $(MQUIET) distclean
|
||||||
$(Q) (cd $(NUTTX_SRC)/tools && ./configure.sh $(platform)/$(config))
|
$(Q) (cd $(NUTTX_SRC)/tools && ./configure.sh $(platform)/$(configuration))
|
||||||
@echo Generating ROMFS for $(platform) XXX move this!
|
@echo Generating ROMFS for $(platform) XXX move this!
|
||||||
$(Q) make -C $(ROMFS_SRC) all
|
$(Q) make -C $(ROMFS_SRC) all
|
||||||
@echo %% Exporting NuttX for $(platform)
|
@echo %% Exporting NuttX for $(platform)
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
CONFIG = px4fmu_default
|
CONFIG = px4fmu_default
|
||||||
PLATFORM = px4fmu
|
|
||||||
SRCS = $(PX4_BASE)/platforms/empty.c
|
SRCS = $(PX4_BASE)/platforms/empty.c
|
||||||
|
|
||||||
include $(PX4_BASE)/makefiles/firmware.mk
|
include $(PX4_BASE)/makefiles/firmware.mk
|
||||||
@@ -3,7 +3,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
CONFIG = px4io_default
|
CONFIG = px4io_default
|
||||||
PLATFORM = px4io
|
|
||||||
SRCS = $(PX4_BASE)/platforms/empty.c
|
SRCS = $(PX4_BASE)/platforms/empty.c
|
||||||
|
|
||||||
include $(PX4_BASE)/makefiles/firmware.mk
|
include $(PX4_BASE)/makefiles/firmware.mk
|
||||||
@@ -84,7 +84,7 @@ $(error At least one of the PLATFORM or CONFIG variables must be set before incl
|
|||||||
endif
|
endif
|
||||||
PLATFORM := $(firstword $(subst _, ,$(CONFIG)))
|
PLATFORM := $(firstword $(subst _, ,$(CONFIG)))
|
||||||
endif
|
endif
|
||||||
include $(PX4_MK_INCLUDE)/$(PLATFORM).mk
|
include $(PX4_MK_INCLUDE)/platform_$(PLATFORM).mk
|
||||||
|
|
||||||
#
|
#
|
||||||
# Makefile debugging.
|
# Makefile debugging.
|
||||||
|
|||||||
@@ -7,4 +7,4 @@
|
|||||||
#
|
#
|
||||||
CONFIG_ARCH = CORTEXM4F
|
CONFIG_ARCH = CORTEXM4F
|
||||||
|
|
||||||
include $(PX4_MK_INCLUDE)/gnu-arm-eabi.mk
|
include $(PX4_MK_INCLUDE)/toolchain_gnu-arm-eabi.mk
|
||||||
@@ -7,4 +7,4 @@
|
|||||||
#
|
#
|
||||||
CONFIG_ARCH = CORTEXM3
|
CONFIG_ARCH = CORTEXM3
|
||||||
|
|
||||||
include $(PX4_MK_INCLUDE)/gnu-arm-eabi.mk
|
include $(PX4_MK_INCLUDE)/toolchain_gnu-arm-eabi.mk
|
||||||
Reference in New Issue
Block a user