-
-
Save dom96/d91f806b1808a997b4e6f4b6ddfce13f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOCAL_PATH := $(call my-dir) | |
# To build these I downloaded the openssl source code, followed NOTES.ANDROID. | |
# Also used the commands here to get rid of versions in .so: https://github.com/openssl/openssl/issues/3902 | |
# This tutorial was also somewhat useful: https://proandroiddev.com/tutorial-compile-openssl-to-1-1-1-for-android-application-87137968fee | |
# | |
# https://developer.android.com/ndk/guides/prebuilts#sa | |
include $(CLEAR_VARS) | |
LOCAL_MODULE := libssl | |
LOCAL_SRC_FILES := $(LOCAL_PATH)/dlls/$(TARGET_ARCH_ABI)/libssl.so | |
include $(PREBUILT_SHARED_LIBRARY) | |
include $(CLEAR_VARS) | |
LOCAL_MODULE := libcrypto | |
LOCAL_SRC_FILES := $(LOCAL_PATH)/dlls/$(TARGET_ARCH_ABI)/libcrypto.so | |
include $(PREBUILT_SHARED_LIBRARY) | |
include $(CLEAR_VARS) | |
LOCAL_MODULE := main | |
SDL_PATH := ../SDL | |
LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include $(LOCAL_PATH)/../SDL2_image/ | |
# https://developer.android.com/ndk/guides/android_mk#target_arch | |
FILE_LIST := $(wildcard $(LOCAL_PATH)/$(TARGET_ARCH)/*.c) | |
LOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%) | |
LOCAL_SHARED_LIBRARIES := SDL2 SDL2_image libssl libcrypto | |
# See https://developer.android.com/ndk/guides/stable_apis for some of the APIs we can link against. | |
LOCAL_LDLIBS := -v -lGLESv1_CM -lGLESv2 -llog | |
include $(BUILD_SHARED_LIBRARY) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment