blob: fda81a7cf25d9b858371db92a1f87efd6d09ea49 [file] [log] [blame]
dan sinclair5ba79d52018-11-26 16:27:55 -05001LOCAL_PATH := $(call my-dir)
2
3GLSLANG_OS_FLAGS := -DGLSLANG_OSINCLUDE_UNIX
4# AMD and NV extensions are turned on by default in upstream Glslang.
5GLSLANG_DEFINES:= -DAMD_EXTENSIONS -DNV_EXTENSIONS -DENABLE_HLSL $(GLSLANG_OS_FLAGS)
6
7include $(CLEAR_VARS)
8LOCAL_MODULE:=OSDependent
9LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
10LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)
11LOCAL_SRC_FILES:=glslang/OSDependent/Unix/ossource.cpp
12LOCAL_C_INCLUDES:=$(LOCAL_PATH) $(LOCAL_PATH)/glslang/OSDependent/Unix/
13LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)/glslang/OSDependent/Unix/
14include $(BUILD_STATIC_LIBRARY)
15
16include $(CLEAR_VARS)
17LOCAL_MODULE:=OGLCompiler
18LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
19LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)
20LOCAL_SRC_FILES:=OGLCompilersDLL/InitializeDll.cpp
21LOCAL_C_INCLUDES:=$(LOCAL_PATH)/OGLCompiler
22LOCAL_STATIC_LIBRARIES:=OSDependent
23include $(BUILD_STATIC_LIBRARY)
24
25# Build Glslang's HLSL parser library.
26include $(CLEAR_VARS)
27LOCAL_MODULE:=HLSL
28LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
29LOCAL_SRC_FILES:= \
30 hlsl/hlslAttributes.cpp \
31 hlsl/hlslGrammar.cpp \
32 hlsl/hlslOpMap.cpp \
33 hlsl/hlslParseables.cpp \
34 hlsl/hlslParseHelper.cpp \
35 hlsl/hlslScanContext.cpp \
36 hlsl/hlslTokenStream.cpp
37LOCAL_C_INCLUDES:=$(LOCAL_PATH) \
38 $(LOCAL_PATH)/hlsl
39include $(BUILD_STATIC_LIBRARY)
40
41include $(CLEAR_VARS)
42GLSLANG_OUT_PATH=$(if $(call host-path-is-absolute,$(TARGET_OUT)),$(TARGET_OUT),$(abspath $(TARGET_OUT)))
43
44LOCAL_MODULE:=glslang
45LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
46LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)
47LOCAL_SRC_FILES:= \
48 glslang/GenericCodeGen/CodeGen.cpp \
49 glslang/GenericCodeGen/Link.cpp \
50 glslang/MachineIndependent/attribute.cpp \
51 glslang/MachineIndependent/Constant.cpp \
52 glslang/MachineIndependent/glslang_tab.cpp \
53 glslang/MachineIndependent/InfoSink.cpp \
54 glslang/MachineIndependent/Initialize.cpp \
55 glslang/MachineIndependent/Intermediate.cpp \
56 glslang/MachineIndependent/intermOut.cpp \
57 glslang/MachineIndependent/IntermTraverse.cpp \
58 glslang/MachineIndependent/iomapper.cpp \
59 glslang/MachineIndependent/limits.cpp \
60 glslang/MachineIndependent/linkValidate.cpp \
61 glslang/MachineIndependent/parseConst.cpp \
62 glslang/MachineIndependent/ParseContextBase.cpp \
63 glslang/MachineIndependent/ParseHelper.cpp \
64 glslang/MachineIndependent/PoolAlloc.cpp \
65 glslang/MachineIndependent/propagateNoContraction.cpp \
66 glslang/MachineIndependent/reflection.cpp \
67 glslang/MachineIndependent/RemoveTree.cpp \
68 glslang/MachineIndependent/Scan.cpp \
69 glslang/MachineIndependent/ShaderLang.cpp \
70 glslang/MachineIndependent/SymbolTable.cpp \
71 glslang/MachineIndependent/Versions.cpp \
72 glslang/MachineIndependent/preprocessor/PpAtom.cpp \
73 glslang/MachineIndependent/preprocessor/PpContext.cpp \
74 glslang/MachineIndependent/preprocessor/Pp.cpp \
75 glslang/MachineIndependent/preprocessor/PpScanner.cpp \
76 glslang/MachineIndependent/preprocessor/PpTokens.cpp
77LOCAL_C_INCLUDES:=$(LOCAL_PATH) \
78 $(LOCAL_PATH)/glslang/MachineIndependent \
79 $(GLSLANG_OUT_PATH)
80LOCAL_STATIC_LIBRARIES:=OSDependent OGLCompiler HLSL
81include $(BUILD_STATIC_LIBRARY)
82
83include $(CLEAR_VARS)
84LOCAL_MODULE:=SPIRV
85LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti -Werror $(GLSLANG_DEFINES)
86LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)
87LOCAL_SRC_FILES:= \
88 SPIRV/GlslangToSpv.cpp \
89 SPIRV/InReadableOrder.cpp \
90 SPIRV/Logger.cpp \
91 SPIRV/SPVRemapper.cpp \
92 SPIRV/SpvBuilder.cpp \
93 SPIRV/SpvPostProcess.cpp \
94 SPIRV/SpvTools.cpp \
95 SPIRV/disassemble.cpp \
96 SPIRV/doc.cpp
97LOCAL_C_INCLUDES:=$(LOCAL_PATH) $(LOCAL_PATH)/glslang/SPIRV
98LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)/glslang/SPIRV
99LOCAL_STATIC_LIBRARIES:=glslang
100include $(BUILD_STATIC_LIBRARY)