mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[build/simulator/apple] Share code
This commit is contained in:
@@ -35,7 +35,7 @@ SIMULATOR_ICON_SIZES = 20x20 29x29 40x40 40x40 40x40 58x58 58x58 60x60 76x76 \
|
||||
SIMULATOR_ASSETS_PATH = $(BUILD_DIR)/app/assets/Assets.xcassets
|
||||
SIMULATOR_ICONSET = $(SIMULATOR_ASSETS_PATH)/AppIcon.appiconset
|
||||
|
||||
include ion/src/simulator/shared/apple/app.mak
|
||||
include ion/src/simulator/shared/apple/helpers.mak
|
||||
|
||||
$(call simulator_app_plist,Info.plist): ion/src/simulator/ios/Info.plist $(call simulator_app_resource,Assets.car)
|
||||
$(call rule_label,PLUTIL)
|
||||
@@ -87,19 +87,7 @@ $(call simulator_app_resource,Assets.car): $(SIMULATOR_ICONSET)/Contents.json |
|
||||
simulator_app_deps += $(call simulator_app_resource,Assets.car)
|
||||
simulator_app_deps += $(call simulator_app_resource,launch.storyboardc)
|
||||
|
||||
.PRECIOUS: $(simulator_app_deps)
|
||||
|
||||
.PRECIOUS: $(BUILD_DIR)/%.app
|
||||
.PHONY: $(BUILD_DIR)/%.app
|
||||
$(BUILD_DIR)/%.app: $(simulator_app_deps)
|
||||
|
||||
$(BUILD_DIR)/%.ipa: $(BUILD_DIR)/%.app
|
||||
ifdef IOS_PROVISIONNING_PROFILE
|
||||
$(call rule_label,SIGN)
|
||||
$(Q) codesign --force --entitlements $(BUILD_DIR)/app/entitlements.plist --sign "Apple Distribution: NumWorks" $(BUILD_DIR)/$*.app
|
||||
endif
|
||||
$(call rule_label,ZIP)
|
||||
$(Q) cd $(dir $@) ; zip -qr9 $(notdir $@) $*.app
|
||||
include ion/src/simulator/shared/apple/targets.mak
|
||||
|
||||
DEFAULT = epsilon.ipa
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ SIMULATOR_APP_RESOURCE_PATH = Contents/Resources/
|
||||
SIMULATOR_APP_PLIST_PATH = Contents/
|
||||
SIMULATOR_ICONSET = $(BUILD_DIR)/app/assets/app.iconset
|
||||
|
||||
include ion/src/simulator/shared/apple/app.mak
|
||||
include ion/src/simulator/shared/apple/helpers.mak
|
||||
|
||||
$(call simulator_app_plist,Info.plist): ion/src/simulator/macos/Info.plist | $$(@D)/.
|
||||
$(call rule_label,PLUTIL)
|
||||
@@ -41,14 +41,7 @@ $(call simulator_app_resource,app.icns): $(SIMULATOR_ICONS) | $$(@D)/.
|
||||
|
||||
simulator_app_deps += $(call simulator_app_resource,app.icns)
|
||||
|
||||
.PRECIOUS: $(simulator_app_deps)
|
||||
|
||||
$(BUILD_DIR)/%.app: $(simulator_app_deps)
|
||||
$(Q) echo "DONE"
|
||||
|
||||
#.PHONY: Epsilon.app Epsilon.official.app
|
||||
#Epsilon.app: $(simulator_app_deps_unofficial)
|
||||
#Epsilon.official.app: $(simulator_app_deps_official)
|
||||
include ion/src/simulator/shared/apple/targets.mak
|
||||
|
||||
DEFAULT = epsilon.app
|
||||
|
||||
|
||||
@@ -10,16 +10,6 @@ simulator_app_plist = $(SIMULATOR_APP_PATH)/%.app/$(SIMULATOR_APP_PLIST_PATH)$(1
|
||||
|
||||
# Epsilon binary
|
||||
|
||||
.PHONY: force_remake
|
||||
define rule_for_arch_executable
|
||||
.PRECIOUS: $$(BUILD_DIR)/$(1)/%.bin
|
||||
$$(BUILD_DIR)/$(1)/%.bin: force_remake
|
||||
$(Q) echo "MAKE ARCH=$(1)"
|
||||
$(Q) $$(MAKE) ARCH=$(1) --silent $$*.bin
|
||||
endef
|
||||
|
||||
$(foreach ARCH,$(ARCHS),$(eval $(call rule_for_arch_executable,$(ARCH))))
|
||||
|
||||
$(simulator_app_binary): $(foreach arch,$(ARCHS),$(BUILD_DIR)/$(arch)/%.bin) | $$(@D)/.
|
||||
$(call rule_label,LIPO)
|
||||
$(Q) $(LIPO) -create $^ -output $@
|
||||
16
ion/src/simulator/shared/apple/targets.mak
Normal file
16
ion/src/simulator/shared/apple/targets.mak
Normal file
@@ -0,0 +1,16 @@
|
||||
.PRECIOUS: $(simulator_app_deps)
|
||||
|
||||
# CAUTION: The empty line in this rule is important!
|
||||
# Indeed, rule without receipe serve a special purpose
|
||||
# https://www.gnu.org/software/make/manual/html_node/Canceling-Rules.html
|
||||
.PRECIOUS: $(BUILD_DIR)/%.app
|
||||
$(BUILD_DIR)/%.app: $(simulator_app_deps)
|
||||
|
||||
|
||||
$(BUILD_DIR)/%.ipa: $(BUILD_DIR)/%.app
|
||||
ifdef IOS_PROVISIONNING_PROFILE
|
||||
$(call rule_label,SIGN)
|
||||
$(Q) codesign --force --entitlements $(BUILD_DIR)/app/entitlements.plist --sign "Apple Distribution: NumWorks" $(BUILD_DIR)/$*.app
|
||||
endif
|
||||
$(call rule_label,ZIP)
|
||||
$(Q) cd $(dir $@) ; zip -qr9 $(notdir $@) $*.app
|
||||
Reference in New Issue
Block a user