<commit_before>.PHONY: default release clean build build-app build-server run dist dist-zip sums test

GRADLE ?= ./gradlew

APP_BUILD_DIR := app-build
APP_BUILD_DEBUG_DIR := app-build-debug
DIST := dist
TARGET_DIR := scrcpy

VERSION := $(shell git describe --tags --always)
TARGET := $(TARGET_DIR)-$(VERSION).zip

default:
	@echo 'You must specify a target. Try: make release'

release: clean dist-zip sums

clean:
	$(GRADLE) clean
	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 )
	ninja -C "$(APP_BUILD_DIR)"
<commit_msg>Enable sanitizer in debug builds<commit_after>.PHONY: default release clean build build-app build-server run dist dist-zip sums test

GRADLE ?= ./gradlew

APP_BUILD_DIR := app-build
APP_BUILD_DEBUG_DIR := app-build-debug
DIST := dist
TARGET_DIR := scrcpy

VERSION := $(shell git describe --tags --always)
TARGET := $(TARGET_DIR)-$(VERSION).zip

default:
	@echo 'You must specify a target. Try: make release'

release: clean dist-zip sums

clean:
	$(GRADLE) clean
	rm -rf "$(APP_BUILD_DIR)" "$(APP_BUILD_DEBUG_DIR)" "$(DIST)"

build-app-debug:
	[ -d "$(APP_BUILD_DEBUG_DIR)" ] || ( mkdir "$(APP_BUILD_DEBUG_DIR)" && \
		CFLAGS=-fsanitize=address,undefined 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 )
	ninja -C "$(APP_BUILD_DIR)"

{'fraction_non_alphanumeric': 0.15794349235757296, 'fraction_numerical': 0.0, 'mean_word_length': 5.084507042253521, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '27175', 'n_tokens_mistral': 815, 'n_tokens_neox': 767, 'n_words': 181}