Created
March 5, 2015 14:36
-
-
Save Nimrodda/c9bdb9217dffe577af79 to your computer and use it in GitHub Desktop.
Sample Android.mk with prebuilt static library
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) | |
# hatch library | |
include $(CLEAR_VARS) | |
LOCAL_MODULE := prebuilt-static-lib | |
LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libprebuilt-static-lib.a | |
# The header files should be located in the following dir relative to jni/ dir | |
LOCAL_EXPORT_C_INCLUDES := include/ | |
include $(PREBUILT_STATIC_LIBRARY) | |
# main | |
include $(CLEAR_VARS) | |
LOCAL_MODULE := my-jni | |
# List of source files *.cpp files | |
LOCAL_SRC_FILES := my.cpp bla.cpp baba.cpp | |
# Using android logging library | |
LOCAL_LDLIBS := -llog | |
# Define pre-processor macro for log levels | |
LOCAL_CFLAGS := -DLOG_LEVEL=LOG_VERBOSE | |
# Link with the prebuilt module that we defined and the top part of this file | |
LOCAL_STATIC_LIBRARIES := prebuilt-static-lib | |
include $(BUILD_SHARED_LIBRARY) |
The definition of $(PREBUILT_STATIC_LIBRARY) has been removed, do not use
I'm an Android beginner. How does the whole gradle module for a prebuild lib has to looks like ?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
great snippet