Skip to content

Commit

Permalink
Add setting DEBUG_APP and DEBUG_STUB through Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
korbosoft committed Feb 10, 2025
1 parent 833bdbd commit 51fa1a4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions channel/channelapp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,22 @@ DIR_LIBS = \

LIBS = mxml freetype png bz2 z db fat wiiuse bte ogc m

export DEBUG_APP DEBUG_STUB

MACHDEP = -g -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float
CFLAGS = $(MACHDEP) -Os -Wall -DBASE_ADDR=$(BASE_ADDR) $(DIR_INCLUDES:%=-I%)
# check for DEBUG_APP variable (DEBUG_APP=1 make)
ifeq ($(DEBUG_APP),1)
CFLAGS += -DDEBUG_APP
endif

# using -Os for the stub makes it dependent on libgcc
CFLAGS_STUB = $(MACHDEP) -O2 -Wall -DBASE_ADDR=$(BASE_ADDR) $(DIR_INCLUDES:%=-I%)
# check for DEBUG_STUB variable (DEBUG_STUB=1 make)
ifeq ( $(DEBUG_STUB)),1)
CFLAGS_STUB += -DDEBUG_STUB
endif

ASFLAGS = -D_LANGUAGE_ASSEMBLY -DHW_RVL
LDFLAGS_STUB = $(MACHDEP) -Wl,--section-start,.init=0x80001800 -nostartfiles -nodefaultlibs
LDFLAGS_APP = $(MACHDEP) -specs=newrvl.spec -Wl,--section-start,.init=$(BASE_ADDR) \
Expand Down

0 comments on commit 51fa1a4

Please sign in to comment.