Skip to content

Commit 59d4033

Browse files
committed
os/board/rtl8730e: Optimize the CFLAGS length
* Generate a response file containing all the CFLAGS instead of loading an entire CFLAGS string directly. * Remove duplicate include paths to clean up makefile * Add .rsp file to gitignore --- Built with before and after modification, MD5 sum of TizenRT/build/output/bin/kernel_rtl8730e_200204.trpk match.
1 parent 867455b commit 59d4033

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ tags
3030
*.tmp.*
3131
*.log
3232
*.log.old
33+
*.rsp

os/board/rtl8730e/src/Makefile

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
###########################################################################
22
#
3-
# Copyright 2022 Samsung Electronics All Rights Reserved.
3+
# Copyright 2025 Samsung Electronics All Rights Reserved.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -134,19 +134,17 @@ include component/file_system/ftl/Make.defs
134134
include component/file_system/kv/Make.defs
135135
include component/file_system/vfs2.0/Make.defs
136136

137-
ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
138-
BOARD_SRCDIR = $(TOPDIR)/board
139-
PROJ_DIR = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/project/realtek_amebaD2_va0_example
137+
ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
138+
BOARD_SRCDIR = $(TOPDIR)/board
139+
PROJ_DIR = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/project/realtek_amebaD2_va0_example
140140
COMPONENT_DIR = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/component
141-
DIR_WIFI = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/component/wifi
142-
DIR_OSDEP = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/component/os/os_wrapper
143-
DIR_OS = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/component/os
144-
DIR_MBED = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/component/mbed/targets/hal/rtl8730e
141+
DIR_WIFI = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/component/wifi
142+
DIR_OS = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/component/os
145143
ifeq ($(CONFIG_AMEBASMART_BLE),y)
146-
DIR_BT = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/component/bluetooth
144+
DIR_BT = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/component/bluetooth
147145
endif
148146
ifeq ($(CONFIG_AMEBASMART_USBDEVICE),y)
149-
DIR_USB = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/component/usb
147+
DIR_USB = $(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src/component/usb
150148
endif
151149

152150
TARGETDIR = $(COMPONENT_DIR)/soc/amebad2
@@ -173,8 +171,6 @@ CFLAGS += -I$(COMPONENT_DIR)/lwip/api
173171

174172
CFLAGS += -I$(COMPONENT_DIR)/os/os_wrapper/include
175173
CFLAGS += -I$(COMPONENT_DIR)/os/tizenrt
176-
CFLAGS += -I$(DIR_MBED)
177-
CFLAGS += -I$(DIR_OSDEP)/include
178174
CFLAGS += -I$(DIR_WIFI)/wpa_supplicant/wpa_lite
179175
CFLAGS += -I$(COMPONENT_DIR)/mbed/api
180176
CFLAGS += -I$(COMPONENT_DIR)/mbed/hal
@@ -212,12 +208,15 @@ else
212208
CFLAGS += -I$(COMPONENT_DIR)/soc/amebad2/cmsis
213209
CFLAGS += -I$(BOARD_SRCDIR)/common
214210
CFLAGS += -I$(BOARD_SRCDIR)/$(CONFIG_ARCH_BOARD)/src
215-
CFLAGS += -I$(TOPDIR)/arch/$(CONFIG_ARCH)/src/armv7-a
216-
CFLAGS += -I$(TARGETDIR)/bootloader
217211
CFLAGS += -I$(TOPDIR)/se/ameba
218-
212+
219213
endif
220214

215+
# Generate response file containing all CFLAGS
216+
CFLAGS_FILE := $(TOPDIR)/cflags.rsp
217+
$(shell printf "%s" "$(CFLAGS)" > $(CFLAGS_FILE))
218+
CFLAGS := @$(CFLAGS_FILE)
219+
221220
all: libboard$(LIBEXT)
222221

223222
$(AOBJS): %$(OBJEXT): %$(ASMEXT)
@@ -259,4 +258,3 @@ distclean: clean
259258
$(call DELFILE, .depend)
260259

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

0 commit comments

Comments
 (0)