54 lines
1.1 KiB
Makefile
54 lines
1.1 KiB
Makefile
|
|
||
|
# OUTPUT type
|
||
|
# 1 - .out
|
||
|
# 2 - .a
|
||
|
# 3 - .so
|
||
|
OUTPUT_TYPE = 2
|
||
|
OUTPUT_NAME = os
|
||
|
|
||
|
ifeq ($(target), kunlun2)
|
||
|
hw_dep = hw2
|
||
|
else
|
||
|
ifeq ($(target), kunlun3)
|
||
|
hw_dep = hw3
|
||
|
else
|
||
|
hw_dep = hw
|
||
|
endif
|
||
|
endif
|
||
|
|
||
|
ifeq ($(smp_enable), 1)
|
||
|
SUB_DIRS = freertos_smp
|
||
|
else
|
||
|
SUB_DIRS = freertos
|
||
|
endif
|
||
|
# .h files dir
|
||
|
ADD_INCLUDE += $(TOPDIR)/inc/io_lib $(TOPDIR)/driver/inc $(TOPDIR)/inc/hw/reg/riscv $(TOPDIR)/plc/inc $(TOPDIR)/common/io_lib/inc $(TOPDIR)/inc/compiler/gcc $(TOPDIR)/inc/driver $(TOPDIR)/inc $(TOPDIR)/inc/os_shim
|
||
|
ADD_INCLUDE += $(TOPDIR)/driver/src/$(hw_dep)/inc
|
||
|
|
||
|
# 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)
|