[Git] Fix conflicts

This commit is contained in:
Quentin
2020-03-27 21:16:47 +01:00
22 changed files with 281 additions and 211 deletions

View File

@@ -21,9 +21,6 @@ OMEGA_THEME ?= omega_light
ifndef USE_LIBA
$(error platform.mak should define USE_LIBA)
endif
ifndef EXE
$(error platform.mak should define EXE, the extension for executables)
endif
include build/toolchain.$(TOOLCHAIN).mak
SFLAGS += -DDEBUG=$(DEBUG)

View File

@@ -1,8 +1,10 @@
TOOLCHAIN = android
EXE = so
EPSILON_TELEMETRY ?= 1
ifdef NDK_ABI
BUILD_DIR := $(BUILD_DIR)/$(NDK_ABI)
ARCHS = armeabi-v7a arm64-v8a x86 x86_64
ifdef ARCH
EXE = so
BUILD_DIR := $(BUILD_DIR)/$(ARCH)
endif

View File

@@ -1,8 +1,15 @@
# Define standard compilation rules
.PHONY: official_authorization
ifeq ($(ACCEPT_OFFICIAL_TOS),1)
official_authorization:
@echo "CAUTION: You are about to build an official NumWorks firmware. Distribution of such firmware by a third party is prohibited. Are you sure you want to proceed? Please type "yes" to confirm." && read ans && [ $${ans:-no} = yes ]
else
official_authorization:
@echo "CAUTION: You are trying to build an official NumWorks firmware."
@echo "Distribution of such firmware by a third party is prohibited."
@echo "Please set the ACCEPT_OFFICIAL_TOS environment variable to proceed."
@exit -1
endif
$(eval $(call rule_for, \
AS, %.o, %.s, \
@@ -31,6 +38,12 @@ $(eval $(call rule_for, \
$$(CXX) $$(CXXFLAGS) $$(SFLAGS) -c $$< -o $$@ \
))
$(eval $(call rule_for, \
CPP, %, %.inc, \
$$(CPP) -P $$< $$@ \
))
ifdef EXE
ifeq ($(OS),Windows_NT)
# Work around command-line length limit
# On Msys2 the max command line is 32 000 characters. Our standard LD command
@@ -47,6 +60,7 @@ $(eval $(call rule_for, \
$$(LD) $$^ $$(LDFLAGS) -o $$@ \
))
endif
endif
$(eval $(call rule_for, \
WINDRES, %.o, %.rc, \

View File

@@ -40,18 +40,16 @@ all_official:
$(Q) $(MAKE) MODEL=n0100 epsilon.official.onboarding.dfu
$(Q) cp output/release/device/n0100/epsilon.official.onboarding.dfu output/all_official/epsilon.device.n0100.dfu
$(Q) echo "BUILD_FIRMWARE SIMULATOR WEB ZIP"
$(Q) $(MAKE) DEBUG=0 PLATFORM=simulator TARGET=web clean
$(Q) $(call source_emsdk); $(MAKE) DEBUG=0 PLATFORM=simulator TARGET=web output/release/simulator/web/simulator.official.zip
$(Q) cp output/release/simulator/web/simulator.official.zip output/all_official/simulator.web.zip
$(Q) $(MAKE) PLATFORM=simulator TARGET=web clean
$(Q) $(call source_emsdk); $(MAKE) PLATFORM=simulator TARGET=web epsilon.official.zip
$(Q) cp output/release/simulator/web/epsilon.official.zip output/all_official/simulator.web.zip
$(Q) echo "BUILD_FIRMWARE SIMULATOR WEB JS"
$(Q) $(call source_emsdk); $(MAKE) DEBUG=0 PLATFORM=simulator TARGET=web epsilon.official.js
$(Q) $(call source_emsdk); $(MAKE) PLATFORM=simulator TARGET=web epsilon.official.js
$(Q) cp output/release/simulator/web/epsilon.official.js output/all_official/epsilon.js
$(Q) cp output/release/simulator/web/epsilon.official.js.mem output/all_official/epsilon.js.mem
$(Q) echo "BUILD_FIRMWARE SIMULATOR WEB PYTHON JS"
$(Q) $(MAKE) DEBUG=0 PLATFORM=simulator TARGET=web clean
$(Q) $(call source_emsdk); $(MAKE) DEBUG=0 PLATFORM=simulator TARGET=web EPSILON_GETOPT=1 EPSILON_APPS=code epsilon.official.js
$(Q) $(MAKE) PLATFORM=simulator TARGET=web clean
$(Q) $(call source_emsdk); $(MAKE) PLATFORM=simulator TARGET=web EPSILON_GETOPT=1 EPSILON_APPS=code epsilon.official.js
$(Q) cp output/release/simulator/web/epsilon.official.js output/all_official/epsilon.python.js
$(Q) cp output/release/simulator/web/epsilon.official.js.mem output/all_official/epsilon.python.js.mem
$(Q) echo "BUILD_FIRMWARE SIMULATOR ANDROID"
$(Q) $(MAKE) PLATFORM=simulator TARGET=android clean
$(Q) $(MAKE) PLATFORM=simulator TARGET=android epsilon.official.signed.apk

View File

@@ -0,0 +1,3 @@
ifndef ARCH
HANDY_TARGETS_EXTENSIONS += apk
endif

View File

@@ -1,6 +1,3 @@
$(BUILD_DIR)/epsilon%packed.js: EMSCRIPTEN_INIT_FILE = 0
HANDY_TARGETS_EXTENSIONS += zip
$(BUILD_DIR)/test.headless.js: EMSCRIPTEN_MODULARIZE = 0
$(BUILD_DIR)/epsilon.packed.js: $(call object_for,$(epsilon_src))
$(BUILD_DIR)/epsilon.official.packed.js: $(call object_for,$(epsilon_official_src))

View File

@@ -13,16 +13,16 @@ NDK_TOOLCHAIN_PATH = $(NDK_PATH)/toolchains/llvm/prebuilt/$(NDK_HOST_TAG)/bin
# is no toolchain for those archs on those API levels. Let's enforce NDK_VERSION
# at 21 for these archs, and 16 for the others.
ifeq ($(NDK_ABI),armeabi-v7a)
ifeq ($(ARCH),armeabi-v7a)
NDK_TARGET = armv7a-linux-androideabi
NDK_VERSION = 16
else ifeq ($(NDK_ABI),arm64-v8a)
else ifeq ($(ARCH),arm64-v8a)
NDK_TARGET = aarch64-linux-android
NDK_VERSION = 21
else ifeq ($(NDK_ABI),x86)
else ifeq ($(ARCH),x86)
NDK_TARGET = i686-linux-android
NDK_VERSION = 16
else ifeq ($(NDK_ABI),x86_64)
else ifeq ($(ARCH),x86_64)
NDK_TARGET = x86_64-linux-android
NDK_VERSION = 21
endif

View File

@@ -1,6 +1,7 @@
CC = emcc
CXX = emcc
LD = emcc
CPP = cpp
EMSCRIPTEN_ASYNC_SYMBOLS = \
SAFE_HEAP_LOAD \
@@ -120,20 +121,9 @@ endif
# Configure EMFLAGS
EMFLAGS += -s WASM=0
# Since emcc 1.39.5, DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR is defautly
# to 1 which discards old looks up to find DOM elements. However SDL relies on
# the presence of a target "#canvas" that used to return the Module['canvas']
# target but not anymore. It also expects the existence of Module['canvas'].
# Until we fix the DOM of the html calling epsilon module, we use the deprecated
# 'find_event_target'.
# TODO: fix DOM of htmls files that uses epsilon js module
EMFLAGS += -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=0
# Configure LDFLAGS
EMSCRIPTEN_MODULARIZE ?= 1
LDFLAGS += -s MODULARIZE=$(EMSCRIPTEN_MODULARIZE) -s 'EXPORT_NAME="Epsilon"'
EMSCRIPTEN_INIT_FILE ?= 1
LDFLAGS += --memory-init-file $(EMSCRIPTEN_INIT_FILE)
LDFLAGS += -s MODULARIZE=$(EMSCRIPTEN_MODULARIZE) -s 'EXPORT_NAME="Epsilon"' --memory-init-file 0
SFLAGS += $(EMFLAGS)
LDFLAGS += $(EMFLAGS) -Oz -s EXPORTED_FUNCTIONS='["_main", "_IonSimulatorKeyboardKeyDown", "_IonSimulatorKeyboardKeyUp", "_IonSimulatorEventsPushEvent", "_IonSoftwareVersion", "_IonPatchLevel", "_IonDisplayForceRefresh"]' -s EXTRA_EXPORTED_RUNTIME_METHODS='["UTF8ToString"]'