Skip to content

Commit

Permalink
Makefile: optimize space usage. (flipperdevices#761)
Browse files Browse the repository at this point in the history
  • Loading branch information
skotopes authored Oct 13, 2021
1 parent e6642b3 commit 0644478
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions applications/gui/canvas.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions core/furi/check.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
6 changes: 3 additions & 3 deletions make/toolchain.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down

0 comments on commit 0644478

Please sign in to comment.