# OUTPUT type # 1 - .out # 2 - .a # 3 - .so OUTPUT_TYPE = 2 OUTPUT_NAME = halphy ifeq ($(target), kunlun2) hw_dep = hw2 SUB_DIRS = hw2 test multi_ppm hw_common else ifeq ($(target), kunlun3) ifeq ($(PLATFORM), FPGA) platform = fpga else platform = chip endif hw_dep = hw3 SUB_DIRS = hw3/plc hw3/rf hw3/rf/share test multi_ppm hw_common hw3/plc/$(platform) else hw_dep = hw SUB_DIRS = hw test multi_ppm hw_common endif # .h files dir ADD_INCLUDE += $(TOPDIR)/plc/halphy/inc \ $(TOPDIR)/inc/io_lib/ \ $(TOPDIR)/inc/os_shim/ \ $(TOPDIR)/inc/compiler/gcc \ $(TOPDIR)/inc \ $(TOPDIR)/inc/utils \ $(TOPDIR)/inc/pkt \ $(TOPDIR)/inc/ipc \ $(TOPDIR)/inc/cli \ $(TOPDIR)/inc/dbglog \ $(TOPDIR)/inc/plc_lib \ $(TOPDIR)/inc/pib \ $(TOPDIR)/driver/inc \ $(TOPDIR)/driver/src/$(hw_dep)/inc \ $(TOPDIR)/plc/halmac/$(hw_dep)/inc/desc \ $(TOPDIR)/plc/halmac/$(hw_dep)/inc/reg \ $(TOPDIR)/plc/halmac/$(hw_dep)/inc \ $(TOPDIR)/plc/halmac/inc \ $(TOPDIR)/plc/halphy/$(hw_dep)/inc \ $(TOPDIR)/plc/halphy/test/inc \ $(TOPDIR)/plc/halphy/test/$(hw_dep)/inc \ $(TOPDIR)/cli/communicator \ $(TOPDIR)/inc/driver \ $(TOPDIR)/plc/common/inc \ $(TOPDIR)/plc/inc \ $(TOPDIR)/ftm/inc ifeq ($(target), kunlun3) ADD_INCLUDE += $(TOPDIR)/plc/halmac/$(hw_dep)/plc_inc/desc $(TOPDIR)/plc/halmac/$(hw_dep)/plc_inc \ $(TOPDIR)/plc/halmac/$(hw_dep)/rf_inc/desc $(TOPDIR)/plc/halmac/$(hw_dep)/rf_inc \ $(TOPDIR)/plc/halphy/$(hw_dep)/plc/inc $(TOPDIR)/plc/halphy/$(hw_dep)/rf/inc \ $(TOPDIR)/plc/halphy/$(hw_dep)/plc/$(platform)/inc endif ifeq ($(gcc), arm) ADD_INCLUDE += $(TOPDIR)/driver/inc/hw/cm3 else ADD_INCLUDE += $(TOPDIR)/driver/inc/hw/riscv endif # predefined macro PRE_MARCO += # lib dir ADD_LIBDIR = $(TOPDIR)/common # lib need to ld together ADD_LIB = $(TOPDIR)/common ######################################################## #leave the lines below un-modified ######################################################## 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_DIR=$(OUTPUT_DIR) @echo OUTPUT_MAP=$(OUTPUT_MAP) @echo OUTPUT_LIB=$(OUTPUT_FULL_NAME) @echo DEPS=$(DEPS) @echo OBJECTS=$(OBJECTS) @echo SRCS=$(SRCS) @echo SUB_DIRS=$(SUB_DIRS) @echo OBJECTS folder=$(foreach dirname, $(SUB_DIRS), $(addprefix $(BIN_DIR)/, $(dirname))) @echo output_name=$(OUTPUT_FULL_NAME) @echo LINK_LIBS=$(LINK_LIBS) @echo MAKEDEP=$(MAKEDEP) @echo CC=$(CC)