Merge pull request #1606 from dj2/ndk_build
[platform/upstream/glslang.git] / Android.mk
1 LOCAL_PATH := $(call my-dir)
2
3 GLSLANG_OS_FLAGS := -DGLSLANG_OSINCLUDE_UNIX
4 # AMD and NV extensions are turned on by default in upstream Glslang.
5 GLSLANG_DEFINES:= -DAMD_EXTENSIONS -DNV_EXTENSIONS -DENABLE_HLSL $(GLSLANG_OS_FLAGS)
6
7 include $(CLEAR_VARS)
8 LOCAL_MODULE:=OSDependent
9 LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
10 LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)
11 LOCAL_SRC_FILES:=glslang/OSDependent/Unix/ossource.cpp
12 LOCAL_C_INCLUDES:=$(LOCAL_PATH) $(LOCAL_PATH)/glslang/OSDependent/Unix/
13 LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)/glslang/OSDependent/Unix/
14 include $(BUILD_STATIC_LIBRARY)
15
16 include $(CLEAR_VARS)
17 LOCAL_MODULE:=OGLCompiler
18 LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
19 LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)
20 LOCAL_SRC_FILES:=OGLCompilersDLL/InitializeDll.cpp
21 LOCAL_C_INCLUDES:=$(LOCAL_PATH)/OGLCompiler
22 LOCAL_STATIC_LIBRARIES:=OSDependent
23 include $(BUILD_STATIC_LIBRARY)
24
25 # Build Glslang's HLSL parser library.
26 include $(CLEAR_VARS)
27 LOCAL_MODULE:=HLSL
28 LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
29 LOCAL_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
37 LOCAL_C_INCLUDES:=$(LOCAL_PATH) \
38         $(LOCAL_PATH)/hlsl
39 include $(BUILD_STATIC_LIBRARY)
40
41 include $(CLEAR_VARS)
42 GLSLANG_OUT_PATH=$(if $(call host-path-is-absolute,$(TARGET_OUT)),$(TARGET_OUT),$(abspath $(TARGET_OUT)))
43
44 LOCAL_MODULE:=glslang
45 LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
46 LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)
47 LOCAL_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
77 LOCAL_C_INCLUDES:=$(LOCAL_PATH) \
78         $(LOCAL_PATH)/glslang/MachineIndependent \
79         $(GLSLANG_OUT_PATH)
80 LOCAL_STATIC_LIBRARIES:=OSDependent OGLCompiler HLSL
81 include $(BUILD_STATIC_LIBRARY)
82
83 include $(CLEAR_VARS)
84 LOCAL_MODULE:=SPIRV
85 LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti -Werror $(GLSLANG_DEFINES)
86 LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)
87 LOCAL_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
97 LOCAL_C_INCLUDES:=$(LOCAL_PATH) $(LOCAL_PATH)/glslang/SPIRV
98 LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)/glslang/SPIRV
99 LOCAL_STATIC_LIBRARIES:=glslang
100 include $(BUILD_STATIC_LIBRARY)