Don't build evdev_reader for the non-root variant

This commit is contained in:
Cameron Gutman 2017-12-01 00:10:55 -08:00
parent 6264781539
commit 5c69f6716c
2 changed files with 34 additions and 18 deletions

View File

@ -23,11 +23,23 @@ android {
// version to devices running O on the Play Store. // version to devices running O on the Play Store.
maxSdkVersion 25 maxSdkVersion 25
externalNativeBuild {
ndkBuild {
arguments "PRODUCT_FLAVOR=root"
}
}
applicationId "com.limelight.root" applicationId "com.limelight.root"
dimension "root" dimension "root"
} }
nonRoot { nonRoot {
externalNativeBuild {
ndkBuild {
arguments "PRODUCT_FLAVOR=nonRoot"
}
}
applicationId "com.limelight" applicationId "com.limelight"
dimension "root" dimension "root"
} }

View File

@ -5,28 +5,32 @@ include $(call all-subdir-makefiles)
LOCAL_PATH := $(MY_LOCAL_PATH) LOCAL_PATH := $(MY_LOCAL_PATH)
include $(CLEAR_VARS) # Only build evdev_reader for the rooted APK flavor
LOCAL_MODULE := evdev_reader ifeq (root,$(PRODUCT_FLAVOR))
LOCAL_SRC_FILES := evdev_reader.c include $(CLEAR_VARS)
LOCAL_LDLIBS := -llog LOCAL_MODULE := evdev_reader
LOCAL_SRC_FILES := evdev_reader.c
LOCAL_LDLIBS := -llog
# This next portion of the makefile is mostly copied from build-executable.mk but # This next portion of the makefile is mostly copied from build-executable.mk but
# creates a binary with the libXXX.so form so the APK will install and drop # creates a binary with the libXXX.so form so the APK will install and drop
# the binary correctly. # the binary correctly.
LOCAL_BUILD_SCRIPT := BUILD_EXECUTABLE LOCAL_BUILD_SCRIPT := BUILD_EXECUTABLE
LOCAL_MAKEFILE := $(local-makefile) LOCAL_MAKEFILE := $(local-makefile)
$(call check-defined-LOCAL_MODULE,$(LOCAL_BUILD_SCRIPT)) $(call check-defined-LOCAL_MODULE,$(LOCAL_BUILD_SCRIPT))
$(call check-LOCAL_MODULE,$(LOCAL_MAKEFILE)) $(call check-LOCAL_MODULE,$(LOCAL_MAKEFILE))
$(call check-LOCAL_MODULE_FILENAME) $(call check-LOCAL_MODULE_FILENAME)
# we are building target objects # we are building target objects
my := TARGET_ my := TARGET_
$(call handle-module-filename,lib,$(TARGET_SONAME_EXTENSION)) $(call handle-module-filename,lib,$(TARGET_SONAME_EXTENSION))
$(call handle-module-built) $(call handle-module-built)
LOCAL_MODULE_CLASS := EXECUTABLE
include $(BUILD_SYSTEM)/build-module.mk
endif
LOCAL_MODULE_CLASS := EXECUTABLE
include $(BUILD_SYSTEM)/build-module.mk