Skip to content

Commit

Permalink
Makefile: don't hardcode the SDK API version
Browse files Browse the repository at this point in the history
The target architecture is already fetched from the device.
Therefore, the SDK API version can be dynamically fetched as
well.
  • Loading branch information
toxeus committed Dec 30, 2016
1 parent d794acf commit 0378784
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@

ARCH := $(shell adb shell getprop ro.product.cpu.abi)
SDK_VERSION := $(shell adb shell getprop ro.build.version.sdk)

all: build

build:
ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=./Android.mk APP_PLATFORM=android-16
ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=./Android.mk APP_PLATFORM=android-$(SDK_VERSION)

push: build
adb push libs/$(ARCH)/dirtycow /data/local/tmp/dcow
Expand Down

0 comments on commit 0378784

Please sign in to comment.