使用专门的make命令生成 src_files.txt
This commit is contained in:
@@ -953,6 +953,7 @@ build_obj_func() {
|
||||
# ./make.py -j APP=${APP_SELECTION} -C .. clobber
|
||||
# fi
|
||||
# ./make.py -j PLATFORM=${DEF_PLATFORM_TYPE} cco=1 APP=${APP_SELECTION} FLASH_SIZE=${FLASH_SIZE_nM} -C ..
|
||||
./make.py -j APP=${APP_SELECTION} -C .. creat_src_file
|
||||
build_use_ninja ${DEF_PLATFORM_TYPE} ${APP_SELECTION} ${FLASH_SIZE_nM}
|
||||
if [ "${APP_SELECTION}" == "${DEF_CUS_APP}" ]; then
|
||||
#kl3 customer demo, cus_core.
|
||||
|
@@ -84,8 +84,8 @@ SRCS += $(EXT_SRC)
|
||||
# all the obj names
|
||||
OBJECTS = $(addprefix $(BIN_DIR)/, $(patsubst %.S, %.o, $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(SRCS)))))
|
||||
|
||||
$(shell echo $(SRCS) > "src_files.txt")
|
||||
$(shell echo $(ADD_INCLUDE) >> "src_files.txt")
|
||||
# $(shell echo $(SRCS) > "src_files.txt")
|
||||
# $(shell echo $(ADD_INCLUDE) >> "src_files.txt")
|
||||
endif
|
||||
|
||||
PLATFORM ?= FPGA
|
||||
@@ -422,6 +422,17 @@ clean:
|
||||
clobber:
|
||||
@echo clobber
|
||||
|
||||
creat_src_file:src_files.txt
|
||||
|
||||
src_files.txt:
|
||||
@echo $(SRCS) > "src_files.txt"
|
||||
@echo $(ADD_INCLUDE) >> "src_files.txt"
|
||||
@for d in $(SUB_DIRS) ; do\
|
||||
if [ -e "$$d/Makefile" ]; then\
|
||||
$(MAKE) -C $$d $@ ;\
|
||||
fi;\
|
||||
done
|
||||
|
||||
# clean obj files only
|
||||
clean_objs:
|
||||
-$(RM) $(OBJECTS)
|
||||
|
@@ -15,6 +15,10 @@ def clear(dir_path:str,rm_dir:str):
|
||||
shutil.rmtree(path)
|
||||
else:
|
||||
clear(path,rm_dir)
|
||||
elif os.path.isfile(path):
|
||||
if item == rm_dir:
|
||||
print('remove: ',path)
|
||||
os.remove(path)
|
||||
|
||||
|
||||
|
||||
@@ -22,4 +26,5 @@ def clear(dir_path:str,rm_dir:str):
|
||||
|
||||
if __name__ == "__main__":
|
||||
clear('../','.output')
|
||||
clear('../','src_files.txt')
|
||||
|
||||
|
Reference in New Issue
Block a user