Files
HiSTBLinuxV100R005C00SPC060/source/boot/miniboot/scripts/Makefile.define
T
2024-08-12 23:03:27 +08:00

46 lines
1.5 KiB
Makefile

################################################################################
# Copyright (C) 2014 Hisilicon STB Development Dept
# All rights reserved.
#####
# Create by Cai Zhiyong
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################
#
# $(call make_dep,dir,basename,ext)
#
define make_dep
$(CC) $(CFLAGS) -M $1/$2.$3 | sed "s,$2.o:,$1/$2.o $1/$2.d:,g" > $1/$2.d
endef
#
# $(call show_cmd,cmd,file)
#
define show_cmd
@if [ ss"${V}" == ss"0" ]; then ( \
CMD=" "$1" "; \
echo "$${CMD:0:10}$2"; \
) fi
endef
#
# $(call export_make,xxx_config)
#
define export_make
@(echo "DEFTARGET = $1"; \
echo "$1:"; \
echo " ""$$""(call show_cmd,CHECK,""$$""{DEFCONFIG})"; \
echo " ""$$""(Q)""$$""(SHELL) ""$$""{EXPORTCONFIG} check ""$$""{TGTCONFIG} ""$$""{DEFCONFIG} ""$$""{CONFIGINC} INPUTFLAGS"; \
echo " ""$$""(Q)""$$""(MAKE) ""$$""{QUIET} ""$$""(BOOT).bin";) > $(DEFMAKEFILE)
endef