Files
kunlun/sp/Makefile
2024-09-28 14:24:04 +08:00

67 lines
1.7 KiB
Makefile

# OUTPUT type
# 1 - .out
# 2 - .a
# 3 - .so
OUTPUT_TYPE = 0
OUTPUT_NAME = sp
SUB_DIRS = boot
ifeq ($(target), kunlun2)
ifeq ($(cpu1_build), 1)
SUB_DIRS += topo_cpu
endif
hw_dep = hw2
else ifeq ($(target), kunlun3)
hw_dep = hw3
else
ifeq ($(flash_build), 1)
SUB_DIRS += applet
endif
hw_dep = hw
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/halphy/$(hw_dep)/inc \
$(TOPDIR)/plc/halmac/$(hw_dep)/plc_inc $(TOPDIR)/plc/halmac/$(hw_dep)/plc_inc/desc \
$(TOPDIR)/plc/halmac/$(hw_dep)/rf_inc $(TOPDIR)/plc/halmac/$(hw_dep)/rf_inc/desc \
$(TOPDIR)/inc/driver $(TOPDIR)/dtest/common $(TOPDIR)/plc/common/inc $(TOPDIR)/export/inc/os_shim
ifeq ($(target), kunlun3)
ADD_INCLUDE += $(TOPDIR)/plc/halmac/$(hw_dep)/plc_inc $(TOPDIR)/plc/halmac/$(hw_dep)/plc_inc/desc \
$(TOPDIR)/plc/halmac/$(hw_dep)/rf_inc $(TOPDIR)/plc/halmac/$(hw_dep)/rf_inc/desc
endif
# predefined macro
PRE_MARCO += IOT_BUILD_TYPE=2
# 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)