Home | History | Annotate | Download | only in opengl
      1 # This is the top-level build file for the Android HW OpenGL ES emulation
      2 # in Android.
      3 #
      4 # You must define BUILD_EMULATOR_HOST_OPENGL to 'true' in your environment to
      5 # build the following files.
      6 #
      7 ifeq (true,$(BUILD_EMULATOR_HOST_OPENGL))
      8 
      9 # Top-level for all modules
     10 EMUGL_PATH := $(call my-dir)
     11 
     12 # Directory containing common headers used by several modules
     13 # This is always set to a module's LOCAL_C_INCLUDES
     14 # See the definition of emugl-begin-module in common.mk
     15 #
     16 EMUGL_COMMON_INCLUDES := \
     17     $(EMUGL_PATH)/host/include/libOpenglRender \
     18     $(EMUGL_PATH)/shared
     19 
     20 ifeq ($(BUILD_STANDALONE_EMULATOR),true)
     21 EMUGL_COMMON_INCLUDES := $(EMUGL_PATH)/host/libs/Translator/include
     22 endif
     23 
     24 ifeq ($(BUILD_STANDALONE_EMULATOR),true)
     25 EMUGL_BUILD_64BITS := $(strip $(EMULATOR_BUILD_64BITS))
     26 else
     27 EMUGL_BUILD_64BITS := true
     28 endif
     29 
     30 # common cflags used by several modules
     31 # This is always set to a module's LOCAL_CFLAGS
     32 # See the definition of emugl-begin-module in common.mk
     33 #
     34 EMUGL_COMMON_CFLAGS := -DWITH_GLES2
     35 
     36 # Define EMUGL_BUILD_DEBUG=1 in your environment to build a
     37 # debug version of the EmuGL host binaries.
     38 ifneq (,$(strip $(EMUGL_BUILD_DEBUG)))
     39 EMUGL_COMMON_CFLAGS += -O0 -g -DEMUGL_DEBUG=1
     40 endif
     41 
     42 # Uncomment the following line if you want to enable debug traces
     43 # in the GLES emulation libraries.
     44 # EMUGL_COMMON_CFLAGS += -DEMUGL_DEBUG=1
     45 
     46 # Include common definitions used by all the modules included later
     47 # in this build file. This contains the definition of all useful
     48 # emugl-xxxx functions.
     49 #
     50 include $(EMUGL_PATH)/common.mk
     51 
     52 # IMPORTANT: ORDER IS CRUCIAL HERE
     53 #
     54 # For the import/export feature to work properly, you must include
     55 # modules below in correct order. That is, if module B depends on
     56 # module A, then it must be included after module A below.
     57 #
     58 # This ensures that anything exported by module A will be correctly
     59 # be imported by module B when it is declared.
     60 #
     61 # Note that the build system will complain if you try to import a
     62 # module that hasn't been declared yet anyway.
     63 #
     64 
     65 # First, build the emugen host source-generation tool
     66 #
     67 # It will be used by other modules to generate wire protocol encode/decoder
     68 # source files (see all emugl-gen-decoder/encoder in common.mk)
     69 #
     70 include $(EMUGL_PATH)/host/tools/emugen/Android.mk
     71 
     72 # Required by our units test.
     73 include $(EMUGL_PATH)/googletest.mk
     74 
     75 include $(EMUGL_PATH)/shared/emugl/common/Android.mk
     76 include $(EMUGL_PATH)/shared/OpenglOsUtils/Android.mk
     77 include $(EMUGL_PATH)/shared/OpenglCodecCommon/Android.mk
     78 
     79 # Host static libraries
     80 include $(EMUGL_PATH)/host/libs/GLESv1_dec/Android.mk
     81 include $(EMUGL_PATH)/host/libs/GLESv2_dec/Android.mk
     82 include $(EMUGL_PATH)/host/libs/renderControl_dec/Android.mk
     83 include $(EMUGL_PATH)/tests/ut_rendercontrol_dec/Android.mk
     84 include $(EMUGL_PATH)/host/libs/Translator/GLcommon/Android.mk
     85 include $(EMUGL_PATH)/host/libs/Translator/GLES_CM/Android.mk
     86 include $(EMUGL_PATH)/host/libs/Translator/GLES_V2/Android.mk
     87 include $(EMUGL_PATH)/host/libs/Translator/EGL/Android.mk
     88 
     89 # Required to declare SDL-related flags for some host tests.
     90 include $(EMUGL_PATH)/sdl.mk
     91 
     92 # Host shared libraries
     93 include $(EMUGL_PATH)/host/libs/libOpenglRender/Android.mk
     94 
     95 # Host executables
     96 include $(EMUGL_PATH)/host/renderer/Android.mk
     97 
     98 # Host unit-test for the renderer.
     99 
    100 include $(EMUGL_PATH)/tests/translator_tests/MacCommon/Android.mk
    101 include $(EMUGL_PATH)/tests/translator_tests/GLES_CM/Android.mk
    102 include $(EMUGL_PATH)/tests/translator_tests/GLES_V2/Android.mk
    103 
    104 endif # BUILD_EMULATOR_HOST_OPENGL == true
    105