Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ tags
*.tmp.*
*.log
*.log.old
*.rsp
31 changes: 15 additions & 16 deletions os/board/rtl8730e/src/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
###########################################################################
#
# Copyright 2022 Samsung Electronics All Rights Reserved.
# Copyright 2025 Samsung Electronics All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -135,19 +135,17 @@ include component/file_system/ftl/Make.defs
include component/file_system/kv/Make.defs
include component/file_system/vfs2.0/Make.defs

ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
BOARD_SRCDIR = $(TOPDIR)/board
PROJ_DIR = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/project/realtek_amebaD2_va0_example
ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
BOARD_SRCDIR = $(TOPDIR)/board
PROJ_DIR = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/project/realtek_amebaD2_va0_example
COMPONENT_DIR = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/component
DIR_WIFI = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/component/wifi
DIR_OSDEP = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/component/os_dep
DIR_OS = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/component/os
DIR_MBED = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/component/mbed/targets/hal/rtl8730e
DIR_WIFI = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/component/wifi
DIR_OS = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/component/os
ifeq ($(CONFIG_AMEBASMART_BLE),y)
DIR_BT = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/component/bluetooth
DIR_BT = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/component/bluetooth
endif
ifeq ($(CONFIG_AMEBASMART_USBDEVICE),y)
DIR_USB = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/component/usb
DIR_USB = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/component/usb
endif

TARGETDIR = $(COMPONENT_DIR)/soc/amebad2
Expand All @@ -171,14 +169,13 @@ CFLAGS += -I$(COMPONENT_DIR)/wifi/wpa_supplicant/src/crypto
CFLAGS += -I$(COMPONENT_DIR)/lwip/api

CFLAGS += -I$(COMPONENT_DIR)/os/tizenrt
CFLAGS += -I$(DIR_MBED)
CFLAGS += -I$(DIR_OSDEP)/include
CFLAGS += -I$(DIR_WIFI)/wpa_supplicant/wpa_lite
CFLAGS += -I$(COMPONENT_DIR)/mbed/api
CFLAGS += -I$(COMPONENT_DIR)/mbed/hal
CFLAGS += -I$(COMPONENT_DIR)/mbed/hal_ext
CFLAGS += -I$(COMPONENT_DIR)/mbed/targets/hal/rtl8730e
CFLAGS += -I$(COMPONENT_DIR)/os_dep
CFLAGS += -I$(COMPONENT_DIR)/os_dep/include
CFLAGS += -I$(TOPDIR)/net/netmgr
# Temporary keep it, need further check whether the usb needs the filesystem
CFLAGS += -I$(COMPONENT_DIR)/file_system/vfs2.0
Expand Down Expand Up @@ -211,12 +208,15 @@ else
CFLAGS += -I$(COMPONENT_DIR)/soc/amebad2/cmsis
CFLAGS += -I$(BOARD_SRCDIR)/common
CFLAGS += -I$(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src
CFLAGS += -I$(TOPDIR)/arch/$(CONFIG_ARCH)/src/armv7-a
CFLAGS += -I$(TARGETDIR)/bootloader
CFLAGS += -I$(TOPDIR)/se/ameba

endif

# Generate response file containing all CFLAGS
CFLAGS_FILE := $(TOPDIR)/cflags.rsp
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CFLAGS response file approach is a valid solution for addressing command line length limitations. However, the implementation should be carefully integrated with the existing build system to ensure robustness and maintainability. The approach is particularly useful for complex builds with many include paths and definitions.

$(shell printf "%s" "$(CFLAGS)" > $(CFLAGS_FILE))
CFLAGS := @$(CFLAGS_FILE)

all: libboard$(LIBEXT)

$(AOBJS): %$(OBJEXT): %$(ASMEXT)
Expand Down Expand Up @@ -258,4 +258,3 @@ distclean: clean
$(call DELFILE, .depend)

-include Make.dep
#include $(TOPDIR)/configs/Board.mk