You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
Remove IDO
This commit is contained in:
131
Makefile
131
Makefile
@@ -36,11 +36,9 @@ else ifeq ($(CONSOLE),bb)
|
||||
endif
|
||||
|
||||
# COMPILER - selects the C compiler to use
|
||||
# ido - uses the SGI IRIS Development Option compiler, which is used to build
|
||||
# an original matching N64 ROM
|
||||
# gcc - uses the GNU C Compiler
|
||||
COMPILER ?= gcc
|
||||
$(eval $(call validate-option,COMPILER,ido gcc))
|
||||
$(eval $(call validate-option,COMPILER,gcc))
|
||||
|
||||
|
||||
# SAVETYPE - selects the save type
|
||||
@@ -131,24 +129,7 @@ else ifeq ($(GRUCODE),super3d) # Super3D
|
||||
DEFINES += SUPER3D_GBI=1 F3D_NEW=1
|
||||
endif
|
||||
|
||||
|
||||
# USE_QEMU_IRIX - when ido is selected, select which way to emulate IRIX programs
|
||||
# 1 - use qemu-irix
|
||||
# 0 - statically recompile the IRIX programs
|
||||
USE_QEMU_IRIX ?= 0
|
||||
$(eval $(call validate-option,USE_QEMU_IRIX,0 1))
|
||||
|
||||
ifeq ($(COMPILER),ido)
|
||||
ifeq ($(USE_QEMU_IRIX),1)
|
||||
# Verify that qemu-irix exists
|
||||
QEMU_IRIX ?= $(call find-command,qemu-irix)
|
||||
ifeq (, $(QEMU_IRIX))
|
||||
$(error Using the IDO compiler requires qemu-irix. Please install qemu-irix package or set the QEMU_IRIX environment variable to the full qemu-irix binary path)
|
||||
endif
|
||||
endif
|
||||
|
||||
MIPSISET := -mips2
|
||||
else ifeq ($(COMPILER),gcc)
|
||||
ifeq ($(COMPILER),gcc)
|
||||
NON_MATCHING := 1
|
||||
MIPSISET := -mips3
|
||||
OPT_FLAGS := -O2
|
||||
@@ -261,7 +242,7 @@ ifeq ($(filter clean distclean print-%,$(MAKECMDGOALS)),)
|
||||
|
||||
# Make tools if out of date
|
||||
$(info Building tools...)
|
||||
DUMMY != $(MAKE) -s -C $(TOOLS_DIR) $(if $(filter-out ido0,$(COMPILER)$(USE_QEMU_IRIX)),all-except-recomp,) >&2 || echo FAIL
|
||||
DUMMY != $(MAKE) -s -C $(TOOLS_DIR) >&2 || echo FAIL
|
||||
ifeq ($(DUMMY),FAIL)
|
||||
$(error Failed to build tools)
|
||||
endif
|
||||
@@ -327,18 +308,6 @@ LIBZ_O_FILES := $(foreach file,$(LIBZ_C_FILES),$(BUILD_DIR)/$(file:.c=.o))
|
||||
# Automatic dependency files
|
||||
DEP_FILES := $(O_FILES:.o=.d) $(LIBZ_O_FILES:.o=.d) $(BUILD_DIR)/$(LD_SCRIPT).d
|
||||
|
||||
# Files with GLOBAL_ASM blocks
|
||||
ifeq ($(NON_MATCHING),0)
|
||||
ifeq ($(VERSION),sh)
|
||||
GLOBAL_ASM_C_FILES != grep -rl 'GLOBAL_ASM(' $(wildcard src/**/*.c) $(wildcard lib/src/*.c)
|
||||
else
|
||||
GLOBAL_ASM_C_FILES != grep -rl 'GLOBAL_ASM(' $(wildcard src/**/*.c)
|
||||
endif
|
||||
GLOBAL_ASM_O_FILES = $(foreach file,$(GLOBAL_ASM_C_FILES),$(BUILD_DIR)/$(file:.c=.o))
|
||||
GLOBAL_ASM_DEP = $(BUILD_DIR)/src/audio/non_matching_dep
|
||||
endif
|
||||
|
||||
|
||||
#==============================================================================#
|
||||
# Compiler Options #
|
||||
#==============================================================================#
|
||||
@@ -361,18 +330,6 @@ export LD_LIBRARY_PATH=./tools
|
||||
AS := $(CROSS)as
|
||||
ifeq ($(COMPILER),gcc)
|
||||
CC := $(CROSS)gcc
|
||||
else
|
||||
ifeq ($(USE_QEMU_IRIX),1)
|
||||
IRIX_ROOT := $(TOOLS_DIR)/ido5.3_compiler
|
||||
CC := $(QEMU_IRIX) -silent -L $(IRIX_ROOT) $(IRIX_ROOT)/usr/bin/cc
|
||||
ACPP := $(QEMU_IRIX) -silent -L $(IRIX_ROOT) $(IRIX_ROOT)/usr/lib/acpp
|
||||
COPT := $(QEMU_IRIX) -silent -L $(IRIX_ROOT) $(IRIX_ROOT)/usr/lib/copt
|
||||
else
|
||||
IDO_ROOT := $(TOOLS_DIR)/ido5.3_recomp
|
||||
CC := $(IDO_ROOT)/cc
|
||||
ACPP := $(IDO_ROOT)/acpp
|
||||
COPT := $(IDO_ROOT)/copt
|
||||
endif
|
||||
endif
|
||||
# Prefer gcc's cpp if installed on the system
|
||||
ifneq (,$(call find-command,cpp-10))
|
||||
@@ -402,10 +359,6 @@ endif
|
||||
C_DEFINES := $(foreach d,$(DEFINES),-D$(d))
|
||||
DEF_INC_CFLAGS := $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(C_DEFINES)
|
||||
|
||||
# Check code syntax with host compiler
|
||||
CC_CHECK := gcc
|
||||
CC_CHECK_CFLAGS := -fsyntax-only -fsigned-char $(CC_CFLAGS) $(TARGET_CFLAGS) -std=gnu90 -Wall -Wextra -Wno-format-security -Wno-main -DNON_MATCHING -DAVOID_UB $(DEF_INC_CFLAGS)
|
||||
|
||||
# C compiler options
|
||||
CFLAGS = -G 0 $(OPT_FLAGS) $(TARGET_CFLAGS) $(MIPSISET) $(DEF_INC_CFLAGS)
|
||||
ifeq ($(COMPILER),gcc)
|
||||
@@ -420,17 +373,6 @@ RSPASMFLAGS := $(foreach d,$(DEFINES),-definelabel $(subst =, ,$(d)))
|
||||
# C preprocessor flags
|
||||
CPPFLAGS := -P -Wno-trigraphs $(DEF_INC_CFLAGS)
|
||||
|
||||
ifeq ($(shell getconf LONG_BIT), 32)
|
||||
# Work around memory allocation bug in QEMU
|
||||
export QEMU_GUEST_BASE := 1
|
||||
else
|
||||
# Ensure that gcc treats the code as 32-bit
|
||||
CC_CHECK_CFLAGS += -m32
|
||||
endif
|
||||
|
||||
# Prevent a crash with -sopt
|
||||
export LANG := C
|
||||
|
||||
#==============================================================================#
|
||||
# Miscellaneous Tools #
|
||||
#==============================================================================#
|
||||
@@ -439,7 +381,6 @@ export LANG := C
|
||||
YAY0TOOL := $(TOOLS_DIR)/slienc
|
||||
RNCPACK := $(TOOLS_DIR)/rncpack
|
||||
ROMALIGN := $(TOOLS_DIR)/romalign
|
||||
BFSIZE := $(TOOLS_DIR)/bfsize
|
||||
FILESIZER := $(TOOLS_DIR)/filesizer
|
||||
N64CKSUM := $(TOOLS_DIR)/n64cksum
|
||||
N64GRAPHICS := $(TOOLS_DIR)/n64graphics
|
||||
@@ -714,17 +655,6 @@ $(BUILD_DIR)/include/level_headers.h: levels/level_headers.h.in
|
||||
$(call print,Preprocessing level headers:,$<,$@)
|
||||
$(V)$(CPP) $(CPPFLAGS) -I . levels/level_headers.h.in | $(PYTHON) $(TOOLS_DIR)/output_level_headers.py > $(BUILD_DIR)/include/level_headers.h
|
||||
|
||||
# Run asm_processor on files that have NON_MATCHING code
|
||||
ifeq ($(NON_MATCHING),0)
|
||||
$(GLOBAL_ASM_O_FILES): CC := $(V)$(PYTHON) $(TOOLS_DIR)/asm_processor/build.py $(CC) -- $(AS) $(ASFLAGS) --
|
||||
endif
|
||||
|
||||
# Rebuild files with 'GLOBAL_ASM' if the NON_MATCHING flag changes.
|
||||
$(GLOBAL_ASM_O_FILES): $(GLOBAL_ASM_DEP).$(NON_MATCHING)
|
||||
$(GLOBAL_ASM_DEP).$(NON_MATCHING):
|
||||
@$(RM) $(GLOBAL_ASM_DEP).*
|
||||
$(V)touch $@
|
||||
|
||||
# Generate version_data.h
|
||||
$(BUILD_DIR)/src/game/version_data.h: tools/make_version.sh
|
||||
@$(PRINT) "$(GREEN)Generating: $(BLUE)$@ $(NO_COL)\n"
|
||||
@@ -737,70 +667,15 @@ $(BUILD_DIR)/src/game/version_data.h: tools/make_version.sh
|
||||
# Compile C code
|
||||
$(BUILD_DIR)/%.o: %.c
|
||||
$(call print,Compiling:,$<,$@)
|
||||
ifeq ($(COMPILER),ido)
|
||||
@$(CC_CHECK) $(CC_CHECK_CFLAGS) -MMD -MP -MT $@ -MF $(BUILD_DIR)/$*.d $<
|
||||
$(V)$(CC) -c $(CFLAGS) -o $@ $<
|
||||
else
|
||||
$(V)$(CC) -c $(CFLAGS) -MMD -MF $(BUILD_DIR)/$*.d -o $@ $<
|
||||
endif
|
||||
$(BUILD_DIR)/%.o: $(BUILD_DIR)/%.c
|
||||
$(call print,Compiling:,$<,$@)
|
||||
ifeq ($(COMPILER),ido)
|
||||
@$(CC_CHECK) $(CC_CHECK_CFLAGS) -MMD -MP -MT $@ -MF $(BUILD_DIR)/$*.d $<
|
||||
$(V)$(CC) -c $(CFLAGS) -o $@ $<
|
||||
else
|
||||
$(V)$(CC) -c $(CFLAGS) -MMD -MF $(BUILD_DIR)/$*.d -o $@ $<
|
||||
endif
|
||||
|
||||
# Alternate compiler flags needed for matching
|
||||
ifeq ($(COMPILER),ido)
|
||||
$(BUILD_DIR)/levels/%/leveldata.o: OPT_FLAGS := -g
|
||||
$(BUILD_DIR)/actors/%.o: OPT_FLAGS := -g
|
||||
$(BUILD_DIR)/bin/%.o: OPT_FLAGS := -g
|
||||
ifeq ($(VERSION),eu)
|
||||
$(BUILD_DIR)/lib/src/_Litob.o: OPT_FLAGS := -O3
|
||||
$(BUILD_DIR)/lib/src/_Ldtob.o: OPT_FLAGS := -O3
|
||||
$(BUILD_DIR)/lib/src/_Printf.o: OPT_FLAGS := -O3
|
||||
$(BUILD_DIR)/lib/src/sprintf.o: OPT_FLAGS := -O3
|
||||
|
||||
# Enable loop unrolling except for external.c (external.c might also have used
|
||||
# unrolling, but it makes one loop harder to match).
|
||||
# For all audio files other than external.c and port_eu.c, put string literals
|
||||
# in .data. (In Shindou, the port_eu.c string literals also moved to .data.)
|
||||
$(BUILD_DIR)/src/audio/%.o: OPT_FLAGS := -O2 -use_readwrite_const
|
||||
$(BUILD_DIR)/src/audio/port_eu.o: OPT_FLAGS := -O2
|
||||
$(BUILD_DIR)/src/audio/external.o: OPT_FLAGS := -O2 -Wo,-loopunroll,0
|
||||
endif
|
||||
ifeq ($(VERSION_JP_US),true)
|
||||
$(BUILD_DIR)/src/audio/%.o: OPT_FLAGS := -O2 -Wo,-loopunroll,0
|
||||
$(BUILD_DIR)/src/audio/load.o: OPT_FLAGS := -O2 -framepointer -Wo,-loopunroll,0
|
||||
endif
|
||||
ifeq ($(VERSION_JP_US),true)
|
||||
# The source-to-source optimizer copt is enabled for audio. This makes it use
|
||||
# acpp, which needs -Wp,-+ to handle C++-style comments.
|
||||
# All other files than external.c should really use copt, but only a few have
|
||||
# been matched so far.
|
||||
$(BUILD_DIR)/src/audio/effects.o: OPT_FLAGS := -O2 -Wo,-loopunroll,0 -sopt,-inline=sequence_channel_process_sound,-scalaroptimize=1 -Wp,-+
|
||||
$(BUILD_DIR)/src/audio/synthesis.o: OPT_FLAGS := -O2 -sopt,-scalaroptimize=1 -Wp,-+
|
||||
endif
|
||||
|
||||
# Add a target for build/eu/src/audio/*.copt to make it easier to see debug
|
||||
$(BUILD_DIR)/src/audio/%.acpp: src/audio/%.c
|
||||
$(ACPP) $(TARGET_CFLAGS) $(DEF_INC_CFLAGS) -D__sgi -+ $< > $@
|
||||
$(BUILD_DIR)/src/audio/%.copt: $(BUILD_DIR)/src/audio/%.acpp
|
||||
$(COPT) -signed -I=$< -CMP=$@ -cp=i -scalaroptimize=1 $(COPTFLAGS)
|
||||
$(BUILD_DIR)/src/audio/seqplayer.copt: COPTFLAGS := -inline_manual
|
||||
|
||||
endif
|
||||
|
||||
# Assemble assembly code
|
||||
$(BUILD_DIR)/%.o: %.s
|
||||
$(call print,Assembling:,$<,$@)
|
||||
ifeq ($(COMPILER),ido)
|
||||
$(V)$(CPP) $(CPPFLAGS) $< | $(AS) $(ASFLAGS) -MD $(BUILD_DIR)/$*.d -o $@
|
||||
else
|
||||
$(V)$(CC) -c $(CFLAGS) $(foreach i,$(INCLUDE_DIRS),-Wa,-I$(i)) -x assembler-with-cpp -MMD -MF $(BUILD_DIR)/$*.d -o $@ $<
|
||||
endif
|
||||
|
||||
$(BUILD_DIR)/sound/sequences/00_sound_player.o: sound/sequences/00_sound_player.s
|
||||
$(call print,Assembling:,$<,$@)
|
||||
|
||||
1
tools/.gitignore
vendored
1
tools/.gitignore
vendored
@@ -1,7 +1,6 @@
|
||||
/aifc_decode
|
||||
/aiff_extract_codebook
|
||||
/armips
|
||||
/bfsize
|
||||
/extract_data_for_mio
|
||||
/filesizer
|
||||
/mio0
|
||||
|
||||
@@ -7,7 +7,7 @@ CC := gcc
|
||||
CXX := g++
|
||||
CFLAGS := -I . -Wall -Wextra -Wno-unused-parameter -pedantic -O2 -s
|
||||
LDFLAGS := -lm
|
||||
ALL_PROGRAMS := armips bfsize filesizer rncpack n64graphics n64graphics_ci mio0 slienc n64cksum textconv patch_libultra_math aifc_decode aiff_extract_codebook vadpcm_enc tabledesign extract_data_for_mio skyconv
|
||||
ALL_PROGRAMS := armips filesizer rncpack n64graphics n64graphics_ci mio0 slienc n64cksum textconv patch_libultra_math aifc_decode aiff_extract_codebook vadpcm_enc tabledesign extract_data_for_mio skyconv
|
||||
LIBAUDIOFILE := audiofile/libaudiofile.a
|
||||
|
||||
# Only build armips from tools if it is not found on the system
|
||||
@@ -19,8 +19,6 @@ endif
|
||||
|
||||
default: all
|
||||
|
||||
bfsize_SOURCES := bfsize.c
|
||||
|
||||
filesizer_SOURCES := filesizer.c
|
||||
|
||||
rncpack_SOURCES := rncpack.c
|
||||
@@ -69,24 +67,20 @@ endif
|
||||
|
||||
all-except-recomp: $(LIBAUDIOFILE) $(BUILD_PROGRAMS)
|
||||
|
||||
all: all-except-recomp ido5.3_recomp
|
||||
all: all-except-recomp
|
||||
|
||||
clean:
|
||||
$(RM) $(ALL_PROGRAMS)
|
||||
$(MAKE) -C audiofile clean
|
||||
$(MAKE) -C ido5.3_recomp clean
|
||||
|
||||
define COMPILE
|
||||
$(1): $($1_SOURCES)
|
||||
$$(CC) $(CFLAGS) $($1_CFLAGS) $$^ -o $$@ $($1_LDFLAGS) $(LDFLAGS)
|
||||
endef
|
||||
|
||||
ido5.3_recomp:
|
||||
$(MAKE) -C ido5.3_recomp
|
||||
|
||||
$(foreach p,$(BUILD_PROGRAMS),$(eval $(call COMPILE,$(p))))
|
||||
|
||||
$(LIBAUDIOFILE):
|
||||
@$(MAKE) -C audiofile
|
||||
|
||||
.PHONY: all all-except-recomp clean default ido5.3_recomp
|
||||
.PHONY: all all-except-recomp clean default
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,36 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
import sys
|
||||
import os
|
||||
import shlex
|
||||
import subprocess
|
||||
import tempfile
|
||||
|
||||
dir_path = os.path.dirname(os.path.realpath(__file__))
|
||||
asm_processor = ['python3', os.path.join(dir_path, "asm-processor.py")]
|
||||
prelude = os.path.join(dir_path, "prelude.inc")
|
||||
|
||||
all_args = sys.argv[1:]
|
||||
sep1 = all_args.index('--')
|
||||
sep2 = all_args.index('--', sep1+1)
|
||||
|
||||
compiler = all_args[:sep1]
|
||||
|
||||
assembler = all_args[sep1+1:sep2]
|
||||
assembler_sh = ' '.join(shlex.quote(x) for x in assembler)
|
||||
|
||||
compile_args = all_args[sep2+1:]
|
||||
in_file = compile_args[-1]
|
||||
out_ind = compile_args.index('-o')
|
||||
out_file = compile_args[out_ind + 1]
|
||||
del compile_args[-1]
|
||||
del compile_args[out_ind + 1]
|
||||
del compile_args[out_ind]
|
||||
|
||||
in_dir = os.path.split(os.path.realpath(in_file))[0]
|
||||
opt_flags = [x for x in compile_args if x in ['-g', '-O2', '-O1', '-framepointer']]
|
||||
|
||||
preprocessed_file = tempfile.NamedTemporaryFile(prefix='preprocessed', suffix='.c')
|
||||
|
||||
subprocess.check_call(asm_processor + opt_flags + [in_file], stdout=preprocessed_file)
|
||||
subprocess.check_call(compiler + compile_args + ['-I', in_dir, '-o', out_file, preprocessed_file.name])
|
||||
subprocess.check_call(asm_processor + opt_flags + [in_file, '--post-process', out_file, '--assembler', assembler_sh, '--asm-prelude', prelude])
|
||||
@@ -1,5 +0,0 @@
|
||||
.set noat
|
||||
.set noreorder
|
||||
.set gp=64
|
||||
.include "macros.inc"
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2011 <fwhacking|gmail:com>
|
||||
*
|
||||
* This is free software, licensed under the GNU General Public License v2.
|
||||
* See /LICENSE for more information.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
static void print_usage(const char *name)
|
||||
{
|
||||
printf("Usage: %s file\n", name);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
FILE *fd;
|
||||
long size;
|
||||
|
||||
if (argc != 2)
|
||||
{
|
||||
print_usage(argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
fd = fopen(argv[1], "rb");
|
||||
if (fd == NULL)
|
||||
{
|
||||
printf("Could not read the file '%s'\n", argv[1]);
|
||||
print_usage(argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
size = fseek(fd, 0L, SEEK_END);
|
||||
size = ftell(fd);
|
||||
fclose(fd);
|
||||
|
||||
printf("%ld\n", size);
|
||||
|
||||
exit(0);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
# Silicon Graphics Freeware Legal Notice
|
||||
## Copyright 1995, Silicon Graphics, Inc. -- ALL RIGHTS RESERVED
|
||||
|
||||
You may copy, modify, use and distribute this software, (i) provided that you include the entirety of this reservation of rights notice in all such copies, and (ii) you comply with any additional or different obligations and/or use restrictions specified by any third party owner or supplier of the software in other notices that may be included with the software.
|
||||
|
||||
**SGI DISCLAIMS ALL WARRANTIES WITH RESPECT TO THIS SOFTWARE, EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ALL WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. SGI SHALL NOT BE LIABLE FOR ANY SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING, WITHOUT LIMITATION, LOST REVENUES, LOST PROFITS, OR LOSS OF PROSPECTIVE ECONOMIC ADVANTAGE, RESULTING FROM THE USE OR MISUSE OF THIS SOFTWARE.**
|
||||
|
||||
**U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND:**
|
||||
|
||||
Use, duplication or disclosure by the Government is subject to restrictions as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or in similar or successor clauses in the FAR, or the DOD or NASA FAR Supplement. Unpublished - rights reserved under the Copyright Laws of United States. Contractor/manufacturer is Silicon Graphics, Inc., 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311.
|
||||
|
||||
## Product Support
|
||||
|
||||
Freeware products are not supported by Silicon Graphics or any of its support providers. The software contained in this package is made available through the generous efforts of their authors. Although they are interested in your feedback, they are under no obligation to address bugs, enhancements, or answer questions.
|
||||
|
||||
----
|
||||
|
||||
**NOTE:** This license was copied verbatim from https://web.archive.org/web/19991008090202/http://toolbox.sgi.com/TasteOfDT/public/freeware1.0/legal_notice.html .
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user