71 lines
1.7 KiB
Makefile
71 lines
1.7 KiB
Makefile
|
|
# OUTPUT type
|
|
# 1 - .out
|
|
# 2 - .a
|
|
# 3 - .so
|
|
OUTPUT_TYPE = 2
|
|
OUTPUT_NAME = plc_common
|
|
|
|
ifeq ($(target), kunlun2)
|
|
hw_dep = hw2
|
|
else
|
|
ifeq ($(target), kunlun3)
|
|
hw_dep = hw3
|
|
else
|
|
hw_dep = hw
|
|
endif
|
|
endif
|
|
|
|
SUB_DIRS = src
|
|
|
|
# .h files dir
|
|
ADD_INCLUDE += $(TOPDIR)/plc/halmac/$(hw_dep)/inc/desc \
|
|
$(TOPDIR)/plc/halmac/$(hw_dep)/inc ./inc ../inc ../halmac/inc \
|
|
../os_shim/inc ../os_shim/arm/inc ./inc bwm/inc common/inc nwm/inc \
|
|
prm/inc rt/inc security/inc $(TOPDIR)/inc/os_shim/ \
|
|
$(TOPDIR)/inc/compiler/gcc $(TOPDIR)/inc $(TOPDIR)/inc/utils \
|
|
$(TOPDIR)/inc/pkt $(TOPDIR)/inc/cli $(TOPDIR)/inc/dbglog \
|
|
$(TOPDIR)/inc/ipc $(TOPDIR)/inc/plc_lib
|
|
|
|
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
|
|
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)
|