Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/preview' into gfx-rdp
Browse files Browse the repository at this point in the history
  • Loading branch information
rasky committed Oct 24, 2024
2 parents 59621e7 + acbe8f9 commit 020bd5b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ INSTALLDIR = $(N64_INST)
# When building libdragon, override it to use the source include files instead (./include)
N64_INCLUDEDIR = $(CURDIR)/include

LIBDRAGON_CFLAGS = -I$(CURDIR)/src -ffile-prefix-map=$(CURDIR)=libdragon
# N64_BACKTRACE_FILE_PREFIX is exposed from n64.mk, so we can use it to set the
# prefix for libdragon. It is still possible to override this when running make
# for libdragon specifically via a make override.
N64_BACKTRACE_FILE_PREFIX=libdragon

LIBDRAGON_CFLAGS = -I$(CURDIR)/src

# Activate N64 toolchain for libdragon build
libdragon: CC=$(N64_CC)
Expand Down
10 changes: 9 additions & 1 deletion n64.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ N64_ROM_CONTROLLER2 = # Sets the type of Controller 2 in the Advanced Homebrew H
N64_ROM_CONTROLLER3 = # Sets the type of Controller 3 in the Advanced Homebrew Header. This could influence emulator behaviour such as Ares'
N64_ROM_CONTROLLER4 = # Sets the type of Controller 4 in the Advanced Homebrew Header. This could influence emulator behaviour such as Ares'

# Override this to use a different file prefix for the debug symbols. This is
# useful when building multiple projects in the same directory and you can set
# this to the project name to differentiate between similar paths. Example:
# .PHONY: tiny3d
# tiny3d:
# $(MAKE) -C $(T3D_INST) N64_BACKTRACE_FILE_PREFIX=tiny3d
N64_BACKTRACE_FILE_PREFIX=

# Override this to use a toolchain installed separately from libdragon
N64_GCCPREFIX ?= $(N64_INST)
N64_ROOTDIR = $(N64_INST)
Expand Down Expand Up @@ -49,7 +57,7 @@ N64_DSOMSYM = $(N64_BINDIR)/n64dso-msym

N64_C_AND_CXX_FLAGS = -march=vr4300 -mtune=vr4300 -I$(N64_INCLUDEDIR) -include ktls.h
N64_C_AND_CXX_FLAGS += -falign-functions=32 # NOTE: if you change this, also change backtrace() in backtrace.c
N64_C_AND_CXX_FLAGS += -ffunction-sections -fdata-sections -g -ffile-prefix-map="$(CURDIR)"=
N64_C_AND_CXX_FLAGS += -ffunction-sections -fdata-sections -g -ffile-prefix-map="$(CURDIR)"=$(N64_BACKTRACE_FILE_PREFIX)
N64_C_AND_CXX_FLAGS += -ffast-math -ftrapping-math -fno-associative-math
N64_C_AND_CXX_FLAGS += -DN64 -O2 -Wall -Werror -Wno-error=deprecated-declarations -fdiagnostics-color=always
N64_C_AND_CXX_FLAGS += -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=unused-function -Wno-error=unused-parameter -Wno-error=unused-but-set-parameter -Wno-error=unused-label -Wno-error=unused-local-typedefs -Wno-error=unused-const-variable
Expand Down

0 comments on commit 020bd5b

Please sign in to comment.