83 lines
2.3 KiB
Makefile
83 lines
2.3 KiB
Makefile
|
|
# OUTPUT type
|
|
# 1 - .out
|
|
# 2 - .a
|
|
# 3 - .so
|
|
OUTPUT_TYPE = 2
|
|
OUTPUT_NAME = plc
|
|
|
|
ifeq ($(target), kunlun2)
|
|
hw_dep = hw2
|
|
else ifeq ($(target), kunlun3)
|
|
hw_dep = hw3
|
|
else
|
|
hw_dep = hw
|
|
endif
|
|
|
|
SUB_DIRS = common cvg halmac halphy htbus
|
|
|
|
# .h files dir
|
|
ADD_INCLUDE += $(TOPDIR)/inc/driver $(TOPDIR)/plc/inc $(TOPDIR)/plc/inc/mme \
|
|
$(TOPDIR)/plc/halmac/inc $(TOPDIR)/plc/halphy/$(hw_dep)/inc \
|
|
$(TOPDIR)/plc/halphy/inc $(TOPDIR)/inc/os_shim $(TOPDIR)/inc/compiler/gcc \
|
|
$(TOPDIR)/inc $(TOPDIR)/inc/utils $(TOPDIR)/inc/pib $(TOPDIR)/inc/pkt \
|
|
$(TOPDIR)/inc/ipc $(TOPDIR)/driver/inc $(TOPDIR)/plc/common/inc \
|
|
$(TOPDIR)/inc/cli/plc $(TOPDIR)/inc/cli $(TOPDIR)/cli/communicator \
|
|
$(TOPDIR)/inc/dbglog $(TOPDIR)/ftm/inc $(TOPDIR)/inc/crypto
|
|
|
|
ifeq ($(target), kunlun2)
|
|
ADD_INCLUDE += $(TOPDIR)/driver/src/hw2/inc
|
|
else ifeq ($(target), kunlun3)
|
|
ADD_INCLUDE += $(TOPDIR)/driver/src/hw3/inc \
|
|
$(TOPDIR)/plc/halphy/$(hw_dep)/plc/inc \
|
|
$(TOPDIR)/plc/halphy/$(hw_dep)/rf/inc \
|
|
$(TOPDIR)/plc/halphy/$(hw_dep)/plc/inc \
|
|
$(TOPDIR)/plc/halphy/$(hw_dep)/rf/inc \
|
|
$(TOPDIR)/plc/halmac/$(hw_dep)/rf_inc \
|
|
$(TOPDIR)/plc/halmac/$(hw_dep)/plc_inc
|
|
|
|
ifeq ($(ckb), 1)
|
|
ADD_INCLUDE += $(TOPDIR)/bb_cpu/inc \
|
|
$(TOPDIR)/dtest/dtest3/mac_phy/common \
|
|
$(TOPDIR)/dtest/dtest3/mac_phy/rf_phy/inc
|
|
endif
|
|
|
|
else
|
|
ADD_INCLUDE += $(TOPDIR)/driver/src/hw/inc
|
|
endif
|
|
|
|
# predefined macro
|
|
PRE_MARCO +=
|
|
|
|
# lib dir
|
|
ADD_LIBDIR =
|
|
|
|
# lib need to ld together
|
|
ADD_LIB =
|
|
|
|
########################################################
|
|
#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 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)
|