• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
2#
3# This program is free software; you can redistribute it and/or
4# modify it under the terms of the GNU General Public License
5# as published by the Free Software Foundation; either version 2
6# of the License, or (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program; if not, write to the Free Software
15# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
16
17#*************************************************************************
18ifeq ($(PARAM_FILE), )
19    PARAM_FILE:=../../Makefile.param
20    include $(PARAM_FILE)
21endif
22
23ifeq ($(CBB_PARAM_FILE), )
24    CBB_PARAM_FILE:=../Makefile.param
25    include $(CBB_PARAM_FILE)
26endif
27#*************************************************************************
28# local header include
29MKP_CFLAGS+=-I $(PWD)/mkp/include
30MKP_CFLAGS+=-I $(PWD)/arch/include
31MKP_CFLAGS+=-I $(PWD)/arch/$(HIARCH)/include
32MKP_CFLAGS+=-I $(PWD)/arch/$(HIARCH)/include/$(HI_SUBARCH)
33
34#*************************************************************************
35# all source file in this module
36SRCS:=
37
38# src relative path
39CBB_BASE_ROOT=./
40CBB_BASE_ARCH=arch/$(HIARCH)/
41
42# Makefile absolute path
43include $(CBB_ROOT)/based/mkp/src/Makefile
44
45INIT_FILE := ../init/$(HIARCH)/$(OSTYPE)/base_init.c
46
47SRCS_O := $(SRCS)
48SRCS   += $(INIT_FILE)
49
50#*************************************************************************
51# release header
52INC_FILE  := $(wildcard $(CBB_ROOT)/include/*.h)
53INC_FILE  += $(wildcard include/*.h)
54INC_FILE  += $(CBB_BASE_ARCH)/include/$(HI_SUBARCH)/hi_defines.h
55INC_FILE  += $(CBB_ROOT)/init/include/$(OSTYPE)/hi_module_param.h
56
57MKP_CFLAGS :=$(subst base/,based/,$(MKP_CFLAGS))
58MKP_CFLAGS :=$(subst sys/,sysd/,$(MKP_CFLAGS))
59MOD_NAME := hi_base
60
61#*************************************************************************
62TARGET := $(ARCH_LIBNAME)_base
63
64#*************************************************************************
65# compile linux or huawei_liteos
66	include $(PWD)/../Makefile.$(OSTYPE)
67