[build] Move %_run targets in the build dir

This commit is contained in:
Romain Goyet
2020-04-02 21:34:30 -04:00
committed by Ecco
parent ed7038262c
commit d4149b1a3d
4 changed files with 16 additions and 12 deletions

View File

@@ -1,3 +1,8 @@
ifndef ARCH
HANDY_TARGETS_EXTENSIONS += apk
endif
.PHONY: %_run
%_run: $(BUILD_DIR)/%.apk
$(call rule_label,ADB)
$(Q) adb install $<

View File

@@ -0,0 +1,10 @@
ifndef ARCH
HANDY_TARGETS_EXTENSIONS += apk
endif
ifeq ($(APPLE_PLATFORM),ios-simulator)
.PHONY: %_run
%_run: $(BUILD_DIR)/%.app
$(call rule_label,XCRUN)
$(Q) xcrun simctl install booted $^
endif

View File

@@ -71,15 +71,10 @@ apk_deps += $(addprefix $(BUILD_DIR)/app/res/,mipmap/ic_launcher.png mipmap-v26/
.PRECIOUS: $(apk_deps)
$(BUILD_DIR)/%.apk: $(apk_deps)
@echo "GRADLE ion/src/simulator/android/build.gradle"
$(call rule_label,GRADLE)
$(Q) ANDROID_HOME=$(ANDROID_HOME) EPSILON_VERSION=$(EPSILON_VERSION) BUILD_DIR=$(BUILD_DIR) EPSILON_VARIANT=$* ion/src/simulator/android/gradlew -b ion/src/simulator/android/build.gradle assembleRelease
$(Q) cp $(BUILD_DIR)/app/outputs/apk/release/android-release*.apk $@
DEFAULT = epsilon.apk
.PHONY: %_run
%_run: $(BUILD_DIR)/%.apk
@echo "ADB $*.apk"
$(Q) adb install $<
endif

View File

@@ -103,10 +103,4 @@ endif
DEFAULT = epsilon.ipa
ifeq ($(APPLE_PLATFORM),ios-simulator)
.PHONY: %_run
%_run: $(BUILD_DIR)/%.app
xcrun simctl install booted $^
endif
endif