我在makefile中的代码下面执行:
### Get memory map and standard makefile ###
ifeq ($(CORTEX_R4),1)
SCATTER_FILE = scatter/boot_r4.scatter
else
ifeq ($(CORTEX_m0),1)
SCATTER_FILE = scatter/boot_m0.scatter
else
SCATTER_FILE = memory_map.scatter
endif
endif
BASE_PATH = .
include ./StdMakefile
### Make target ###
%.rom: %.elf
touch $*.rom
touch $*.itcm esw_host_def
touch $*.erom
# First clear existing suffix rules, second defines build order so Pmap headers are built first
.SUFFIXES:
.SUFFIXES: $(PMAP_LIB) .h .s .c .o
# Linker options
ifeq ($(CORTEX_R4),1)
LINKFLAGS = --map --noremove --entry 0x0 --scatter $(SCATTER_FILE) --info sizes,totals --list link_info.txt --elf
LINKLIB =
%.elf: %.o $(PMAP_LIB) $(LIB) $(INIT_LIB) $(TESTS_LIB) $(UNREMAP_LIB) $(EROMBOOT_LIB) $(USB_LIB) scatter/boot_r4.scatter
else
ifeq ($(CORTEX_m0),1)
LINKFLAGS = --xref --elf --map --symbols --noremove --scatter $(SCATTER_FILE) --entry __main --info sizes,totals --list link_info.txt --elf
LINKLIB =
%.elf: %.o $(PMAP_LIB) $(LIB) $(INIT_LIB) $(TESTS_LIB) $(UNREMAP_LIB) $(EROMBOOT_LIB) $(USB_LIB) memory_map.scatter
else
LINKFLAGS = --xref --elf --map --symbols --noremove --scatter $(SCATTER_FILE) --entry __main --info sizes,totals --list link_info.txt --elf
LINKLIB =
%.elf: %.o $(PMAP_LIB) $(LIB) $(INIT_LIB) $(TESTS_LIB) $(UNREMAP_LIB) $(EROMBOOT_LIB) $(USB_LIB) memory_map.scatter
endif
endif
ifeq ($(CORTEX_R4),1)
$(ARMLINK) $(LINKFLAGS) -o $@ $< $(INIT_DIR)/$(INIT_LIB)\(*\) $(LIB_DIR)/$(LIB) $(PMAP_DIR)/$(PMAP_LIB) $(TESTS_DIR)/$(TESTS_LIB) $(LINKLIB) ; \
else
ifeq ($(CORTEX_m0),1)
$(ARMLINK) $(LINKFLAGS) -o $@ $< $(INIT_DIR)/$(INIT_LIB)\(*\) $(LIB_DIR)/$(LIB) $(PMAP_DIR)/$(PMAP_LIB) $(TESTS_DIR)/$(TESTS_LIB) $(LINKLIB) ; \
else
$(ARMLINK) $(LINKFLAGS) -o $@ $< $(INIT_DIR)/$(INIT_LIB)\(*\) $(LIB_DIR)/$(LIB) $(PMAP_DIR)/$(PMAP_LIB) $(TESTS_DIR)/$(TESTS_LIB) $(LINKLIB) ; \
endif
endif
cp $@ $*.elf2
# Libraries Included
$(LIB):
cd $(LIB_DIR); $(MAKE) clean ; $(MAKE) $(LIB)
$(INIT_LIB):
cd $(INIT_DIR); $(MAKE) clean ; $(MAKE) $(INIT_LIB)
$(PMAP_LIB):
cd $(PMAP_DIR); $(MAKE) $(PMAP_LIB)
$(TESTS_LIB):
cd $(TESTS_DIR); $(MAKE) $(TESTS_LIB)
$(UNREMAP_LIB):
##cd $(UNREMAP_DIR); $(MAKE) $(UNREMAP_LIB)
$(EROMBOOT_LIB):
cd $(EROMBOOT_DIR); $(MAKE) clean ; $(MAKE) $(EROMBOOT_LIB)
$(USB_LIB):
##cd $(USB_DIR); $(MAKE) $(USB_LIB)
# Tidy up temporary build files/output files
clean:
cd $(LIB_DIR); $(MAKE) clean
cd $(INIT_DIR); $(MAKE) clean
cd $(PMAP_DIR); $(MAKE) clean
cd $(TESTS_DIR); $(MAKE) clean
#rm -rf *.bin *.o *.elf *.elf2 *.list *.map *.rom? *.erom? *.ram?
上面的代码存在于makefile中,并在流程中用于设置,执行此操作时给出了以下错误:
Makefile:111:***缺少`endif'。停止。
请让我知道我犯了哪些错误。
提前多多感谢....