Skip to content

Commit 2bd14fa

Browse files
Merge pull request #85 from 96flashbacks/revert-84-faster-compile
Revert "Faster compile"
2 parents 4004c29 + 82c12da commit 2bd14fa

265 files changed

Lines changed: 20537 additions & 5083 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 10 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -284,39 +284,10 @@ else
284284
ACPP := $(QEMU_IRIX) -silent -L $(IRIX_ROOT) $(IRIX_ROOT)/usr/lib/acpp
285285
COPT := $(QEMU_IRIX) -silent -L $(IRIX_ROOT) $(IRIX_ROOT)/usr/lib/copt
286286
else
287-
# Detect host platform for IDO recomp binaries (allow override via IDO_PLATFORM)
288-
ifndef IDO_PLATFORM
289-
DETECTED_OS := $(shell uname -s)
290-
ifeq ($(DETECTED_OS),Linux)
291-
DETECTED_ARCH := $(shell uname -m)
292-
ifeq ($(DETECTED_ARCH),aarch64)
293-
IDO_PLATFORM := linux-arm
294-
else
295-
IDO_PLATFORM := linux
296-
endif
297-
else ifeq ($(DETECTED_OS),Darwin)
298-
IDO_PLATFORM := macos
299-
else ifneq (,$(findstring MINGW,$(DETECTED_OS)))
300-
IDO_PLATFORM := windows
301-
else ifneq (,$(findstring MSYS,$(DETECTED_OS)))
302-
IDO_PLATFORM := windows
303-
else ifneq (,$(findstring CYGWIN,$(DETECTED_OS)))
304-
IDO_PLATFORM := windows
305-
else
306-
$(error Unsupported platform: $(DETECTED_OS))
307-
endif
308-
endif
309-
310-
# Windows binaries carry the .exe suffix
311-
IDO_EXE_SUFFIX :=
312-
ifeq ($(IDO_PLATFORM),windows)
313-
IDO_EXE_SUFFIX := .exe
314-
endif
315-
316-
IDO_ROOT := $(TOOLS_DIR)/ido-5.3-recomp-$(IDO_PLATFORM)
317-
CC := $(IDO_ROOT)/cc$(IDO_EXE_SUFFIX)
318-
ACPP := $(IDO_ROOT)/acpp$(IDO_EXE_SUFFIX)
319-
COPT := $(IDO_ROOT)/copt$(IDO_EXE_SUFFIX)
287+
IDO_ROOT := $(TOOLS_DIR)/ido-static-recomp/build/out
288+
CC := $(IDO_ROOT)/cc
289+
ACPP := $(IDO_ROOT)/acpp
290+
COPT := $(IDO_ROOT)/copt
320291
endif
321292
endif
322293
LD := $(CROSS)ld
@@ -387,6 +358,12 @@ VADPCM_ENC := $(TOOLS_DIR)/vadpcm_enc
387358
EXTRACT_DATA_FOR_MIO := $(TOOLS_DIR)/extract_data_for_mio
388359
SKYCONV := $(TOOLS_DIR)/skyconv
389360
FLIPS := $(TOOLS_DIR)/flips
361+
# Use the system installed armips if available. Otherwise use the one provided with this repository.
362+
ifneq (,$(call find-command,armips))
363+
RSPASM := armips
364+
else
365+
RSPASM := $(TOOLS_DIR)/armips
366+
endif
390367
ENDIAN_BITWIDTH := $(BUILD_DIR)/endian-and-bitwidth
391368
EMULATOR = mupen64plus
392369
EMU_FLAGS = --noosd

tools/.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,3 @@
1313
!/ido5.3_compiler/usr/lib/*.so
1414
!/ido5.3_compiler/usr/lib/*.so.1
1515
!/ido5.3_compiler/**/*.o
16-
!/ido-5.3-recomp-linux/*
17-
!/ido-5.3-recomp-linux-arm/*
18-
!/ido-5.3-recomp-macos/*
19-
!/ido-5.3-recomp-windows/*

tools/Makefile

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@ CC := gcc
77
CXX := g++
88
CFLAGS := -I . -I sm64tools -Wall -Wextra -Wno-unused-parameter -pedantic -O2 -s
99
LDFLAGS := -lm
10-
ALL_PROGRAMS := textconv patch_elf_32bit aifc_decode aiff_extract_codebook vadpcm_enc tabledesign extract_data_for_mio skyconv slienc
10+
ALL_PROGRAMS := armips textconv patch_elf_32bit aifc_decode aiff_extract_codebook vadpcm_enc tabledesign extract_data_for_mio skyconv slienc
1111
LIBAUDIOFILE := audiofile/libaudiofile.a
1212

13-
BUILD_PROGRAMS := $(ALL_PROGRAMS)
13+
# Only build armips from tools if it is not found on the system
14+
ifeq ($(call find-command,armips),)
15+
BUILD_PROGRAMS := $(ALL_PROGRAMS)
16+
else
17+
BUILD_PROGRAMS := $(filter-out armips,$(ALL_PROGRAMS))
18+
endif
1419

1520
default: all
1621

@@ -34,6 +39,14 @@ extract_data_for_mio_SOURCES := extract_data_for_mio.c
3439

3540
skyconv_SOURCES := skyconv.c sm64tools/n64graphics.c sm64tools/utils.c
3641

42+
armips: CC := $(CXX)
43+
armips_SOURCES := armips.cpp
44+
armips_CFLAGS := -std=gnu++11 -fno-exceptions -fno-rtti -pipe
45+
armips_LDFLAGS := -pthread
46+
ifeq ($(HOST_ENV),MinGW)
47+
armips_LDFLAGS += -municode
48+
endif
49+
3750
ifeq ($(shell uname -s),Linux)
3851
BUILD_PROGRAMS += flips
3952
endif
@@ -52,20 +65,25 @@ slienc_CFLAGS :=
5265

5366
all-except-recomp: $(LIBAUDIOFILE) $(BUILD_PROGRAMS)
5467

55-
all: all-except-recomp
68+
all: all-except-recomp ido-static-recomp
5669

5770
clean:
5871
$(RM) $(ALL_PROGRAMS)
5972
$(MAKE) -C audiofile clean
73+
$(MAKE) -C ido-static-recomp clean
6074

6175
define COMPILE
6276
$(1): $($1_SOURCES)
6377
$$(CC) $(CFLAGS) $($1_CFLAGS) $$^ -o $$@ $($1_LDFLAGS) $(LDFLAGS)
6478
endef
6579

80+
ido-static-recomp:
81+
@$(MAKE) -C ido-static-recomp setup
82+
@$(MAKE) -C ido-static-recomp
83+
6684
$(foreach p,$(BUILD_PROGRAMS),$(eval $(call COMPILE,$(p))))
6785

6886
$(LIBAUDIOFILE):
6987
@$(MAKE) -C audiofile
7088

71-
.PHONY: all all-except-recomp clean default
89+
.PHONY: all all-except-recomp clean default ido-static-recomp
-130 KB
Binary file not shown.

tools/ido-5.3-recomp-linux-arm/as0

-170 KB
Binary file not shown.

tools/ido-5.3-recomp-linux-arm/as1

-798 KB
Binary file not shown.
-77.9 KB
Binary file not shown.

tools/ido-5.3-recomp-linux-arm/cc

-234 KB
Binary file not shown.

tools/ido-5.3-recomp-linux-arm/cfe

-734 KB
Binary file not shown.
-2.26 MB
Binary file not shown.

0 commit comments

Comments
 (0)