mirror of https://github.com/zeldaret/tp.git
Makefile: DEBUG option (#86)
* Makefile: DEBUG option * diff_settings.py: if diffing with --source, make DEBUG=1 Co-authored-by: Pheenoh <pheenoh@gmail.com>
This commit is contained in:
parent
c70d485d35
commit
caeacbe56b
13
Makefile
13
Makefile
|
|
@ -1,6 +1,16 @@
|
|||
WINDOWS := $(shell which wine ; echo $$?)
|
||||
UNAME_S := $(shell uname -s)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Options
|
||||
#-------------------------------------------------------------------------------
|
||||
DEBUG ?= 0
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -g
|
||||
else
|
||||
CFLAGS +=
|
||||
endif
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Files
|
||||
#-------------------------------------------------------------------------------
|
||||
|
|
@ -53,6 +63,7 @@ endif
|
|||
|
||||
AS := $(DEVKITPPC)/bin/powerpc-eabi-as
|
||||
OBJCOPY := $(DEVKITPPC)/bin/powerpc-eabi-objcopy
|
||||
STRIP := $(DEVKITPPC)/bin/powerpc-eabi-strip
|
||||
CC := $(WINE) tools/mwcc_compiler/$(MWCC_VERSION)/mwcceppc.exe
|
||||
LD := $(WINE) tools/mwcc_compiler/$(MWCC_VERSION)/mwldeppc.exe
|
||||
ELF2DOL := tools/elf2dol
|
||||
|
|
@ -71,7 +82,7 @@ ASFLAGS := -mgekko -I include
|
|||
LDFLAGS := -map $(MAP) -fp hard -nodefaults -w off
|
||||
|
||||
# Compiler flags
|
||||
CFLAGS := -Cpp_exceptions off -proc gekko -fp hard -O3 -nodefaults -msgstyle gcc -enum int $(INCLUDES)
|
||||
CFLAGS += -Cpp_exceptions off -proc gekko -fp hard -O3 -nodefaults -msgstyle gcc -enum int $(INCLUDES)
|
||||
|
||||
# for postprocess.py
|
||||
PROCFLAGS := -fprologue-fixup=old_stack
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ def apply(config, args):
|
|||
config['myimg'] = 'build/dolzel2/main.elf'
|
||||
config['baseimg'] = 'baserom.elf'
|
||||
config['makeflags'] = []
|
||||
if args.source:
|
||||
config['makeflags'].append('DEBUG=1')
|
||||
config['source_directories'] = ['src', 'libs', 'include']
|
||||
config['arch'] = 'ppc'
|
||||
config['objdump_executable'] = f"{os.environ['DEVKITPPC']}/bin/powerpc-eabi-objdump"
|
||||
|
|
|
|||
Loading…
Reference in New Issue