60 lines
1.9 KiB
Makefile
60 lines
1.9 KiB
Makefile
|
|
||
|
# OUTPUT type
|
||
|
# 1 - .out
|
||
|
# 2 - .a
|
||
|
# 3 - .so
|
||
|
OUTPUT_TYPE = 2
|
||
|
OUTPUT_NAME = cli
|
||
|
|
||
|
ifeq ($(product_line), PLC)
|
||
|
prd_dep = plc
|
||
|
else ifeq ($(product_line), BT)
|
||
|
prd_dep = bt
|
||
|
else
|
||
|
prd_dep = bt
|
||
|
endif
|
||
|
|
||
|
SUB_DIRS = cli communicator communicator/$(prd_dep) host_interface host_interface/$(prd_dep)
|
||
|
|
||
|
ADD_INCLUDE += $(TOPDIR)/inc/compiler/gcc $(TOPDIR)/common/io_lib/inc $(TOPDIR)/inc/io_lib $(TOPDIR)/inc $(TOPDIR)/inc/cli/$(prd_dep) $(TOPDIR)/inc/cli communicator communicator/$(prd_dep) cli/inc $(TOPDIR)/inc/dbglog $(TOPDIR)/inc/dbglog/$(prd_dep) $(TOPDIR)/inc/host_interface $(TOPDIR)/inc/host_interface/$(prd_dep) $(TOPDIR)/inc/app $(TOPDIR)/inc/driver $(TOPDIR)/inc/uart $(TOPDIR)/inc/ipc $(TOPDIR)/inc/os_shim $(TOPDIR)/inc/pkt $(TOPDIR)/inc/utils $(TOPDIR)/os/freertos/include $(TOPDIR)/os/freertos/src/include $(TOPDIR)/driver/inc $(TOPDIR)/inc/pib $(TOPDIR)/ftm/inc $(TOPDIR)/app/tput $(TOPDIR)/import/lwip/lwip/src/include $(TOPDIR)/import/lwip/ports/include
|
||
|
|
||
|
ifeq ($(prd_dep), plc)
|
||
|
ADD_INCLUDE += plc_lib/inc $(TOPDIR)/inc/plc_lib $(TOPDIR)/app/smart_grid/inc $(TOPDIR)/plc/inc $(TOPDIR)/plc/halmac/hw/inc $(TOPDIR)/plc/halmac/inc $(TOPDIR)/plc/halmac/hw/inc/desc
|
||
|
else ifeq ($(prd_dep), bt)
|
||
|
else
|
||
|
endif
|
||
|
|
||
|
ifeq ($(gcc), arm)
|
||
|
ADD_INCLUDE += $(TOPDIR)/os/freertos/src/portable/ARM_CM3
|
||
|
else
|
||
|
ADD_INCLUDE += $(TOPDIR)/os/freertos/src/portable/RISCV
|
||
|
endif
|
||
|
|
||
|
|
||
|
# predefined macro
|
||
|
PRE_MARCO +=
|
||
|
|
||
|
# lib dir
|
||
|
ADD_LIBDIR +=
|
||
|
|
||
|
# lib need to ld together
|
||
|
ADD_LIB +=
|
||
|
|
||
|
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)
|