From 33062ffb8c19f745d5f7215478b48123ddd05bce Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Wed, 7 Feb 2018 11:47:10 +0100 Subject: [PATCH] Add Makefile recipe for debug build Expose commands to build the application in debug mode. --- Makefile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5edc098e..6098887b 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ GRADLE ?= ./gradlew APP_BUILD_DIR := app-build +APP_BUILD_DEBUG_DIR := app-build-debug DIST := dist TARGET_DIR := scrcpy @@ -16,7 +17,19 @@ release: clean dist-zip sums clean: $(GRADLE) clean - rm -rf "$(APP_BUILD_DIR)" "$(DIST)" + rm -rf "$(APP_BUILD_DIR)" "$(APP_BUILD_DEBUG_DIR)" "$(DIST)" + +build-app-debug: + [ -d "$(APP_BUILD_DEBUG_DIR)" ] || ( mkdir "$(APP_BUILD_DEBUG_DIR)" && meson app "$(APP_BUILD_DEBUG_DIR)" --buildtype debug ) + ninja -C "$(APP_BUILD_DEBUG_DIR)" + +build-server-debug: + $(GRADLE) assembleDebug + +build-debug: build-app-debug build-server-debug + +run-debug: + SCRCPY_SERVER_JAR=server/build/outputs/apk/debug/server-debug.apk $(APP_BUILD_DEBUG_DIR)/scrcpy $(ARGS) build-app: [ -d "$(APP_BUILD_DIR)" ] || ( mkdir "$(APP_BUILD_DIR)" && meson app "$(APP_BUILD_DIR)" --buildtype release )