LOCAL_PATH := $(call my-dir)
LOCAL_SHORT_COMMANDS := true
include $(CLEAR_VARS)
LOCAL_MODULE    := zlib
LOCAL_SRC_FILES := zlib/$(TARGET_ARCH_ABI)/libzlib.a
include $(PREBUILT_STATIC_LIBRARY)


include $(CLEAR_VARS)
LOCAL_MODULE    := png
LOCAL_SRC_FILES := png/$(TARGET_ARCH_ABI)/libpng1617.a
include $(PREBUILT_STATIC_LIBRARY)

include $(CLEAR_VARS)
LOCAL_STATIC_LIBRARIES := zlib png
LOCAL_MODULE := Hero
LOCAL_MODULE_FILENAME := libHero
LOCAL_SRC_FILES :=  ANIMHashName.cpp                        \
                    AABB.cpp                                \
                    ACT.cpp                                 \
                    AndroidApp.cpp                          \
                    CAnimLib.cpp                            \
                    CAnimManager.cpp                        \
                    CBall.cpp                               \
                    CBallProj.cpp                           \
                    CBallShader.cpp                         \
                    CBlitter.cpp                            \
                    CBlurVShader.cpp                        \
                    CCallbackCriticalSection.cpp            \
                    CCircle2dShader.cpp                     \
                    CColourMulti2dShader.cpp                \
                    CCompatibleRenderPassDescription.cpp    \
                    CCrowdCardShader.cpp                    \
                    CCrowdFlagShader.cpp                    \
                    CCrowdNewShader.cpp                     \
                    CCurrency.cpp                           \
                    CCustomTextEntry.cpp                    \
                    CCustomTextInfo.cpp                     \
                    CDataBase.cpp                           \
                    CDatabaseEntry.cpp                      \
                    CDebugDepthShader.cpp                   \
                    CDeviceReimbursement.cpp                \
                    CDOFCombineShader.cpp                   \
                    CDOFShrinkShader.cpp                    \
                    CDressingRoomShader.cpp                 \
                    CDynamicAABBTree.cpp                    \
                    CEasing.cpp                             \
                    CFE.cpp                                 \
                    CFE3DPlayer.cpp                         \
                    CFEEffects.cpp                          \
                    CFEHeroScene.cpp                        \
                    CFEImages.cpp                           \
                    CFEKeyboard.cpp                         \
                    CFESAndroidGraphics.cpp                 \
                    CFESChooseHero.cpp                      \
                    CFESChooseSideHero.cpp                  \
                    CFESCredits.cpp                         \
                    CFEScreen.cpp                           \
                    CFESEditPlayer.cpp                      \
                    CFESGame.cpp                            \
                    CFESIntro.cpp                           \
                    CFESLevelSelect.cpp                     \
                    CFESMainMenu.cpp                        \
                    CFESOptions.cpp                         \
                    CFESPauseMenu.cpp                       \
                    CFESPlayerName.cpp                      \
                    CFESShop.cpp                            \
                    CFESTemplate.cpp                        \
                    CFESTitle.cpp                           \
                    CFreeHUD.cpp                            \
                    CFTT2d_Shader.cpp                       \
                    CFTT2D_TexturedVert.cpp                 \
                    CFTT2D_TextureUV.cpp                    \
                    CFTT3dGenShader.cpp                     \
                    CFTT_FTMLoader.cpp                      \
                    CFTTAABB32.cpp                          \
                    CFTTAndroidAppCInterface.cpp            \
                    CFTTAndroidChartboost.cpp               \
                    CFTTAndroidDevice.cpp                   \
                    CFTTAndroidFBInterstitials.cpp          \
                    CFTTAndroidGraphicsSettings.cpp         \
                    CFTTAndroidKeychainAccess.cpp           \
                    CFTTAnim.cpp                            \
                    CFTTAnimBlend.cpp                       \
                    CFTTAsyncEvent.cpp                      \
                    CFTTAudio.cpp                           \
                    CFTTAudio_Bank.cpp                      \
                    CFTTAudio_Patch.cpp                     \
                    CFTTAudio_SoundPlayer.cpp               \
                    CFTTAudio_StreamHandler.cpp             \
                    CFTTAWSKinesisFirehose.cpp              \
                    CFTTBatchCache.cpp                      \
                    CFTTBatchCacheHashTable.cpp             \
                    CFTTBatchModelBin.cpp                   \
                    CFTTBatchModelManager.cpp               \
                    CFTTBMMMatrixCache.cpp                  \
                    CFTTCamera.cpp                          \
                    CFTTChartboost.cpp                      \
                    CFTTCircularBuffer.cpp                  \
                    CFTTClearSettings.cpp                   \
                    CFTTColour.cpp                          \
                    CFTTCone32.cpp                          \
                    CFTTConvex.cpp                          \
                    CFTTCube2DShader.cpp                    \
                    CFTTCubemapShader.cpp                   \
                    CFTTDateTimeUtils.cpp                   \
                    CFTTDevice.cpp                          \
                    CFTTDisplayAchievements.cpp             \
                    CFTTFBInterstitials.cpp                 \
                    CFTTFile.cpp                            \
                    CFTTFile_Android.cpp                    \
                    CFTTFile_AndroidDocs.cpp                \
                    CFTTFile_AndroidMemMap.cpp              \
                    CFTTFile_AsyncImmediate.cpp             \
                    CFTTFile_AsyncQueue.cpp                 \
                    CFTTFile_Buffered.cpp                   \
                    CFTTFile_PAK.cpp                        \
                    CFTTFile_RAM.cpp                        \
                    CFTTFile_ROM.cpp                        \
                    CFTTFile_ZLib.cpp                       \
                    CFTTFileIterator.cpp                    \
                    CFTTFileIterator_Android.cpp            \
                    CFTTFileIterator_PAK.cpp                \
                    CFTTFileSystem.cpp                      \
                    CFTTFileSystem_Android.cpp              \
                    CFTTFileSystem_APKX.cpp                 \
                    CFTTFileSystem_PAK.cpp                  \
                    CFTTFont2D.cpp                          \
                    CFTTFontSDFShader.cpp                   \
                    CFTTFrustum32.cpp                       \
                    CFTTGLES2Wrapper.cpp                    \
                    CFTTGraph.cpp                           \
                    CFTTGraphicsBufferOGLES.cpp             \
                    CFTTGraphicsDevice.cpp                  \
                    CFTTGraphicsDeviceOGLES.cpp             \
                    CFTTGraphicsDeviceOGLES3.cpp            \
                    CFTTJob.cpp                             \
                    CFTTJobList.cpp                         \
                    CFTTJobQueue.cpp                        \
                    CFTTJson.cpp                            \
                    CFTTJsonMemWrapper.cpp                  \
                    CFTTJsonReader.cpp                      \
                    CFTTJSONReaderNode.cpp                  \
                    CFTTLangDatabase.cpp                    \
                    CFTTLocalNotification.cpp               \
                    CFTTMaterial.cpp                        \
                    CFTTMaterialManager.cpp                 \
                    CFTTMatrix32.cpp                        \
                    CFTTMatSetupData.cpp                    \
                    CFTTMem.cpp                             \
                    CFTTMemPool_Resizing.cpp                \
                    CFTTMemPool_Resizing_Node.cpp           \
                    CFTTMemPool_Static.cpp                  \
                    CFTTMemPrivate.cpp                      \
                    CFTTModel.cpp                           \
                    CFTTMusicPlayer.cpp                     \
                    CFTTNativeDialog.cpp                    \
                    CFTTNavMesh.cpp                         \
                    CFTTPCapsule.cpp                        \
                    CFTTPhysics.cpp                         \
                    CFTTPlane32.cpp                         \
                    CFTTPObject.cpp                         \
                    CFTTPPBox.cpp                           \
                    CFTTPPCone.cpp                          \
                    CFTTPPCylinder.cpp                      \
                    CFTTPPPolyhedron.cpp                    \
                    CFTTPPrimitive.cpp                      \
                    CFTTPPSphere.cpp                        \
                    CFTTQuaternion32.cpp                    \
                    CFTTRandom.cpp                          \
                    CFTTRandomNumberGenerator.cpp           \
                    CFTTRandomNumberGeneratorThreadsafe.cpp \
                    CFTTRandomThreadsafe.cpp                \
                    CFTTRenderBuffer.cpp                    \
                    CFTTRenderBufferOGLES.cpp               \
                    CFTTRenderHelper.cpp                    \
                    CFTTRenderTarget.cpp                    \
                    CFTTRenderTargetOGLES.cpp               \
                    CFTTRenderToTexture.cpp                 \
                    CFTTRenderToTextureOGLES.cpp            \
                    CFTTSaveFile.cpp                        \
                    CFTTSerialize.cpp                       \
                    CFTTServerTime.cpp                      \
                    CFTTShaderBuiltInConstants.cpp          \
                    CFTTShaderProgram.cpp                   \
                    CFTTShaderProgramOGLES.cpp              \
                    CFTTSkinningTask.cpp                    \
                    CFTTSphere32.cpp                        \
                    CFTTSystemFont.cpp                      \
                    CFTTSystemFontCached.cpp                \
                    CFTTTexLoadOptions.cpp                  \
                    CFTTTexMan_TexInfo.cpp                  \
                    CFTTTexture.cpp                         \
                    CFTTTextureAtlas.cpp                    \
                    CFTTTextureCache.cpp                    \
                    CFTTTextureData.cpp                     \
                    CFTTTextureManager.cpp                  \
                    CFTTTextureOGLES.cpp                    \
                    CFTTTextureWriter.cpp                   \
                    CFTTTextureWriterDropMip.cpp            \
                    CFTTTime.cpp                            \
                    CFTTUberShader.cpp                      \
                    CFTTUberShaderBlendMode.cpp             \
                    CFTTVector32.cpp                        \
                    CFTTVector32x4.cpp                      \
                    CFTTXmlMemWrapper.cpp                   \
                    CFTTXmlReader.cpp                       \
                    CFTTXmlReaderNode.cpp                   \
                    CFTTXmlReaderWriter.cpp                 \
                    CFTTXmlWriter.cpp                       \
                    CFTTXmlWriterNode.cpp                   \
                    CGameFeats.cpp                          \
                    CGameLoop.cpp                           \
                    CGameSettings.cpp                       \
                    CGaussianNewShader.cpp                  \
                    CGaussianShader.cpp                     \
                    CGfxAdboard.cpp                         \
                    CGfxCharacter.cpp                       \
                    CGfxCloth.cpp                           \
                    CGfxCornerFlag.cpp                      \
                    TCrowdMember.cpp                        \
                    CGfxCrowd.cpp                           \
                    CGfxCrowdCardGroup.cpp                  \
                    CGfxCrowdFlagPhysics.cpp                \
                    CGfxCrowdFlagRender.cpp                 \
                    CGfxDynNormMap.cpp                      \
                    CGfxEnv.cpp                             \
                    CGfxEnvironmentMap.cpp                  \
                    CGfxEnvMapRenderer.cpp                  \
                    CGfxFakePlayer.cpp                      \
                    CGFXFlag.cpp                            \
                    CGfxFloodLights.cpp                     \
                    CGFXFX.cpp                              \
                    CGfxGlareManager.cpp                    \
                    CGfxGravel.cpp                          \
                    CGfxGroundShadow.cpp                    \
                    CGfxIngameRenderer.cpp                  \
                    CGfxKits.cpp                            \
                    CGFXLensFlare.cpp                       \
                    CGfxPitch.cpp                           \
                    CGfxPitchLinePatch.cpp                  \
                    CGfxPitchLines.cpp                      \
                    CGfxPlayer.cpp                          \
                    CGfxPlinth.cpp                          \
                    CGfxPodium.cpp                          \
                    CGfxPostProcess.cpp                     \
                    CGfxPostProcessRenderer.cpp             \
                    CGfxPrecipitation.cpp                   \
                    CGfxProp.cpp                            \
                    CGfxShadow.cpp                          \
                    CGfxShadowMap.cpp                       \
                    CGfxShadowMapManager.cpp                \
                    CGfxShadowMapPSSM.cpp                   \
                    CGfxShadowMapUniform.cpp                \
                    CGFXSHADOWStaticShadow.cpp              \
                    CGfxSky.cpp                             \
                    CGFXSpec.cpp                            \
                    CGfxStadiumProps.cpp                    \
                    CGfxStaticShirt.cpp                     \
                    CGfxSubBoard.cpp                        \
                    CGfxTrophy.cpp                          \
                    CGlareOccShader.cpp                     \
                    CGlareRadialShader.cpp                  \
                    CGoalNetShader.cpp                      \
                    CGraphicsRewindEffect.cpp               \
                    CGraphicsTexLoadOptions.cpp             \
                    CGravelShader.cpp                       \
                    CInFlightCredits.cpp                    \
                    CIntegrateBRDFShader.cpp                \
                    CKitGenShader.cpp                       \
                    CLegacyLitShader.cpp                    \
                    CLightingLUTState.cpp                   \
                    CLinearDepthShader.cpp                  \
                    CLoadingScreen.cpp                      \
                    CMatchSetup.cpp                         \
                    CMessageBox.cpp                         \
                    CMessageBoxHandler.cpp                  \
                    CMessageBoxWithDownloadTile.cpp         \
                    CModelMan_ModelInfo.cpp                 \
                    CModelManager.cpp                       \
                    CMusicPlayerDestroyParams.cpp           \
                    CMyProfile.cpp                          \
                    CPackedCombineShader.cpp                \
                    CPartAdditive2dShader.cpp               \
                    CPBRLighting.cpp                        \
                    CPerfTest2dShader.cpp                   \
                    CPhotoPostShader.cpp                    \
                    CPitchCircleShader.cpp                  \
                    CPitchPostShader.cpp                    \
                    CPitchShader.cpp                        \
                    CPlayer.cpp                             \
                    CPlayerManager.cpp                      \
                    CPlayerShader.cpp                       \
                    CPolaroid2dShader.cpp                   \
                    CPoseAnalyzer.cpp                       \
                    CPPBlendShader.cpp                      \
                    CPPBlitShader.cpp                       \
                    CPrecipitationShader.cpp                \
                    CProfileFeats.cpp                       \
                    CProfileStats.cpp                       \
                    CRawDiffuseShader.cpp                   \
                    CRawEnvShader.cpp                       \
                    CRawSpecularShader.cpp                  \
                    CReplay.cpp                             \
                    CResourceManager.cpp                    \
                    CrowdSortB.cpp                          \
                    CrowdSortD.cpp                          \
                    CrowdTextureCreationData.cpp            \
                    CRSplineF.cpp                           \
                    CRSplinePieceF.cpp                      \
                    CSDFFontVisFBShader.cpp                 \
                    CSeason.cpp                             \
                    CShaderSetup.cpp                        \
                    CShadowBatchShader.cpp                  \
                    CShadowMapShader.cpp                    \
                    CShadowRenderShader.cpp                 \
                    CSheen2dShader.cpp                      \
                    CSideStoryProfile.cpp                   \
                    CSpringSlider.cpp                       \
                    CStadiumShader.cpp                      \
                    CStage.cpp                              \
                    CStageManager.cpp                       \
                    CStoryCore.cpp                          \
                    CStoryHUD.cpp                           \
                    CStoryProfile.cpp                       \
                    CStoryProfileStages.cpp                 \
                    CStoryTutorial.cpp                      \
                    CTexLoadHelper.cpp                      \
                    CTouchStateInternal.cpp                 \
                    Cubic.cpp                               \
                    CUIMsgContract.cpp                      \
                    CUIMsgNewUpdate.cpp                     \
                    CUIMsgPolaroid.cpp                      \
                    CUIMsgProfile.cpp                       \
                    CUIMsgPromotion.cpp                     \
                    CUIMsgPromotionItem.cpp                 \
                    CUIMsgRewind.cpp                        \
                    CUIMsgShirt.cpp                         \
                    CUIMsgShop.cpp                          \
                    CUIMsgShopButton.cpp                    \
                    CUIMsgShopItem.cpp                      \
                    CUIMsgSideStory.cpp                     \
                    CUITile.cpp                             \
                    CUITileActions.cpp                      \
                    CUITileBasic.cpp                        \
                    CUITileButton.cpp                       \
                    CUITileButtonExpander.cpp               \
                    CUITileCredits.cpp                      \
                    CUITileCrossPromotion.cpp               \
                    CUITileEnergy.cpp                       \
                    CUITileGoldenBoot.cpp                   \
                    CUITileGoldenBootPurchase.cpp           \
                    CUITileHeadShot.cpp                     \
                    CUITileHUDText.cpp                      \
                    CUITileItemSelector.cpp                 \
                    CUITileLevel.cpp                        \
                    CUITileLocked.cpp                       \
                    CUITileManager.cpp                      \
                    CUITileNationality.cpp                  \
                    CUITileNationalityLarge.cpp             \
                    CUITileNewspaper.cpp                    \
                    CUITileNPMenu.cpp                       \
                    CUITileNumberSelector.cpp               \
                    CUITileOptionLang.cpp                   \
                    CUITileOptionOnOff.cpp                  \
                    CUITileOptionScale.cpp                  \
                    CUITileOptionSpinBox.cpp                \
                    CUITilePageBG.cpp                       \
                    CUITilePauseButton.cpp                  \
                    CUITileScoreboard.cpp                   \
                    CUITileScroller.cpp                     \
                    CUITileSideClock.cpp                    \
                    CUITileSideClockLS.cpp                  \
                    CUITileSideStory.cpp                    \
                    CUITileSideStoryTicket.cpp              \
                    CUITileSkinColour.cpp                   \
                    CUITileStars.cpp                        \
                    CUITileStarsLS.cpp                      \
                    CUITileSticker.cpp                      \
                    CUITileTextSelector.cpp                 \
                    CUITileUser.cpp                         \
                    CUnlockables.cpp                        \
                    CVHSEffectsShader.cpp                   \
                    CXmlUtil.cpp                            \
                    DatagramHeaderFormat.cpp                \
                    FE2D.cpp                                \
                    FE_Language.cpp                         \
                    FEBU.cpp                                \
                    FESU.cpp                                \
                    FETU.cpp                                \
                    FEU.cpp                                 \
                    FileHandler.cpp                         \
                    FlagSort.cpp                            \
                    FREE.cpp                                \
                    FTT2D.cpp                               \
                    FTT3D.cpp                               \
                    FTTAtlasGenerator.cpp                   \
                    FTTColour.cpp                           \
                    FTTFILE.cpp                             \
                    FTTFont.cpp                             \
                    FTTGenerateKeyFrame.cpp                 \
                    FTTGraphics.cpp                         \
                    FTTInput.cpp                            \
                    FTTJNI.cpp                              \
                    FTTMutex.cpp                            \
                    FTTSemaphore.cpp                        \
                    FTTThread.cpp                           \
                    GFXBALL.cpp                             \
                    GFXCAMERA.cpp                           \
                    GFXFADE.cpp                             \
                    GFXHUD.cpp                              \
                    GFXNET.cpp                              \
                    GFXRENDER.cpp                           \
                    GFXSCENE.cpp                            \
                    GL.cpp                                  \
                    GPA.cpp                                 \
                    GM.cpp                                  \
                    GU.cpp                                  \
                    global_func.cpp                         \
                    HalfConverter.cpp                       \
                    HeightSort.cpp                          \
                    IAP.cpp                                 \
                    LOCstring.cpp                           \
                    memctrl.cpp                             \
                    PlatformMesh.cpp                        \
                    Matrix.cpp                              \
                    SAT.cpp                                 \
                    SETUP.cpp                               \
                    SNDFE.cpp                               \
                    SNDGAME.cpp                             \
                    Soccer.cpp                              \
                    STORY.cpp                               \
                    str_conv.cpp                            \
                    SYS.cpp                                 \
                    SYSCORE.cpp                             \
                    TAABB.cpp                               \
                    TAudioOptions.cpp                       \
                    TFTTCacheLookup.cpp                     \
                    TFTTCacheBucket.cpp                     \
                    TFTTFace.cpp                            \
                    TGame.cpp                               \
                    TNMVert.cpp                             \
                    TMetricsOptions.cpp                     \
                    TPitchLineCircle.cpp                    \
                    TPitchLineGen.cpp                       \
                    TPitchLineRect.cpp                      \
                    TPlayerInfoLight.cpp                    \
                    TStorySeason.cpp                        \
                    TPhoto.cpp                              \
                    TStageOperation.cpp                     \
                    Util.cpp                                \
                    XCTRL.cpp                               \
                    XDBG.cpp                                \
                    XMATH.cpp                               \
                    XML.cpp                                 \
                    xsnprintf.cpp                           \
                    XSYS.cpp                                \
                    md5.cpp                                 \
                    gl3stub.c                               \
                    GetAttribute.cpp                        \
                    sub.cpp                                     \
                    TGfxCrowdState.cpp

LOCAL_ARM_NEON := true
LOCAL_CFLAGS   += -fshort-wchar -fvisibility=default  -fomit-frame-pointer -fno-stack-protector
LOCAL_CPPFLAGS += -Wno-switch
LOCAL_LDFLAGS  += -fPIC
LOCAL_LDLIBS   += -Wl,--no-wchar-size-warning -Wundefined-inline -llog -landroid -lEGL -lGLESv2 -lGLESv3
LOCAL_STATIC_LIBRARIES += cpufeatures
include $(BUILD_SHARED_LIBRARY)

$(call import-module,android/cpufeatures)

# -L$(SYSROOT)/usr/lib -fno-stack-protector -fomit-frame-pointer
# -nostdlib  -fno-builtin
# CFTTRenderBufferVulkan.cpp
# CFTTGraphicsDeviceVulkan.cpp
# CFTTGraphicsBufferVulkan.cpp
# CFTTShaderProgramVulkan.cpp
# CFTTRenderToTextureVulkan.cpp
# CFTTRenderTargetVulkan.cpp
# CFTTVulkanCommandPool.cpp
# CFTTVulkanMemory.cpp
# CFTTVulkanPipelineManager.cpp
# CFTTVulkanPipelineState.cpp
# CFTTVulkanProjectSetup.cpp
# CFTTVulkanSetup.cpp
# CFTTVulkanStreamAllocator.cpp
# CFTTTextureVulkan.cpp
# CMyVulkanProjectSetup.cpp
# FTTVulkanChunkAllocator.cpp
# FTTVulkanMemoryChunk.cpp
# include $(BUILD_SHARED_LIBRARY)