Skip to content

Instantly share code, notes, and snippets.

@sunwicked
Last active October 12, 2016 09:56
Show Gist options
  • Save sunwicked/3fc71e93dee93bd7ca3c76d82b70f704 to your computer and use it in GitHub Desktop.
Save sunwicked/3fc71e93dee93bd7ca3c76d82b70f704 to your computer and use it in GitHub Desktop.
Sample Android make file present inside packages>>apps>>yourapp>>your mk file Links : http://www.cprogramming.com/tutorial/makefiles.html // https://developer.android.com/ndk/guides/android_mk.html
LOCAL_PATH:= $(call my-dir)
# The macro function my-dir, provided by the build system, returns the path of the current directory
include $(CLEAR_VARS)
# The CLEAR_VARS variable points to a special GNU Makefile that clears many LOCAL_XXX variables for you,
# such as LOCAL_MODULE, LOCAL_SRC_FILES, and LOCAL_STATIC_LIBRARIES. Note that it does not clear LOCAL_PATH
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := CMParts
LOCAL_CERTIFICATE := platform
# The standard Android build uses four keys, all of which reside in build/target/product/security:
# testkey : Generic default key for packages that do not otherwise specify a key.
# platform : Test key for packages that are part of the core platform.
# shared : Test key for things that are shared in the home/contacts process.
# media : Test key for packages that are part of the media/download system.
include $(BUILD_PACKAGE)
# Use the folloing include to make our test apk.
include $(call all-makefiles-under,$(LOCAL_PATH))
@Prateeklabs108
Copy link

This tag is must for making it system apps

LOCAL_MODULE_TAGS := optional

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment