Makefile: optimize space usage. (#761)

This commit is contained in:
あく 2021-10-13 20:33:09 +03:00 committed by GitHub
parent e6642b332c
commit 06444789bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View File

@ -110,11 +110,11 @@ void canvas_set_font(Canvas* canvas, Font font) {
furi_assert(canvas);
u8g2_SetFontMode(&canvas->fb, 1);
if(font == FontPrimary) {
u8g2_SetFont(&canvas->fb, u8g2_font_helvB08_tf);
u8g2_SetFont(&canvas->fb, u8g2_font_helvB08_tr);
} else if(font == FontSecondary) {
u8g2_SetFont(&canvas->fb, u8g2_font_haxrcorp4089_tr);
} else if(font == FontKeyboard) {
u8g2_SetFont(&canvas->fb, u8g2_font_profont11_mf);
u8g2_SetFont(&canvas->fb, u8g2_font_profont11_mr);
} else if(font == FontBigNumbers) {
u8g2_SetFont(&canvas->fb, u8g2_font_profont22_tn);
} else {

View File

@ -8,10 +8,10 @@ extern "C" {
#define furi_check(__e) ((__e) ? (void)0 : furi_crash("fury_check failed\r\n"))
/** Only in debug build: Assert condition and crash if assert failed */
#ifdef NDEBUG
#define furi_assert(__e) ((void)0)
#else
#ifdef FURI_DEBUG
#define furi_assert(__e) ((__e) ? (void)0 : furi_crash("furi_assert failed\r\n"))
#else
#define furi_assert(__e) ((void)0)
#endif
/** Crash system */

View File

@ -18,11 +18,11 @@ BIN = $(CP) -O binary -S
DEBUG ?= 1
COMPACT ?= 0
ifeq ($(DEBUG), 1)
CFLAGS += -DDEBUG -Og -g
CFLAGS += -DFURI_DEBUG -DNDEBUG -DLFS_NO_ASSERT -Og -g
else ifeq ($(COMPACT), 1)
CFLAGS += -DNDEBUG -DLFS_NO_ASSERT -Os
CFLAGS += -DFURI_NDEBUG -DNDEBUG -DLFS_NO_ASSERT -Os
else
CFLAGS += -DNDEBUG -DLFS_NO_ASSERT -Og
CFLAGS += -DFURI_NDEBUG -DNDEBUG -DLFS_NO_ASSERT -Og
endif
CFLAGS += -fdata-sections -ffunction-sections -fno-math-errno -fstack-usage -MMD -MP -MF"$(@:%.o=%.d)"