gpu: update midgard r21p0 kernel driver
[GitHub/LineageOS/G12/android_hardware_amlogic_kernel-modules_mali-driver.git] / midgard / r16p0 / kernel / drivers / base / dma_buf_lock / src / sconscript
1 #
2 # (C) COPYRIGHT 2012-2013, 2016 ARM Limited. All rights reserved.
3 #
4 # This program is free software and is provided to you under the terms of the
5 # GNU General Public License version 2 as published by the Free Software
6 # Foundation, and any use by you of this program is subject to the terms
7 # of such GNU licence.
8 #
9 # A copy of the licence is included with the program, and can also be obtained
10 # from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
11 # Boston, MA 02110-1301, USA.
12 #
13 #
14
15
16 import os
17 import re
18 Import('env')
19
20 src = [Glob('#kernel/drivers/base/dma_buf_lock/src/*.c'), Glob('#kernel/drivers/base/dma_buf_lock/src/*.h'), Glob('#kernel/drivers/base/dma_buf_lock/src/K*')]
21
22 if env.GetOption('clean') :
23 # Clean module
24 env.Execute(Action("make clean", '[CLEAN] dma_buf_lock'))
25 cmd = env.Command('$STATIC_LIB_PATH/dma_buf_lock.ko', src, [])
26 env.KernelObjTarget('dma_buf_lock', cmd)
27
28 else:
29 # Build module
30 makeAction=Action("cd ${SOURCE.dir} && make dma_buf_lock && cp dma_buf_lock.ko $STATIC_LIB_PATH/", '$MAKECOMSTR')
31 cmd = env.Command('$STATIC_LIB_PATH/dma_buf_lock.ko', src, [makeAction])
32 env.KernelObjTarget('dma_buf_lock', cmd)
33