# OUTPUT type # 1 - .out # 2 - .a # 3 - .so OUTPUT_TYPE = 1 OUTPUT_NAME = mac_tx_test ifeq ($(target), kunlun2) hw_dep = hw2 else hw_dep = hw endif SUB_DIRS = $(TOPDIR)/common/os_shim/dtestos \ $(TOPDIR)/dtest/mac_tx_test/$(hw_dep) \ $(TOPDIR)/dtest/mac_rx_test/$(hw_dep) \ $(TOPDIR)/dtest/mac_rx_test/hal ADD_INCLUDE += $(TOPDIR)/inc/io_lib \ $(TOPDIR)/plc/inc \ $(TOPDIR)/plc/halphy/inc \ $(TOPDIR)/inc/os_shim \ $(TOPDIR)/inc/compiler/gcc \ $(TOPDIR)/plc/halmac/inc \ $(TOPDIR)/inc/utils \ $(TOPDIR)/plc/halmac/$(hw_dep)/inc/desc \ $(TOPDIR)/plc/halmac/$(hw_dep)/inc/reg \ $(TOPDIR)/plc/halmac/$(hw_dep)/inc \ $(TOPDIR)/plc/halphy/$(hw_dep)/inc \ $(TOPDIR)/inc/driver \ $(TOPDIR)/plc/common/inc \ $(TOPDIR)/driver/inc \ $(TOPDIR)/dtest/mac_rx_test/inc \ $(TOPDIR)/dtest/mac_rx_test/$(hw_dep)/inc \ $(TOPDIR)/dtest/mac_rx_test/hal/inc \ $(TOPDIR)/dtest/mac_tx_test/inc \ $(TOPDIR)/dtest/mac_tx_test/$(hw_dep)/inc \ $(TOPDIR)/plc/halphy/test/inc \ $(TOPDIR)/plc/halphy/test/$(hw_dep)/inc \ $(TOPDIR)/inc/pib # predefined macro PRE_MARCO += ADD_LIBDIR += $(TOPDIR)/common/utils \ $(TOPDIR)/plc/halphy \ $(TOPDIR)/plc/halmac/$(hw_dep) \ $(TOPDIR)/plc/halmac \ $(TOPDIR)/plc/common # becareful the seq of LIBs ADD_LIB += halphy plc_common halmac ifeq ($(gcc),arm) OBJDUMP = arm-none-eabi-objdump ADD_INCLUDE += $(TOPDIR)/os/inc/cm3 ADD_LIB += cm3 else OBJDUMP = riscv32-unknown-elf-objdump ADD_INCLUDE += $(TOPDIR)/os/inc/riscv ADD_LIB += riscv endif # iot_printf ADD_LIBDIR += $(TOPDIR)/dtest/startup $(TOPDIR)/driver $(TOPDIR)/common/io_lib $(TOPDIR)/common ADD_LIB += driver io_lib common ##################################################### LD_SCRIPT = link_ate.lds ifdef TOPDIR include $(TOPDIR)/build/makefile.cfg else include $(CURDIR)/build/makefile.cfg TOPDIR = $(CURDIR) export TOPDIR endif dump: $(OBJDUMP) -D -S -l $(OUTPUT_FULL_NAME) > $(OUTPUT_FULL_NAME).dump # display the obj files and output name debug: @echo TOPDIR=$(TOPDIR) @echo OUTPUT_LIB=$(OUTPUT_FULL_NAME) @echo DEPS=$(DEPS) @echo OBJECTS=$(OBJECTS) @echo SRCS=$(SRCS) @echo OBJECTS folder=$(foreach dirname, $(SUB_DIRS), $(addprefix $(BIN_DIR)/, $(dirname))) @echo output_name=$(OUTPUT_FULL_NAME)