diff --git a/.travis.yml b/.travis.yml index e6765d5e1..32f8f50f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/ion/src/blackbox/compare.cpp b/ion/src/blackbox/compare.cpp index fdb9810ad..c98e8a747 100644 --- a/ion/src/blackbox/compare.cpp +++ b/ion/src/blackbox/compare.cpp @@ -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 */ diff --git a/ion/src/sdl/android/Makefile b/ion/src/sdl/android/Makefile index 92ab951a5..4a606a873 100644 --- a/ion/src/sdl/android/Makefile +++ b/ion/src/sdl/android/Makefile @@ -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 diff --git a/ion/src/sdl/android/build.gradle b/ion/src/sdl/android/build.gradle index b830c9b95..9a15cabbc 100644 --- a/ion/src/sdl/android/build.gradle +++ b/ion/src/sdl/android/build.gradle @@ -1,4 +1,4 @@ -def BUILD_DIR = '../../../../build/sdl/android/app' +def BUILD_DIR = '../../../../'+System.getenv('BUILD_DIR')+'/app' buildscript { repositories { diff --git a/scripts/defaults.mak b/scripts/defaults.mak index 98aa9f9d0..334984d84 100644 --- a/scripts/defaults.mak +++ b/scripts/defaults.mak @@ -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. diff --git a/scripts/device/gdb_script.gdb b/scripts/device/gdb_script.gdb index 8e59218d0..567413f54 100644 --- a/scripts/device/gdb_script.gdb +++ b/scripts/device/gdb_script.gdb @@ -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 diff --git a/scripts/platform.device.mak b/scripts/platform.device.mak index 69e892df5..c4e7c5e24 100644 --- a/scripts/platform.device.mak +++ b/scripts/platform.device.mak @@ -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 diff --git a/scripts/targets.blackbox.mak b/scripts/targets.blackbox.mak index 3eed66270..dfd19fe82 100644 --- a/scripts/targets.blackbox.mak +++ b/scripts/targets.blackbox.mak @@ -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)