53 lines
1.4 KiB
Makefile
Executable File
53 lines
1.4 KiB
Makefile
Executable File
|
|
# OUTPUT type
|
|
# 1 - .out
|
|
# 2 - .a
|
|
# 3 - .so
|
|
OUTPUT_TYPE = 2
|
|
OUTPUT_NAME = halmac_hw
|
|
|
|
SUB_DIRS = tx rx reset sched misc isr key rawdata zc test_lib
|
|
|
|
# .h files dir
|
|
ADD_INCLUDE += $(TOPDIR)/plc/common/inc ./inc ../inc ../common/plc_cli/include ../common/plc_dbglog/include $(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 ./hw/inc/desc ./hw/inc/reg ./hw/inc
|
|
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 =
|
|
|
|
# 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)
|