forked from jameswalmsley/bitthunder
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CONFIG] Added a top-level Makefile to compile configured BSP.
- Loading branch information
1 parent
6f72d62
commit af80598
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# | ||
# BitThunder Top-Level Makefile | ||
# | ||
|
||
MAKEFLAGS += -rR --no-print-directory | ||
|
||
-include .config | ||
|
||
Q=@ | ||
|
||
all: | ||
|
||
ifeq ($(BT_CONFIG_CONFIGURED),y) | ||
ifeq ($(BT_CONFIG_BSP_DIR),) | ||
$(Q)echo "BSP has not configured BT_CONFIG_BSP_DIR" | ||
else | ||
all: scripts/kconfig/mkconfig | ||
$(Q)echo " Building BitThunder for $(BT_CONFIG_BSP_NAME)" | ||
$(Q)$(MAKE) -C $(BT_CONFIG_BSP_DIR) | ||
endif | ||
else | ||
all: | ||
$(Q)make .config | ||
endif | ||
|
||
|
||
menuconfig: scripts/kconfig/mkconfig | ||
$(Q)CONFIG_=BT_CONFIG_ kconfig-mconf Kconfig | ||
$(Q)scripts/kconfig/mkconfig ./ > $(BT_CONFIG_BSP_DIR)/bt_bsp_config.h | ||
$(Q)cp .config $(BT_CONFIG_BSP_DIR)/.config | ||
|
||
|
||
scripts/kconfig/mkconfig: scripts/kconfig/mkconfig.c | ||
$(Q)gcc scripts/kconfig/mkconfig.c scripts/kconfig/cfgparser.c scripts/kconfig/cfgdefine.c -o scripts/kconfig/mkconfig | ||
|
||
ifneq ($(BT_CONFIG_BSP_DIR),) | ||
clean: | ||
$(Q)echo " Cleaning $(BT_CONFIG_BSP_NAME) Board Support Package" | ||
$(Q)$(MAKE) -C $(BT_CONFIG_BSP_DIR) clean | ||
endif | ||
|
||
.PHONY: menuconfig |