98 lines
2.8 KiB
Makefile
98 lines
2.8 KiB
Makefile
|
|
||
|
# OUTPUT type
|
||
|
# 1 - .out
|
||
|
# 2 - .a
|
||
|
# 3 - .so
|
||
|
OUTPUT_TYPE = 0
|
||
|
OUTPUT_NAME = dtest
|
||
|
|
||
|
ifeq ($(target), kunlun2)
|
||
|
hw_dep = hw2
|
||
|
else
|
||
|
ifeq ($(target), kunlun3)
|
||
|
hw_dep = hw3
|
||
|
else
|
||
|
hw_dep = hw
|
||
|
endif
|
||
|
endif
|
||
|
|
||
|
SUB_DIRS = startup
|
||
|
SUB_DIRS += ../plc/halphy
|
||
|
|
||
|
ifeq ($(target), kunlun2)
|
||
|
# for k3d demo, use it must patch k3d_demo
|
||
|
#SUB_DIRS += camera_test k3d_demo_test
|
||
|
SUB_DIRS += memtest_kl2 diag_test ddr_test matrix_test kl2_i2s_test monitor_test emac_test_kl2
|
||
|
SUB_DIRS += afft_test kl2_dma_device_test flash_test kl2_i2c_test simd_test
|
||
|
SUB_DIRS += security_test ecc_test led_ctrl_test
|
||
|
#SUB_DIRS += mac_tx_test mac_rx_test ada_test
|
||
|
SUB_DIRS += efuse_write_test efuse_test
|
||
|
|
||
|
SUB_DIRS = sadc_pwm_test
|
||
|
SUB_DIRS = download_file_test
|
||
|
SUB_DIRS = flash_test
|
||
|
SUB_DIRS = kl2_pwm_test ddr_training_test gpio_test
|
||
|
SUB_DIRS = kl2_muticore_uart_test/kl2_core1_uart1_test kl2_muticore_uart_test/kl2_core2_uart2_test
|
||
|
else
|
||
|
ifeq ($(target), kunlun3)
|
||
|
SUB_DIRS = dtest3
|
||
|
else
|
||
|
SUB_DIRS += mac_tx_test mac_rx_test ada_test
|
||
|
SUB_DIRS += uart_test mtd_test dhrystone gpio_test spi_test upgrade_test watchdog_test sec_test dma_sw_test i2s_test i2c_test emac_test pwm_test
|
||
|
SUB_DIRS += dhrystone upgrade_test watchdog_test sec_test
|
||
|
SUB_DIRS += memtest flash_test diag_test sram_test exception_test cache_test jump_test
|
||
|
SUB_DIRS += efuse_write_test efuse_test dma_uart_test gpio_mtx_test mqtt_test
|
||
|
SUB_DIRS += security_test ecc_test crypto_benchmark flash_cmd
|
||
|
SUB_DIRS += kl1_fdma_mst_test
|
||
|
endif
|
||
|
endif
|
||
|
|
||
|
ifeq ($(dtest_only), 1)
|
||
|
PRE_MARCO += IOT_DTEST_ONLY_SUPPORT=1
|
||
|
endif
|
||
|
|
||
|
# .h files dir
|
||
|
ADD_INCLUDE += $(TOPDIR)/inc/pkt $(TOPDIR)/inc/io_lib $(TOPDIR)/plc/inc $(TOPDIR)/plc/inc/mme \
|
||
|
$(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)/dtest/common $(TOPDIR)/plc/common/inc $(TOPDIR)/export/inc/os_shim
|
||
|
ifeq ($(target), kunlun2)
|
||
|
ADD_INCLUDE += $(TOPDIR)/driver/src/hw2/inc
|
||
|
else
|
||
|
ifeq ($(target), kunlun3)
|
||
|
ADD_INCLUDE += $(TOPDIR)/driver/src/hw3/inc
|
||
|
else
|
||
|
ADD_INCLUDE += $(TOPDIR)/driver/src/hw/inc
|
||
|
endif
|
||
|
endif
|
||
|
|
||
|
# predefined macro
|
||
|
PRE_MARCO +=
|
||
|
|
||
|
# lib dir
|
||
|
ADD_LIBDIR =
|
||
|
|
||
|
# lib need to ld together
|
||
|
ADD_LIB =
|
||
|
|
||
|
#$(warning TOPDIR=$(TOPDIR))
|
||
|
|
||
|
ifdef TOPDIR
|
||
|
include $(TOPDIR)/build/makefile.cfg
|
||
|
else
|
||
|
include $(CURDIR)/build/makefile.cfg
|
||
|
TOPDIR = $(CURDIR)
|
||
|
export TOPDIR
|
||
|
endif
|
||
|
|
||
|
# 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)
|