Fix torch (#600)

* Fixed torch
This commit is contained in:
MegaMech 2024-04-09 22:24:11 -06:00 committed by GitHub
parent 3da5a4f343
commit ad495221f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 13 additions and 17 deletions

3
.gitmodules vendored
View File

@ -10,3 +10,6 @@
[submodule "doxygen-awesome-css"]
path = doxygen-awesome-css
url = https://github.com/jothepro/doxygen-awesome-css.git
[submodule "tools/torch"]
path = tools/torch
url = https://github.com/HarbourMasters/torch

View File

@ -356,7 +356,7 @@ BIN2C := $(PYTHON) $(TOOLS_DIR)/bin2c.py
EXTRACT_DATA_FOR_MIO := $(TOOLS_DIR)/extract_data_for_mio
ASSET_EXTRACT := $(PYTHON) $(TOOLS_DIR)/new_extract_assets.py
LINKONLY_GENERATOR := $(PYTHON) $(TOOLS_DIR)/linkonly_generator.py
TORCH := tools/torch/torch
TORCH := tools/torch/cmake-build-release/torch
EMULATOR = mupen64plus
EMU_FLAGS = --noosd
LOADER = loader64
@ -399,7 +399,7 @@ endif
assets:
@echo "Extracting torch assets..."
@$(TORCH) code $(BASEROM) -v
@$(TORCH) code $(BASEROM)
@$(TORCH) header $(BASEROM)
@$(TORCH) modding export $(BASEROM)

View File

@ -29,25 +29,17 @@ n64cksum_CFLAGS := -DN64CKSUM_STANDALONE
extract_data_for_mio_SOURCES := extract_data_for_mio.c
ifeq ($(OS),Windows_NT)
DETECTED_OS=windows
# Set Windows temporary directory to its environment variable
export TMPDIR=$(TEMP)
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
DETECTED_OS=linux
else ifeq ($(UNAME_S),Darwin)
DETECTED_OS=macos
endif
endif
# Build tools and recomp
all: $(PROGRAMS)
all: $(PROGRAMS) torch
torch:
@echo "Building Torch..."
$(MAKE) -C torch type=release -j$(N_THREADS)
# Remove generated files
clean:
$(RM) $(PROGRAMS)
$(RM) -rf torch/cmake-build-release
@ -63,4 +55,4 @@ endef
$(foreach p,$(PROGRAMS),$(eval $(call COMPILE,$(p))))
.PHONY: all clean default
.PHONY: all clean default torch

1
tools/torch Submodule

@ -0,0 +1 @@
Subproject commit 74b0c120290083a5e3571a43deada72781af072b

Binary file not shown.