Skip to content

Instantly share code, notes, and snippets.

@worblehat
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save worblehat/11056229 to your computer and use it in GitHub Desktop.
Save worblehat/11056229 to your computer and use it in GitHub Desktop.
Makefile for Android's build system to build libgit2.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := gpg-error
LOCAL_SRC_FILES := $(LOCAL_PATH)/lib/libgpg-error.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := crypto
LOCAL_SRC_FILES := $(LOCAL_PATH)/lib/libcrypto.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := ssl
LOCAL_SRC_FILES := $(LOCAL_PATH)/lib/libssl.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := ssh2
LOCAL_SRC_FILES := $(LOCAL_PATH)/lib/libssh2.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := git2
LOCAL_SRC_FILES := $(LOCAL_PATH)/lib/libgit2.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := com_example_hello_git_LibGit2
LOCAL_SRC_FILES := com_example_hello_git_LibGit2.c
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_STATIC_LIBRARIES := git2 ssh2 ssl crypto gpg-error
LOCAL_LDLIBS := -lz
include $(BUILD_SHARED_LIBRARY)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment