Bump actions/checkout from 4.1.3 to 4.1.4
[glslang.git] / Android.mk
blobdcb9958440002c7a267050cd1b5bd099a92373c7
1 # Copyright (C) 2020-2023 The Khronos Group Inc.
3 # All rights reserved.
5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions
7 # are met:
9 # Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer.
12 # Redistributions in binary form must reproduce the above
13 # copyright notice, this list of conditions and the following
14 # disclaimer in the documentation and/or other materials provided
15 # with the distribution.
17 # Neither the name of The Khronos Group Inc. nor the names of its
18 # contributors may be used to endorse or promote products derived
19 # from this software without specific prior written permission.
21 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25 # COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 # POSSIBILITY OF SUCH DAMAGE.
34 LOCAL_PATH := $(call my-dir)
36 # Generate glslang/build_info.h
37 GLSLANG_GENERATED_INCLUDEDIR:=$(TARGET_OUT)/include
38 GLSLANG_BUILD_INFO_H:=$(GLSLANG_GENERATED_INCLUDEDIR)/glslang/build_info.h
40 define gen_glslang_build_info_h
41 $(call generate-file-dir,$(GLSLANG_GENERATED_INCLUDEDIR)/dummy_filename)
42 $(GLSLANG_BUILD_INFO_H): \
43 $(LOCAL_PATH)/build_info.py \
44 $(LOCAL_PATH)/build_info.h.tmpl \
45 $(LOCAL_PATH)/CHANGES.md
46 @$(HOST_PYTHON) $(LOCAL_PATH)/build_info.py \
47 $(LOCAL_PATH) \
48 -i $(LOCAL_PATH)/build_info.h.tmpl \
49 -o $(GLSLANG_BUILD_INFO_H)
50 @echo "[$(TARGET_ARCH_ABI)] Generate : $(GLSLANG_BUILD_INFO_H) <= CHANGES.md"
51 endef
52 $(eval $(call gen_glslang_build_info_h))
54 GLSLANG_OS_FLAGS := -DGLSLANG_OSINCLUDE_UNIX
55 # AMD and NV extensions are turned on by default in upstream Glslang.
56 GLSLANG_DEFINES:= -DENABLE_HLSL $(GLSLANG_OS_FLAGS)
58 include $(CLEAR_VARS)
59 LOCAL_MODULE:=OSDependent
60 LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
61 LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)
62 LOCAL_SRC_FILES:=glslang/OSDependent/Unix/ossource.cpp
63 LOCAL_C_INCLUDES:=$(LOCAL_PATH) $(LOCAL_PATH)/glslang/OSDependent/Unix/
64 LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)/glslang/OSDependent/Unix/
65 include $(BUILD_STATIC_LIBRARY)
67 include $(CLEAR_VARS)
68 GLSLANG_OUT_PATH=$(if $(call host-path-is-absolute,$(TARGET_OUT)),$(TARGET_OUT),$(abspath $(TARGET_OUT)))
70 # ShaderLang.cpp depends on the generated build_info.h
71 $(LOCAL_PATH)/glslang/MachineIndependent/ShaderLang.cpp: \
72 $(GLSLANG_BUILD_INFO_H)
74 LOCAL_MODULE:=glslang
75 LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
76 LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)
77 LOCAL_SRC_FILES:= \
78 glslang/CInterface/glslang_c_interface.cpp \
79 glslang/GenericCodeGen/CodeGen.cpp \
80 glslang/GenericCodeGen/Link.cpp \
81 glslang/HLSL/hlslAttributes.cpp \
82 glslang/HLSL/hlslGrammar.cpp \
83 glslang/HLSL/hlslOpMap.cpp \
84 glslang/HLSL/hlslParseables.cpp \
85 glslang/HLSL/hlslParseHelper.cpp \
86 glslang/HLSL/hlslScanContext.cpp \
87 glslang/HLSL/hlslTokenStream.cpp \
88 glslang/MachineIndependent/attribute.cpp \
89 glslang/MachineIndependent/Constant.cpp \
90 glslang/MachineIndependent/glslang_tab.cpp \
91 glslang/MachineIndependent/InfoSink.cpp \
92 glslang/MachineIndependent/Initialize.cpp \
93 glslang/MachineIndependent/Intermediate.cpp \
94 glslang/MachineIndependent/intermOut.cpp \
95 glslang/MachineIndependent/IntermTraverse.cpp \
96 glslang/MachineIndependent/iomapper.cpp \
97 glslang/MachineIndependent/limits.cpp \
98 glslang/MachineIndependent/linkValidate.cpp \
99 glslang/MachineIndependent/parseConst.cpp \
100 glslang/MachineIndependent/ParseContextBase.cpp \
101 glslang/MachineIndependent/ParseHelper.cpp \
102 glslang/MachineIndependent/PoolAlloc.cpp \
103 glslang/MachineIndependent/propagateNoContraction.cpp \
104 glslang/MachineIndependent/reflection.cpp \
105 glslang/MachineIndependent/RemoveTree.cpp \
106 glslang/MachineIndependent/Scan.cpp \
107 glslang/MachineIndependent/ShaderLang.cpp \
108 glslang/MachineIndependent/SpirvIntrinsics.cpp \
109 glslang/MachineIndependent/SymbolTable.cpp \
110 glslang/MachineIndependent/Versions.cpp \
111 glslang/MachineIndependent/preprocessor/PpAtom.cpp \
112 glslang/MachineIndependent/preprocessor/PpContext.cpp \
113 glslang/MachineIndependent/preprocessor/Pp.cpp \
114 glslang/MachineIndependent/preprocessor/PpScanner.cpp \
115 glslang/MachineIndependent/preprocessor/PpTokens.cpp
116 LOCAL_C_INCLUDES:=$(LOCAL_PATH) \
117 $(LOCAL_PATH)/glslang/MachineIndependent \
118 $(GLSLANG_GENERATED_INCLUDEDIR) \
119 $(GLSLANG_OUT_PATH)
120 LOCAL_STATIC_LIBRARIES:=OSDependent
121 include $(BUILD_STATIC_LIBRARY)
123 include $(CLEAR_VARS)
125 # GlslangToSpv.cpp depends on the generated build_info.h
126 $(LOCAL_PATH)/SPIRV/GlslangToSpv.cpp: \
127 $(GLSLANG_BUILD_INFO_H)
129 LOCAL_MODULE:=SPIRV
130 LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti -Werror $(GLSLANG_DEFINES)
131 LOCAL_SRC_FILES:= \
132 SPIRV/CInterface/spirv_c_interface.cpp \
133 SPIRV/GlslangToSpv.cpp \
134 SPIRV/InReadableOrder.cpp \
135 SPIRV/Logger.cpp \
136 SPIRV/SPVRemapper.cpp \
137 SPIRV/SpvBuilder.cpp \
138 SPIRV/SpvPostProcess.cpp \
139 SPIRV/SpvTools.cpp \
140 SPIRV/disassemble.cpp \
141 SPIRV/doc.cpp
142 LOCAL_C_INCLUDES:=$(LOCAL_PATH) \
143 $(LOCAL_PATH)/glslang/SPIRV \
144 $(GLSLANG_GENERATED_INCLUDEDIR)
145 LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)/glslang/SPIRV
146 LOCAL_STATIC_LIBRARIES:=glslang
147 include $(BUILD_STATIC_LIBRARY)