xref: /aosp_15_r20/external/OpenCSD/decoder/build/linux/makefile.dev (revision 02ca8ccacfba7e0df68f3332a95f3180334d6649)
1*02ca8ccaSAndroid Build Coastguard Worker########################################################
2*02ca8ccaSAndroid Build Coastguard Worker# Copyright 2018 ARM Limited. All rights reserved.
3*02ca8ccaSAndroid Build Coastguard Worker#
4*02ca8ccaSAndroid Build Coastguard Worker# Redistribution and use in source and binary forms, with or without modification,
5*02ca8ccaSAndroid Build Coastguard Worker# are permitted provided that the following conditions are met:
6*02ca8ccaSAndroid Build Coastguard Worker#
7*02ca8ccaSAndroid Build Coastguard Worker# 1. Redistributions of source code must retain the above copyright notice,
8*02ca8ccaSAndroid Build Coastguard Worker# this list of conditions and the following disclaimer.
9*02ca8ccaSAndroid Build Coastguard Worker#
10*02ca8ccaSAndroid Build Coastguard Worker# 2. Redistributions in binary form must reproduce the above copyright notice,
11*02ca8ccaSAndroid Build Coastguard Worker# this list of conditions and the following disclaimer in the documentation
12*02ca8ccaSAndroid Build Coastguard Worker# and/or other materials provided with the distribution.
13*02ca8ccaSAndroid Build Coastguard Worker#
14*02ca8ccaSAndroid Build Coastguard Worker# 3. Neither the name of the copyright holder nor the names of its contributors
15*02ca8ccaSAndroid Build Coastguard Worker# may be used to endorse or promote products derived from this software without
16*02ca8ccaSAndroid Build Coastguard Worker# specific prior written permission.
17*02ca8ccaSAndroid Build Coastguard Worker#
18*02ca8ccaSAndroid Build Coastguard Worker# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
19*02ca8ccaSAndroid Build Coastguard Worker# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20*02ca8ccaSAndroid Build Coastguard Worker# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21*02ca8ccaSAndroid Build Coastguard Worker# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22*02ca8ccaSAndroid Build Coastguard Worker# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23*02ca8ccaSAndroid Build Coastguard Worker# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24*02ca8ccaSAndroid Build Coastguard Worker# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25*02ca8ccaSAndroid Build Coastguard Worker# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26*02ca8ccaSAndroid Build Coastguard Worker# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27*02ca8ccaSAndroid Build Coastguard Worker# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28*02ca8ccaSAndroid Build Coastguard Worker#
29*02ca8ccaSAndroid Build Coastguard Worker#################################################################################
30*02ca8ccaSAndroid Build Coastguard Worker
31*02ca8ccaSAndroid Build Coastguard Worker## Set up some addtional parameters for development environment builds. ##
32*02ca8ccaSAndroid Build Coastguard Worker
33*02ca8ccaSAndroid Build Coastguard Worker## define arch/build sub-dirs for non installed dev builds
34*02ca8ccaSAndroid Build Coastguard Workerifndef ARCH
35*02ca8ccaSAndroid Build Coastguard WorkerARCH := $(shell dpkg-architecture -q DEB_HOST_GNU_CPU || echo not)
36*02ca8ccaSAndroid Build Coastguard Workerendif
37*02ca8ccaSAndroid Build Coastguard Worker
38*02ca8ccaSAndroid Build Coastguard Worker# platform bit size variant
39*02ca8ccaSAndroid Build Coastguard Workerifeq ($(ARCH),x86)
40*02ca8ccaSAndroid Build Coastguard Worker   MFLAG:="-m32"
41*02ca8ccaSAndroid Build Coastguard Worker   BIT_VARIANT=32
42*02ca8ccaSAndroid Build Coastguard Workerelse ifeq ($(ARCH),x86_64)
43*02ca8ccaSAndroid Build Coastguard Worker   MFLAG:="-m64"
44*02ca8ccaSAndroid Build Coastguard Worker   BIT_VARIANT=64
45*02ca8ccaSAndroid Build Coastguard Workerelse ifeq ($(ARCH),arm)
46*02ca8ccaSAndroid Build Coastguard Worker   BIT_VARIANT=-arm
47*02ca8ccaSAndroid Build Coastguard Workerelse ifeq ($(ARCH),arm64)
48*02ca8ccaSAndroid Build Coastguard Worker   BIT_VARIANT=-arm64
49*02ca8ccaSAndroid Build Coastguard Workerelse ifeq ($(ARCH),aarch64)
50*02ca8ccaSAndroid Build Coastguard Worker   BIT_VARIANT=-arm64
51*02ca8ccaSAndroid Build Coastguard Workerelse ifeq ($(ARCH),aarch32)
52*02ca8ccaSAndroid Build Coastguard Worker   BIT_VARIANT=-arm
53*02ca8ccaSAndroid Build Coastguard Workerendif
54*02ca8ccaSAndroid Build Coastguard Worker
55*02ca8ccaSAndroid Build Coastguard WorkerCXXFLAGS += $(MFLAG)
56*02ca8ccaSAndroid Build Coastguard WorkerCFLAGS += $(MFLAG)
57*02ca8ccaSAndroid Build Coastguard WorkerLDFLAGS += $(MFLAG)
58*02ca8ccaSAndroid Build Coastguard Worker
59*02ca8ccaSAndroid Build Coastguard Workerifdef GCCDIR
60*02ca8ccaSAndroid Build Coastguard WorkerGCCVER:= $(shell $(CROSS_COMPILE)gcc -dumpversion | sed 's/\([0-9]*\.[0-9]*\).*/\1/')
61*02ca8ccaSAndroid Build Coastguard WorkerPLAT_DIR=builddir/linux$(BIT_VARIANT)/GCC_$(GCCVER)
62*02ca8ccaSAndroid Build Coastguard Workerelse
63*02ca8ccaSAndroid Build Coastguard WorkerPLAT_DIR=linux$(BIT_VARIANT)/$(BUILD_VARIANT)
64*02ca8ccaSAndroid Build Coastguard Workerendif
65*02ca8ccaSAndroid Build Coastguard Worker
66*02ca8ccaSAndroid Build Coastguard Worker# for dev env, enable static link build test
67*02ca8ccaSAndroid Build Coastguard Workerexport TEST_STATIC_LINKING=1
68*02ca8ccaSAndroid Build Coastguard Worker
69*02ca8ccaSAndroid Build Coastguard Worker# include the main makefile
70*02ca8ccaSAndroid Build Coastguard Workerinclude makefile
71