mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[scripts] Build in release and debug objects in separated subfolders:
(eg, build/[release|debug]/[device|emscripten|...]/)
This commit is contained in:
@@ -23,4 +23,4 @@ os: linux
|
||||
script:
|
||||
- set -e
|
||||
- make clean && make epsilon.$EXT test.$EXT
|
||||
- if [ "$PLATFORM" = "blackbox" ]; then build/blackbox/test.$EXT; PLATFORM=blackbox make integration_tests; fi
|
||||
- if [ "$PLATFORM" = "blackbox" ]; then build/release/blackbox/test.$EXT; PLATFORM=blackbox make integration_tests; fi
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
* To use it, first create the two epsilon versions to compare, in a library
|
||||
* format:
|
||||
* git checkout first_hash
|
||||
* make -j8 PLATFORM=blackbox clean build/blackbox/libepsilon_first.o
|
||||
* make -j8 PLATFORM=blackbox clean build/release/blackbox/libepsilon_first.o
|
||||
* git checkout second_hash
|
||||
* make -j8 PLATFORM=blackbox clean build/blackbox/libepsilon_second.o
|
||||
* make -j8 PLATFORM=blackbox clean build/release/blackbox/libepsilon_second.o
|
||||
*
|
||||
* To compare the versions on a given scenario:
|
||||
* make -j8 PLATFORM=blackbox build/blackbox/compare
|
||||
* ./build/blackbox/compare < path/to/scenario
|
||||
* make -j8 PLATFORM=blackbox build/release/blackbox/compare
|
||||
* ./build/release/blackbox/compare < path/to/scenario
|
||||
* To fuzz over scenarios that are in a folder named "tests":
|
||||
* make -j8 PLATFORM=blackbox TOOLCHAIN=afl compare_fuzz
|
||||
*/
|
||||
|
||||
@@ -56,7 +56,7 @@ epsilon_apk_deps += $(addprefix $(BUILD_DIR)/app/res/,mipmap/ic_launcher.png mip
|
||||
.PHONY: gradle_%
|
||||
gradle_%: $(epsilon_apk_deps)
|
||||
@echo "GRADLE ion/src/sdl/android/build.gradle"
|
||||
$(Q) ANDROID_HOME=/usr/local/android EPSILON_VERSION=$(EPSILON_VERSION) gradle -b ion/src/sdl/android/build.gradle $*
|
||||
$(Q) ANDROID_HOME=/usr/local/android EPSILON_VERSION=$(EPSILON_VERSION) BUILD_DIR=$(BUILD_DIR) gradle -b ion/src/sdl/android/build.gradle $*
|
||||
|
||||
.PHONY: epsilon.apk
|
||||
epsilon.apk: gradle_assembleRelease
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
def BUILD_DIR = '../../../../build/sdl/android/app'
|
||||
def BUILD_DIR = '../../../../'+System.getenv('BUILD_DIR')+'/app'
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
|
||||
@@ -34,7 +34,13 @@ ifeq ("$(origin V)", "command line")
|
||||
endif
|
||||
endif
|
||||
|
||||
BUILD_DIR = build/$(PLATFORM)
|
||||
# Building directory
|
||||
ifeq ($(DEBUG),1)
|
||||
MODE = debug
|
||||
else
|
||||
MODE = release
|
||||
endif
|
||||
BUILD_DIR = build/$(MODE)/$(PLATFORM)
|
||||
|
||||
# Define rules for targets
|
||||
# Those can be built directly with make executable.extension as a shortcut.
|
||||
|
||||
@@ -28,7 +28,7 @@ define use_dfu_symbol_file
|
||||
# Discard previous symbol file
|
||||
symbol-file
|
||||
# Load new symbol file
|
||||
add-symbol-file build/device/ion/src/device/shared/usb/dfu.elf 0x20038000
|
||||
add-symbol-file build/debug/device/ion/src/device/shared/usb/dfu.elf 0x20038000
|
||||
end
|
||||
|
||||
document armex
|
||||
|
||||
@@ -2,7 +2,7 @@ MODEL ?= n0110
|
||||
USE_LIBA = 1
|
||||
EXE = elf
|
||||
|
||||
BUILD_DIR = build/$(PLATFORM)/$(MODEL)
|
||||
BUILD_DIR = build/$(MODE)/$(PLATFORM)/$(MODEL)
|
||||
|
||||
$(BUILD_DIR)/python/port/port.o: CXXFLAGS += -DMP_PORT_USE_STACK_SYMBOLS=1
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ $(BUILD_DIR)/compare: $(call object_for,ion/src/blackbox/compare.cpp)
|
||||
.PHONY: tests/%.run
|
||||
tests/%.run: tests/%.esc epsilon.$(EXE)
|
||||
@echo "RUN $<"
|
||||
@./build/blackbox/epsilon.$(EXE) --logAfter 0 < $< > /dev/null
|
||||
@./$(BUILD_DIR)/epsilon.$(EXE) --logAfter 0 < $< > /dev/null
|
||||
|
||||
.PHONY: tests/%.render
|
||||
tests/%.render: tests/%.esc epsilon.$(EXE)
|
||||
@@ -31,7 +31,7 @@ tests/%.render: tests/%.esc epsilon.$(EXE)
|
||||
@rm -rf tests/$(*F)
|
||||
@mkdir -p tests/$(*F)
|
||||
@rm -f event*.png
|
||||
@./build/blackbox/epsilon.$(EXE) --logAfter 0 < $< > /dev/null
|
||||
@./$(BUILD_DIR)/epsilon.$(EXE) --logAfter 0 < $< > /dev/null
|
||||
@mv event*.png tests/$(*F)
|
||||
|
||||
scenarios = $(wildcard tests/*.esc)
|
||||
|
||||
Reference in New Issue
Block a user