blob: fde56e37539ad275026e75db6e001b0ca1ae0cdf [file] [log] [blame]
Greg Hartman9ec919a2015-04-16 21:44:59 -07001LOCAL_PATH:= $(call my-dir)
Greg Hartman9ec919a2015-04-16 21:44:59 -07002
Greg Hartmandf01da32015-09-16 15:27:27 -07003COMMON_C_INCLUDES += \
4 bionic \
Nicolas Capensb7510aa2016-05-16 13:16:32 -04005 $(LOCAL_PATH)/../include \
Nicolas Capens9c025c02015-12-07 20:58:40 -05006 $(LOCAL_PATH)/OpenGL/ \
7 $(LOCAL_PATH) \
8 $(LOCAL_PATH)/Renderer/ \
9 $(LOCAL_PATH)/Common/ \
10 $(LOCAL_PATH)/Shader/ \
Nicolas Capense1780002016-05-05 19:02:54 -040011 $(LOCAL_PATH)/../third_party/LLVM/include \
Nicolas Capens9c025c02015-12-07 20:58:40 -050012 $(LOCAL_PATH)/Main/
13
14# Marshmallow does not have stlport, but comes with libc++ by default
15ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23 && echo PreMarshmallow),PreMarshmallow)
16COMMON_C_INCLUDES += external/stlport/stlport
17endif
Greg Hartman9ec919a2015-04-16 21:44:59 -070018
Greg Hartmandf01da32015-09-16 15:27:27 -070019COMMON_SRC_FILES := \
Greg Hartman9ec919a2015-04-16 21:44:59 -070020 Common/CPUID.cpp \
21 Common/Configurator.cpp \
22 Common/DebugAndroid.cpp \
Greg Hartmanf66c1102015-04-17 17:29:14 -070023 Common/GrallocAndroid.cpp \
Greg Hartman9ec919a2015-04-16 21:44:59 -070024 Common/Half.cpp \
25 Common/Math.cpp \
26 Common/Memory.cpp \
27 Common/Resource.cpp \
28 Common/Socket.cpp \
29 Common/Thread.cpp \
30 Common/Timer.cpp
31
Greg Hartmandf01da32015-09-16 15:27:27 -070032COMMON_SRC_FILES += \
Greg Hartman9ec919a2015-04-16 21:44:59 -070033 Main/Config.cpp \
34 Main/FrameBuffer.cpp \
35 Main/FrameBufferAndroid.cpp \
Nicolas Capens518e41a2016-04-27 23:18:01 -040036 Main/SwiftConfig.cpp
Greg Hartman9ec919a2015-04-16 21:44:59 -070037
Greg Hartmandf01da32015-09-16 15:27:27 -070038COMMON_SRC_FILES += \
Nicolas Capens5763d172016-09-26 13:44:20 -040039 Reactor/LLVMReactor.cpp \
Greg Hartman9ec919a2015-04-16 21:44:59 -070040 Reactor/Routine.cpp \
Nicolas Capensdaa5d912016-09-28 16:56:36 -040041 Reactor/LLVMRoutine.cpp \
42 Reactor/LLVMRoutineManager.cpp
Greg Hartman9ec919a2015-04-16 21:44:59 -070043
Greg Hartmandf01da32015-09-16 15:27:27 -070044COMMON_SRC_FILES += \
Greg Hartman9ec919a2015-04-16 21:44:59 -070045 Renderer/Blitter.cpp \
46 Renderer/Clipper.cpp \
47 Renderer/Color.cpp \
48 Renderer/Context.cpp \
Alexis Hetu0de50d42015-09-09 13:56:41 -040049 Renderer/ETC_Decoder.cpp \
Greg Hartman9ec919a2015-04-16 21:44:59 -070050 Renderer/Matrix.cpp \
51 Renderer/PixelProcessor.cpp \
52 Renderer/Plane.cpp \
53 Renderer/Point.cpp \
54 Renderer/QuadRasterizer.cpp \
Greg Hartman9ec919a2015-04-16 21:44:59 -070055 Renderer/Renderer.cpp \
56 Renderer/Sampler.cpp \
57 Renderer/SetupProcessor.cpp \
58 Renderer/Surface.cpp \
59 Renderer/TextureStage.cpp \
60 Renderer/Vector.cpp \
61 Renderer/VertexProcessor.cpp \
62
Greg Hartmandf01da32015-09-16 15:27:27 -070063COMMON_SRC_FILES += \
Greg Hartman9ec919a2015-04-16 21:44:59 -070064 Shader/Constants.cpp \
Alexis Hetuf2a8c372015-07-13 11:08:41 -040065 Shader/PixelPipeline.cpp \
66 Shader/PixelProgram.cpp \
Greg Hartman9ec919a2015-04-16 21:44:59 -070067 Shader/PixelRoutine.cpp \
68 Shader/PixelShader.cpp \
69 Shader/SamplerCore.cpp \
70 Shader/SetupRoutine.cpp \
71 Shader/Shader.cpp \
72 Shader/ShaderCore.cpp \
73 Shader/VertexPipeline.cpp \
74 Shader/VertexProgram.cpp \
75 Shader/VertexRoutine.cpp \
76 Shader/VertexShader.cpp \
77
Greg Hartmandf01da32015-09-16 15:27:27 -070078COMMON_SRC_FILES += \
Nicolas Capensdeda34b2015-04-28 15:21:53 -070079 OpenGL/common/Image.cpp \
Greg Hartman9ec919a2015-04-16 21:44:59 -070080 OpenGL/common/Object.cpp \
81 OpenGL/common/MatrixStack.cpp \
82
Greg Hartman3b876b92015-12-01 20:07:21 -080083COMMON_CFLAGS := \
84 -DLOG_TAG=\"swiftshader\" \
85 -Wno-unused-parameter \
86 -Wno-implicit-exception-spec-mismatch \
87 -Wno-overloaded-virtual \
88 -fno-operator-names \
89 -msse2 \
90 -D__STDC_CONSTANT_MACROS \
91 -D__STDC_LIMIT_MACROS \
92 -DANDROID_PLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) \
93 -std=c++11
Nicolas Capens135f6342015-11-11 10:49:08 -050094
Greg Hartman3b876b92015-12-01 20:07:21 -080095ifneq (16,${PLATFORM_SDK_VERSION})
96COMMON_CFLAGS += -Xclang -fuse-init-array
97else
98COMMON_CFLAGS += -D__STDC_INT64__
99endif
100
Greg Hartmandf01da32015-09-16 15:27:27 -0700101include $(CLEAR_VARS)
102LOCAL_CLANG := true
103LOCAL_MODULE := swiftshader_top_release
104LOCAL_MODULE_TAGS := optional
105LOCAL_SRC_FILES := $(COMMON_SRC_FILES)
106LOCAL_CFLAGS := $(COMMON_CFLAGS) -fomit-frame-pointer -ffunction-sections -fdata-sections -DANGLE_DISABLE_TRACE
107LOCAL_C_INCLUDES := $(COMMON_C_INCLUDES)
108include $(BUILD_STATIC_LIBRARY)
Greg Hartman9ec919a2015-04-16 21:44:59 -0700109
Greg Hartmandf01da32015-09-16 15:27:27 -0700110include $(CLEAR_VARS)
111LOCAL_CLANG := true
112LOCAL_MODULE := swiftshader_top_debug
113LOCAL_MODULE_TAGS := optional
114LOCAL_SRC_FILES := $(COMMON_SRC_FILES)
Greg Hartman5d6c1c72015-10-02 16:29:40 -0700115LOCAL_CFLAGS := $(COMMON_CFLAGS) -UNDEBUG -g -O0 -DDEFAULT_THREAD_COUNT=1
Greg Hartmandf01da32015-09-16 15:27:27 -0700116LOCAL_C_INCLUDES := $(COMMON_C_INCLUDES)
Greg Hartman9ec919a2015-04-16 21:44:59 -0700117include $(BUILD_STATIC_LIBRARY)
Greg Hartman8527e472015-11-02 13:08:12 -0800118
Greg Hartman8527e472015-11-02 13:08:12 -0800119include $(call all-makefiles-under,$(LOCAL_PATH))