• 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# cbb global variables definition
18include Makefile.param
19
20.PHONY:clean all base sys vi mcf vo vo_dev vpss avs chnl region vgs gdc venc vedu vdec vfmw jpegd dis isp audio audio_bin
21
22target = base sys
23
24# cbb common include file
25HI_COMM_INC_FILE += $(CBB_ROOT)/dis/gmedis/include/hi_comm_dis.h
26HI_COMM_INC_FILE += $(CBB_ROOT)/region/include/hi_comm_region.h
27HI_COMM_INC_FILE += $(VGS_ROOT)/include/hi_comm_vgs.h
28HI_COMM_INC_FILE += $(CBB_ROOT)/sys/include/hi_comm_sys.h
29HI_COMM_INC_FILE += $(VENC_ROOT)/include/h7/hi_comm_venc.h
30HI_COMM_INC_FILE += $(VENC_ROOT)/include/h7/hi_comm_rc.h
31HI_COMM_INC_FILE += $(CBB_ROOT)/vpss/include/hi_comm_vpss.h
32HI_COMM_INC_FILE += $(CBB_ROOT)/include/hi_common.h
33HI_COMM_INC_FILE += $(CBB_ROOT)/include/hi_comm_video.h
34HI_COMM_INC_FILE += $(CBB_ROOT)/base/include/hi_comm_vb.h
35HI_COMM_INC_FILE += $(CBB_ROOT)/vi/include/hi_comm_vi.h
36HI_COMM_INC_FILE += $(CBB_ROOT)/vi/include/hi_comm_snap.h
37HI_COMM_INC_FILE += $(CBB_ROOT)/vo/include/hi_comm_vo.h
38HI_COMM_INC_FILE += $(CBB_ROOT)/vo/vo_dev/include/hi_comm_vo_dev.h
39HI_COMM_INC_FILE += $(CBB_ROOT)/gdc/include/hi_comm_gdc.h
40
41ifeq ($(CONFIG_HI_VO_SUPPORT), y)
42    target += vo_dev
43    MPI_SRC_DIR += $(CBB_ROOT)/vo/vo_dev/mpi
44    MPI_CFLAGS += -I$(CBB_ROOT)/vo/vo_dev/mpi/adapt
45    MPI_CFLAGS += -I$(CBB_ROOT)/vo/vo_dev/include/adapt
46    MPI_INC_DIR += $(CBB_ROOT)/vo/vo_dev/include
47endif
48
49########################################################
50
51#-----------------------------------------------------
52
53target_clean = $(patsubst %,%_clean,$(target))
54#-----------------------------------------------------
55
56#-----------------------------------------------------
57all: $(target)
58
59mpi: $(MPI_OBJS)
60	@mkdir -p "$(REL_LIB)"
61	@mkdir -p "$(REL_INC)"
62	@mkdir -p "$(ADAPT_INC)"
63	@$(AR) -rsv $(LIB_A) $(MPI_OBJS) > /dev/null
64	@$(CC) $(LIBS_LD_CFLAGS) -fPIC -shared -o $(LIB_S) $(MPI_OBJS) > /dev/null
65	@$(call maco_cp_file,$(INC_FILE),$(REL_INC))
66	@$(call maco_cp_file,$(HI_COMM_INC_FILE),$(REL_INC))
67	@$(call maco_cp_file,$(ADPAT_FILE),$(ADAPT_INC))
68
69base:
70	@cd based && make
71
72sys:
73	@cd sysd && make
74
75chnl:
76	@cd chnl && make
77
78region:
79	@cd region && make
80
81vgs:
82	@cd $(VGS_ROOT) && make
83
84vi:
85	@cd vi && make
86
87mcf:
88	@cd $(MCF_ROOT) && make
89vo:
90	@cd vo && make
91vo_dev:
92	@cd vo/vo_dev && make
93vpss:
94	@cd $(VPSS_ROOT) && make
95avs:
96	@cd avs && make
97vdec:
98	@cd $(VDEC_ROOT) && make
99vfmw:
100	@cd $(VFMW_ROOT) && make
101jpegd:
102	@cd jpegd && make
103
104gdc:
105	@cd gdc && make
106venc:
107	@cd $(VENC_ROOT) && make
108vedu:
109	@cd vedu && make
110dis:
111	@cd dis && make
112
113clean:$(target_clean)
114	@rm -fr $(OBJ_DIR) $(LIB_A) $(LIB_S)
115	@$(call maco_rm,$(REL_FILE),$(REL_INC))
116	@$(call maco_rmemptydir,$(ADAPT_INC))
117	@$(call maco_rmemptydir,$(REL_INC))
118	@$(call maco_rmemptydir,$(REL_LIB))
119mpi_clean:
120	@rm -fr $(MPI_OBJS) $(LIB_A) $(LIB_S)
121base_clean:
122	@cd based && make clean
123sys_clean:
124	@cd sysd && make clean
125chnl_clean:
126	@cd chnl && make clean
127venc_clean:
128	@cd $(VENC_ROOT) && make clean
129vedu_clean:
130	@cd vedu && make clean
131region_clean:
132	@cd region && make clean
133vgs_clean:
134	@cd $(VGS_ROOT) && make clean
135vi_clean:
136	@cd vi && make clean
137mcf_clean:
138	@cd $(MCF_ROOT) && make clean
139vo_clean:
140	@cd vo && make clean
141vo_dev_clean:
142	@cd vo/vo_dev && make clean
143vpss_clean:
144	@cd $(VPSS_ROOT) && make clean
145avs_clean:
146	@cd avs && make clean
147vdec_clean:
148	@cd $(VDEC_ROOT) && make clean
149vfmw_clean:
150	@cd $(VFMW_ROOT) && make clean
151jpegd_clean:
152	@cd jpegd && make clean
153gdc_clean:
154	@cd gdc && make clean
155dis_clean:
156	@cd dis && make clean
157