blob: 0c11e35f250f34b25da1ddb2abf528a3b5a609a6 [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 Capens9c025c02015-12-07 20:58:40 -05005 $(LOCAL_PATH)/OpenGL/include \
6 $(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 += \
Greg Hartman9ec919a2015-04-16 21:44:59 -070039 Reactor/Nucleus.cpp \
40 Reactor/Routine.cpp \
41 Reactor/RoutineManager.cpp
42
Greg Hartmandf01da32015-09-16 15:27:27 -070043COMMON_SRC_FILES += \
Greg Hartman9ec919a2015-04-16 21:44:59 -070044 Renderer/Blitter.cpp \
45 Renderer/Clipper.cpp \
46 Renderer/Color.cpp \
47 Renderer/Context.cpp \
Alexis Hetu0de50d42015-09-09 13:56:41 -040048 Renderer/ETC_Decoder.cpp \
Greg Hartman9ec919a2015-04-16 21:44:59 -070049 Renderer/Matrix.cpp \
50 Renderer/PixelProcessor.cpp \
51 Renderer/Plane.cpp \
52 Renderer/Point.cpp \
53 Renderer/QuadRasterizer.cpp \
Greg Hartman9ec919a2015-04-16 21:44:59 -070054 Renderer/Renderer.cpp \
55 Renderer/Sampler.cpp \
56 Renderer/SetupProcessor.cpp \
57 Renderer/Surface.cpp \
58 Renderer/TextureStage.cpp \
59 Renderer/Vector.cpp \
60 Renderer/VertexProcessor.cpp \
61
Greg Hartmandf01da32015-09-16 15:27:27 -070062COMMON_SRC_FILES += \
Greg Hartman9ec919a2015-04-16 21:44:59 -070063 Shader/Constants.cpp \
Alexis Hetuf2a8c372015-07-13 11:08:41 -040064 Shader/PixelPipeline.cpp \
65 Shader/PixelProgram.cpp \
Greg Hartman9ec919a2015-04-16 21:44:59 -070066 Shader/PixelRoutine.cpp \
67 Shader/PixelShader.cpp \
68 Shader/SamplerCore.cpp \
69 Shader/SetupRoutine.cpp \
70 Shader/Shader.cpp \
71 Shader/ShaderCore.cpp \
72 Shader/VertexPipeline.cpp \
73 Shader/VertexProgram.cpp \
74 Shader/VertexRoutine.cpp \
75 Shader/VertexShader.cpp \
76
Greg Hartmandf01da32015-09-16 15:27:27 -070077COMMON_SRC_FILES += \
Nicolas Capensdeda34b2015-04-28 15:21:53 -070078 OpenGL/common/Image.cpp \
Greg Hartman9ec919a2015-04-16 21:44:59 -070079 OpenGL/common/Object.cpp \
80 OpenGL/common/MatrixStack.cpp \
81
Greg Hartman3b876b92015-12-01 20:07:21 -080082COMMON_CFLAGS := \
83 -DLOG_TAG=\"swiftshader\" \
84 -Wno-unused-parameter \
85 -Wno-implicit-exception-spec-mismatch \
86 -Wno-overloaded-virtual \
87 -fno-operator-names \
88 -msse2 \
89 -D__STDC_CONSTANT_MACROS \
90 -D__STDC_LIMIT_MACROS \
91 -DANDROID_PLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) \
92 -std=c++11
Nicolas Capens135f6342015-11-11 10:49:08 -050093
Greg Hartman3b876b92015-12-01 20:07:21 -080094ifneq (16,${PLATFORM_SDK_VERSION})
95COMMON_CFLAGS += -Xclang -fuse-init-array
96else
97COMMON_CFLAGS += -D__STDC_INT64__
98endif
99
Greg Hartmandf01da32015-09-16 15:27:27 -0700100include $(CLEAR_VARS)
101LOCAL_CLANG := true
102LOCAL_MODULE := swiftshader_top_release
103LOCAL_MODULE_TAGS := optional
104LOCAL_SRC_FILES := $(COMMON_SRC_FILES)
105LOCAL_CFLAGS := $(COMMON_CFLAGS) -fomit-frame-pointer -ffunction-sections -fdata-sections -DANGLE_DISABLE_TRACE
106LOCAL_C_INCLUDES := $(COMMON_C_INCLUDES)
107include $(BUILD_STATIC_LIBRARY)
Greg Hartman9ec919a2015-04-16 21:44:59 -0700108
Greg Hartmandf01da32015-09-16 15:27:27 -0700109include $(CLEAR_VARS)
110LOCAL_CLANG := true
111LOCAL_MODULE := swiftshader_top_debug
112LOCAL_MODULE_TAGS := optional
113LOCAL_SRC_FILES := $(COMMON_SRC_FILES)
Greg Hartman5d6c1c72015-10-02 16:29:40 -0700114LOCAL_CFLAGS := $(COMMON_CFLAGS) -UNDEBUG -g -O0 -DDEFAULT_THREAD_COUNT=1
Greg Hartmandf01da32015-09-16 15:27:27 -0700115LOCAL_C_INCLUDES := $(COMMON_C_INCLUDES)
Greg Hartman9ec919a2015-04-16 21:44:59 -0700116include $(BUILD_STATIC_LIBRARY)
Greg Hartman8527e472015-11-02 13:08:12 -0800117
Greg Hartman8527e472015-11-02 13:08:12 -0800118include $(call all-makefiles-under,$(LOCAL_PATH))