#******************************************************************************* # HangZhou Hikvision Digital Technology Co., Ltd. All Right Reserved. # Author : # Version : V1.0.0 2020.10.21 # Description : # Note : yegaoyang@hikvision.com.cn Modified 2020.10.21 #******************************************************************************* #******************************************************************************* # Path information #******************************************************************************* LOCAL_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST)))) KERNEL_DIR ?= /home/gaoyang3513/Source/06-SG20x/02-Projects/SDK_SG200x_V2/linux_5.10/build/sg2000_milkv_duos_glibc_arm64_sd #KERNEL_DIR ?= $(HOME)/Source/06-SG20x/02-Projects/SDK_SG200x_V2/linux_5.10/build/sg2000_milkv_duos_glibc_arm64_sd/ # ParDirectory LIBS_DIR := INCLUDE_DIR := # Subdirectory SUB_DIRS := $(LOCAL_DIR)/01-Panic # Output OUTPUT_DIR := $(LOCAL_DIR)/output INSTALL_DIR ?= $(LOCAL_DIR)/__install #******************************************************************************* # Variables #******************************************************************************* MULTI_CORES ?= $(shell grep -c ^processor /proc/cpuinfo) MOD_NAME := test_panic #******************************************************************************* # Compile configure #******************************************************************************* ARCH ?= arm64 CROSS_COMPILE ?= ${HOME}/Source/06-SG20x/02-Projects/SDK_SG200x_V2/host-tools/gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- CC := $(CROSS_COMPILE)gcc LD := $(CROSS_COMPILE)ld AR := $(CROSS_COMPILE)ar STRIP := $(CROSS_COMPILE)strip export ARCH CROSS_COMPILE #******************************************************************************* # Targets #******************************************************************************* .PHONY: init all clean install menuconfig ifeq ($(KERNELRELEASE),) all: init @for sub in $(SUB_DIRS); do \ $(MAKE) -C $$sub || exit "$$?"; \ $(MAKE) install INSTALL_DIR=$(OUTPUT_DIR) -C $$sub || exit "$$?"; \ done; clean: @for sub in $(SUB_DIRS); do \ $(MAKE) clean -C $$sub || exit "$$?"; \ done; # Directory @if [ -d $(LOCAL_DIR)/output ]; then rm -rf $(LOCAL_DIR)/output; fi; @if [ -d $(LOCAL_DIR)/__install ]; then rm -rf $(LOCAL_DIR)/__install; fi; install: @mkdir -p $(INSTALL_DIR) @cp -arf $(OUTPUT_DIR)/. $(INSTALL_DIR) init: @mkdir -p $(OUTPUT_DIR); else # called from kernel build system: just declare what our modules are obj-y += $(SUB_DIRS) INC_DIRS := subdir-ccflags-y += $(addprefix -I, $(INC_DIRS)) endif # ifeq ($(KERNELRELEASE),)