64 bit baybee

This commit is contained in:
Cadey Ratio 2020-05-06 17:26:13 -04:00
parent 639582b4d6
commit c69c75bf9b
2 changed files with 8 additions and 8 deletions

View File

@ -121,7 +121,7 @@ ifneq ($(MAKECMDGOALS),distclean)
# Make sure assets exist # Make sure assets exist
NOEXTRACT ?= 0 NOEXTRACT ?= 0
ifeq ($(NOEXTRACT),0) ifeq ($(NOEXTRACT),0)
DUMMY != ./extract_assets.py $(VERSION) >&2 || echo FAIL DUMMY != python3 ./extract_assets.py $(VERSION) >&2 || echo FAIL
ifeq ($(DUMMY),FAIL) ifeq ($(DUMMY),FAIL)
$(error Failed to extract assets) $(error Failed to extract assets)
endif endif
@ -192,7 +192,7 @@ MIPSISET := -mips2 -32
ifeq ($(VERSION),eu) ifeq ($(VERSION),eu)
OPT_FLAGS := -O2 OPT_FLAGS := -O2
else else
OPT_FLAGS := -g -m32 OPT_FLAGS := -g
endif endif
ifeq ($(TARGET_WEB),1) ifeq ($(TARGET_WEB),1)
@ -351,7 +351,7 @@ endif
CC_CHECK := gcc -fsyntax-only -fsigned-char $(CC_CFLAGS) $(TARGET_CFLAGS) $(INCLUDE_CFLAGS) -std=gnu90 -Wall -Wextra -Wno-format-security -DNON_MATCHING -DAVOID_UB $(VERSION_CFLAGS) $(GRUCODE_CFLAGS) CC_CHECK := gcc -fsyntax-only -fsigned-char $(CC_CFLAGS) $(TARGET_CFLAGS) $(INCLUDE_CFLAGS) -std=gnu90 -Wall -Wextra -Wno-format-security -DNON_MATCHING -DAVOID_UB $(VERSION_CFLAGS) $(GRUCODE_CFLAGS)
ASFLAGS := -march=vr4300 -mabi=32 -I include -I $(BUILD_DIR) $(VERSION_ASFLAGS) $(GRUCODE_ASFLAGS) ASFLAGS := -march=vr4300 -mabi=32 -I include -I $(BUILD_DIR) $(VERSION_ASFLAGS) $(GRUCODE_ASFLAGS)
CFLAGS = -Wab,-r4300_mul -non_shared -G 0 -Xcpluscomm -Xfullwarn -signed $(OPT_FLAGS) $(TARGET_CFLAGS) $(INCLUDE_CFLAGS) $(VERSION_CFLAGS) $(MIPSISET) $(GRUCODE_CFLAGS) CFLAGS = -Wab,-r4300_mul -non_shared -G 0 -Xcpluscomm -Xfullwarn -signed $(OPT_FLAGS) $(TARGET_CFLAGS) $(INCLUDE_CFLAGS) $(VERSION_CFLAGS) $(MIPSISET) $(GRUCODE_CFLAGS) -O3
OBJCOPYFLAGS := --pad-to=0x800000 --gap-fill=0xFF OBJCOPYFLAGS := --pad-to=0x800000 --gap-fill=0xFF
SYMBOL_LINKING_FLAGS := $(addprefix -R ,$(SEG_FILES)) SYMBOL_LINKING_FLAGS := $(addprefix -R ,$(SEG_FILES))
LDFLAGS := -T undefined_syms.txt -T $(BUILD_DIR)/$(LD_SCRIPT) -Map $(BUILD_DIR)/sm64.$(VERSION).map --no-check-sections $(SYMBOL_LINKING_FLAGS) LDFLAGS := -T undefined_syms.txt -T $(BUILD_DIR)/$(LD_SCRIPT) -Map $(BUILD_DIR)/sm64.$(VERSION).map --no-check-sections $(SYMBOL_LINKING_FLAGS)
@ -362,7 +362,7 @@ ifeq ($(shell getconf LONG_BIT), 32)
export QEMU_GUEST_BASE := 1 export QEMU_GUEST_BASE := 1
else else
# Ensure that gcc treats the code as 32-bit # Ensure that gcc treats the code as 32-bit
CC_CHECK += -m32 CC_CHECK +=
endif endif
else # TARGET_N64 else # TARGET_N64
@ -401,9 +401,9 @@ ifeq ($(TARGET_WEB),1)
LDFLAGS := -lm -lGL -lSDL2 -no-pie -s TOTAL_MEMORY=20MB -g4 --source-map-base http://localhost:8080/ -s "EXTRA_EXPORTED_RUNTIME_METHODS=['callMain']" LDFLAGS := -lm -lGL -lSDL2 -no-pie -s TOTAL_MEMORY=20MB -g4 --source-map-base http://localhost:8080/ -s "EXTRA_EXPORTED_RUNTIME_METHODS=['callMain']"
else else
ifeq ($(WINDOWS_BUILD),1) ifeq ($(WINDOWS_BUILD),1)
LDFLAGS := -m32 -march=i686 -Llib -lpthread -lglew32 `sdl2-config --static-libs` -lm -lglu32 -lsetupapi -ldinput8 -luser32 -lgdi32 -limm32 -lole32 -loleaut32 -lshell32 -lwinmm -lversion -luuid -lopengl32 -no-pie -static LDFLAGS := -Llib -lpthread -lglew32 `sdl2-config --static-libs` -lm -lglu32 -lsetupapi -ldinput8 -luser32 -lgdi32 -limm32 -lole32 -loleaut32 -lshell32 -lwinmm -lversion -luuid -lopengl32 -no-pie -static
else else
LDFLAGS := -m32 -march=i686 -lm -lGL `sdl2-config --libs` -no-pie -lpthread `pkg-config --libs libusb-1.0 glfw3` -lasound -lX11 -lXrandr -lpulse LDFLAGS := -lm -lGL `sdl2-config --libs` -no-pie -lpthread `pkg-config --libs libusb-1.0 glfw3` -lasound -lX11 -lXrandr -lpulse
endif endif
endif endif

View File

@ -1,8 +1,8 @@
let let
pkgs = import <nixpkgs> {}; pkgs = import <nixpkgs> {};
in in
pkgs.pkgsi686Linux.mkShell { pkgs.mkShell {
buildInputs = with pkgs.pkgsi686Linux; [ buildInputs = with pkgs; [
gnumake python3 audiofile pkg-config SDL2 libusb1 glfw3 libgcc xorg.libX11 xorg.libXrandr libpulseaudio alsaLib glfw libGL gnumake python3 audiofile pkg-config SDL2 libusb1 glfw3 libgcc xorg.libX11 xorg.libXrandr libpulseaudio alsaLib glfw libGL
]; ];
} }