Home | History | Annotate | Download | only in src
      1 LOCAL_PATH:= $(call my-dir)
      2 
      3 COMMON_C_INCLUDES += \
      4 	bionic \
      5 	$(LOCAL_PATH)/../include \
      6 	$(LOCAL_PATH)/OpenGL/ \
      7 	$(LOCAL_PATH) \
      8 	$(LOCAL_PATH)/Renderer/ \
      9 	$(LOCAL_PATH)/Common/ \
     10 	$(LOCAL_PATH)/Shader/ \
     11 	$(LOCAL_PATH)/../third_party/LLVM/include \
     12 	$(LOCAL_PATH)/Main/
     13 
     14 # Marshmallow does not have stlport, but comes with libc++ by default
     15 ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23 && echo PreMarshmallow),PreMarshmallow)
     16 COMMON_C_INCLUDES += external/stlport/stlport
     17 endif
     18 
     19 COMMON_SRC_FILES := \
     20 	Common/CPUID.cpp \
     21 	Common/Configurator.cpp \
     22 	Common/DebugAndroid.cpp \
     23 	Common/GrallocAndroid.cpp \
     24 	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 
     32 COMMON_SRC_FILES += \
     33 	Main/Config.cpp \
     34 	Main/FrameBuffer.cpp \
     35 	Main/FrameBufferAndroid.cpp \
     36 	Main/SwiftConfig.cpp
     37 
     38 COMMON_SRC_FILES += \
     39 	Reactor/Nucleus.cpp \
     40 	Reactor/Routine.cpp \
     41 	Reactor/RoutineManager.cpp
     42 
     43 COMMON_SRC_FILES += \
     44 	Renderer/Blitter.cpp \
     45 	Renderer/Clipper.cpp \
     46 	Renderer/Color.cpp \
     47 	Renderer/Context.cpp \
     48 	Renderer/ETC_Decoder.cpp \
     49 	Renderer/Matrix.cpp \
     50 	Renderer/PixelProcessor.cpp \
     51 	Renderer/Plane.cpp \
     52 	Renderer/Point.cpp \
     53 	Renderer/QuadRasterizer.cpp \
     54 	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 
     62 COMMON_SRC_FILES += \
     63 	Shader/Constants.cpp \
     64 	Shader/PixelPipeline.cpp \
     65 	Shader/PixelProgram.cpp \
     66 	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 
     77 COMMON_SRC_FILES += \
     78 	OpenGL/common/Image.cpp \
     79 	OpenGL/common/Object.cpp \
     80 	OpenGL/common/MatrixStack.cpp \
     81 
     82 COMMON_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
     93 
     94 ifneq ($(filter gce gce% calypso, $(TARGET_DEVICE)),)
     95 COMMON_CFLAGS += \
     96 	-DTAG_JIT_CODE_MEMORY
     97 endif
     98 
     99 ifneq (16,${PLATFORM_SDK_VERSION})
    100 COMMON_CFLAGS += -Xclang -fuse-init-array
    101 else
    102 COMMON_CFLAGS += -D__STDC_INT64__
    103 endif
    104 
    105 include $(CLEAR_VARS)
    106 LOCAL_CLANG := true
    107 LOCAL_MODULE := swiftshader_top_release
    108 LOCAL_MODULE_TAGS := optional
    109 LOCAL_SRC_FILES := $(COMMON_SRC_FILES)
    110 LOCAL_CFLAGS := $(COMMON_CFLAGS) -fomit-frame-pointer -ffunction-sections -fdata-sections -DANGLE_DISABLE_TRACE
    111 LOCAL_C_INCLUDES := $(COMMON_C_INCLUDES)
    112 include $(BUILD_STATIC_LIBRARY)
    113 
    114 include $(CLEAR_VARS)
    115 LOCAL_CLANG := true
    116 LOCAL_MODULE := swiftshader_top_debug
    117 LOCAL_MODULE_TAGS := optional
    118 LOCAL_SRC_FILES := $(COMMON_SRC_FILES)
    119 LOCAL_CFLAGS := $(COMMON_CFLAGS) -UNDEBUG -g -O0 -DDEFAULT_THREAD_COUNT=1
    120 LOCAL_C_INCLUDES := $(COMMON_C_INCLUDES)
    121 include $(BUILD_STATIC_LIBRARY)
    122 
    123 include $(call all-makefiles-under,$(LOCAL_PATH))
    124