diff --git a/.gitmodules b/.gitmodules index f5851947d..77ed99b48 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/Makefile b/Makefile index afa266ef7..82fd88e4e 100644 --- a/Makefile +++ b/Makefile @@ -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) diff --git a/tools/Makefile b/tools/Makefile index 5d989acaa..9dad1694c 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -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 \ No newline at end of file +.PHONY: all clean default torch diff --git a/tools/torch b/tools/torch new file mode 160000 index 000000000..74b0c1202 --- /dev/null +++ b/tools/torch @@ -0,0 +1 @@ +Subproject commit 74b0c120290083a5e3571a43deada72781af072b diff --git a/tools/torch/torch b/tools/torch/torch deleted file mode 100755 index e47357281..000000000 Binary files a/tools/torch/torch and /dev/null differ