Add Makefile recipe for debug build
Expose commands to build the application in debug mode.
This commit is contained in:
parent
71c2bfdd22
commit
33062ffb8c
1 changed files with 14 additions and 1 deletions
15
Makefile
15
Makefile
|
@ -3,6 +3,7 @@
|
||||||
GRADLE ?= ./gradlew
|
GRADLE ?= ./gradlew
|
||||||
|
|
||||||
APP_BUILD_DIR := app-build
|
APP_BUILD_DIR := app-build
|
||||||
|
APP_BUILD_DEBUG_DIR := app-build-debug
|
||||||
DIST := dist
|
DIST := dist
|
||||||
TARGET_DIR := scrcpy
|
TARGET_DIR := scrcpy
|
||||||
|
|
||||||
|
@ -16,7 +17,19 @@ release: clean dist-zip sums
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(GRADLE) 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:
|
build-app:
|
||||||
[ -d "$(APP_BUILD_DIR)" ] || ( mkdir "$(APP_BUILD_DIR)" && meson app "$(APP_BUILD_DIR)" --buildtype release )
|
[ -d "$(APP_BUILD_DIR)" ] || ( mkdir "$(APP_BUILD_DIR)" && meson app "$(APP_BUILD_DIR)" --buildtype release )
|
||||||
|
|
Loading…
Reference in a new issue