Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert TEXTURE_FIX to QOL_FIXES #456

Closed
wants to merge 51 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
8f8ed8a
QOL_FIXES all in one giant commit (thanks Aloxado320 for a lot of these)
rawr51919 Feb 15, 2021
58ebaf8
Forgot one small makefile fix
rawr51919 Feb 15, 2021
55856eb
A few minor fixes/tweaks I forgot
rawr51919 Feb 15, 2021
9198ad8
Fixed a similar bug to the BLJs, but this time for shells.
rawr51919 Feb 16, 2021
b6b2350
Add unused play state build option
rawr51919 Feb 16, 2021
0a875ae
QOL_FIXES now makes this check a little simpler (maybe faster?)
rawr51919 Feb 16, 2021
2103d23
Someone made a booboo
rawr51919 Feb 16, 2021
053294a
Various QoL tweaks/build fixes
rawr51919 Feb 16, 2021
d3d15cd
Various QoL tweaks/build fixes
rawr51919 Feb 16, 2021
acff434
Minor tweak because the oTimer overflow check doesn't matter anymore
rawr51919 Feb 16, 2021
056a9ae
Fixed accidental comment change
rawr51919 Feb 16, 2021
74db421
Fix minor OOB array access warning with Exit Game options
rawr51919 Feb 16, 2021
8395032
Fix noise fix
rawr51919 Feb 16, 2021
362865d
revert comment
rawr51919 Feb 16, 2021
0b20818
A few more fixes
rawr51919 Feb 16, 2021
c28b7b2
minor fix to a fix
rawr51919 Feb 16, 2021
2ce60d1
Merga Aloxado320's changes to SSL cutscene
rawr51919 Feb 16, 2021
9f907a4
A few warning fixes and slight tweaks
rawr51919 Feb 16, 2021
44f9e94
Made the let's-a-go fix a QoL fix
rawr51919 Feb 16, 2021
6e2df5d
A few QoL tweaks
rawr51919 Feb 16, 2021
53b64e8
Misc QoL tweaks+major makefile bugfix
rawr51919 Feb 16, 2021
5272671
QoL bugfixes and a makefile revert
rawr51919 Feb 16, 2021
85827a0
Fix a major bug with the QoL fixes+minor tweaks
rawr51919 Feb 17, 2021
3123010
Added back the QoL demo data and made a few minor tweaks/fixes
rawr51919 Feb 17, 2021
9128f60
A few morw QoL tweaks
rawr51919 Feb 17, 2021
be23d60
Added back the beta trampoline code from earlier PRs+minor tweaks
rawr51919 Feb 18, 2021
867fb75
Fix PUs and BBH crash
rawr51919 Feb 18, 2021
fdaec40
Expand on PU fix
rawr51919 Feb 18, 2021
899490a
Tweak division by 0 QoL fix
rawr51919 Feb 21, 2021
56f60f4
A few QoL tweaks added
rawr51919 Feb 22, 2021
4170a56
Small optimization
rawr51919 Feb 22, 2021
1fc7f7f
emcc memes
rawr51919 Feb 23, 2021
2c57011
few minor fixes/tweaks
rawr51919 Feb 23, 2021
28b3348
Minor pronunciation fix
rawr51919 Feb 23, 2021
2ba29b9
more emcc memes and fix beta trampoline
rawr51919 Feb 23, 2021
51530de
Integrated fixes from PR #423 along with some extra tweaks
rawr51919 Feb 25, 2021
9a146f1
No more brackets for memmove/memcpy
rawr51919 Feb 26, 2021
0da1bbb
Correct Shindou TODO in Makefile
rawr51919 Feb 26, 2021
620caca
Readd F3D_OLD and automate the Dockerfile
rawr51919 Feb 26, 2021
175c7e5
Fixing the QoL fix for triple jumps as per #423
rawr51919 Feb 26, 2021
8871bbd
Tweak the time stop when speaking fix
rawr51919 Feb 26, 2021
c4664e5
Made a booboo with the last commit
rawr51919 Feb 26, 2021
25479e6
A few more QoL fixes, one from PR #423
rawr51919 Feb 26, 2021
c6145be
A few more minor tweaks+autobuilding gen_asset_list
rawr51919 Feb 28, 2021
72de89b
make compile flags of gen_asset_list in line with other tools
rawr51919 Feb 28, 2021
950d967
minor tweak to QoL tools fix
rawr51919 Feb 28, 2021
d47f0fe
add gen_asset_list to gitignore
rawr51919 Feb 28, 2021
dd59d17
Conform the readmes to markdownlint spec
rawr51919 Mar 8, 2021
8b347f2
fix MXE links in readmes
rawr51919 Mar 8, 2021
4684bb4
Tweaked a few things. Fixed a major bug. No need for these extra CROS…
rawr51919 Mar 9, 2021
d584871
Add recommended and suggested packages to Docker installs
rawr51919 Mar 9, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM ubuntu:18.04 as build

RUN apt-get update && \
apt-get install -y \
RUN apt update && \
apt upgrade -y && \
apt install -y --install-recommends --install-suggests \
binutils-mips-linux-gnu \
bsdmainutils \
build-essential \
Expand Down
156 changes: 76 additions & 80 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ TARGET_BITS ?= 0
BETTERCAMERA ?= 0
# Disable no drawing distance by default
NODRAWINGDISTANCE ?= 0
# Disable texture fixes by default (helps with them purists)
TEXTURE_FIX ?= 0
# Disable QoL fixes by default (helps with them purists)
QOL_FIXES ?= 0
# Disable unused play state tweak by default
USE_UNUSED_PLAY_STATE ?= 0
# Enable extended options menu by default
EXT_OPTIONS_MENU ?= 1
# Disable text-based save-files by default
Expand Down Expand Up @@ -103,7 +105,7 @@ ifeq ($(WINDOWS_BUILD),1)
TARGET_BITS = 32
NO_BZERO_BCOPY := 1
else ifeq ($(CROSS),x86_64-w64-mingw32.static-)
TARGET_ARCH = i386pe
TARGET_ARCH = i386pep
TARGET_BITS = 64
NO_BZERO_BCOPY := 1
endif
Expand All @@ -117,24 +119,18 @@ endif

ifeq ($(VERSION),jp)
VERSION_DEF := VERSION_JP
else
ifeq ($(VERSION),us)
else ifeq ($(VERSION),us)
VERSION_DEF := VERSION_US
else
ifeq ($(VERSION),eu)
else ifeq ($(VERSION),eu)
VERSION_DEF := VERSION_EU
else
ifeq ($(VERSION),sh)
else ifeq ($(VERSION),sh)
$(warning Building SH is experimental and is prone to breaking. Try at your own risk.)
VERSION_DEF := VERSION_SH
# TODO: GET RID OF THIS!!! We should mandate assets for Shindou like EU but we dont have the addresses extracted yet so we'll just pretend you have everything extracted for now.
# TODO: GET RID OF THIS!!! We should mandate assets for Shindou like EU, but we don't have the addresses extracted yet, so we'll just pretend you have everything extracted for now.
NOEXTRACT := 1
else
$(error unknown version "$(VERSION)")
endif
endif
endif
endif

TARGET := sm64.$(VERSION)
VERSION_CFLAGS := -D$(VERSION_DEF) -D_LANGUAGE_C
Expand All @@ -155,38 +151,38 @@ ifeq ($(GRUCODE),f3dex) # Fast3DEX
GRUCODE_ASFLAGS := --defsym F3DEX_GBI_SHARED=1
TARGET := $(TARGET).f3dex
COMPARE := 0
else
ifeq ($(GRUCODE),f3dex2) # Fast3DEX2
else ifeq ($(GRUCODE),f3dex2) # Fast3DEX2
GRUCODE_DEF := F3DEX_GBI_2
GRUCODE_ASFLAGS := --defsym F3DEX_GBI_SHARED=1
TARGET := $(TARGET).f3dex2
COMPARE := 0
else
ifeq ($(GRUCODE),f3dex2e) # Fast3DEX2 Extended (PC default)
else ifeq ($(GRUCODE),f3dex2e) # Fast3DEX2 Extended (PC default)
GRUCODE_DEF := F3DEX_GBI_2E
TARGET := $(TARGET).f3dex2e
COMPARE := 0
else
ifeq ($(GRUCODE),f3d_new) # Fast3D 2.0H (Shindou)
else ifeq ($(GRUCODE),f3d_old) # Fast3D 2.0D (US, EU, JP)
GRUCODE_DEF := F3D_OLD
TARGET := $(TARGET).f3d_old
COMPARE := 0
else ifeq ($(GRUCODE),f3d_new) # Fast3D 2.0H (Shindou)
GRUCODE_DEF := F3D_NEW
TARGET := $(TARGET).f3d_new
COMPARE := 0
else
ifeq ($(GRUCODE),f3dzex) # Fast3DZEX (2.0J / Animal Forest - Dōbutsu no Mori)
else ifeq ($(GRUCODE),f3dzex) # Fast3DZEX (2.0J / Animal Forest - Dōbutsu no Mori)
$(warning Fast3DZEX is experimental. Try at your own risk.)
GRUCODE_DEF := F3DEX_GBI_2
GRUCODE_ASFLAGS := --defsym F3DEX_GBI_SHARED=1
TARGET := $(TARGET).f3dzex
COMPARE := 0
endif
endif
endif
endif
endif

GRUCODE_CFLAGS := -D$(GRUCODE_DEF)
GRUCODE_ASFLAGS := $(GRUCODE_ASFLAGS) --defsym $(GRUCODE_DEF)=1

ifeq ($(USE_UNUSED_PLAY_STATE),1)
TARGET := $(TARGET).unused_play_state_enabled
endif

# Default build is for PC now
VERSION_CFLAGS := $(VERSION_CFLAGS) -DNON_MATCHING -DAVOID_UB

Expand All @@ -195,7 +191,7 @@ ifeq ($(TARGET_RPI),1) # Define RPi to change SDL2 title & GLES2 hints
endif

ifeq ($(OSX_BUILD),1) # Modify GFX & SDL2 for OSX GL
VERSION_CFLAGS += -DOSX_BUILD
VERSION_CFLAGS += -DOSX_BUILD
endif

VERSION_ASFLAGS := --defsym AVOID_UB=1
Expand Down Expand Up @@ -227,8 +223,7 @@ endif
# on tools and assets, and we use directory globs further down
# in the makefile that we want should cover assets.)

ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),distclean)
ifeq (,$(findstring clean,$(MAKECMDGOALS)))

# Make sure assets exist
NOEXTRACT ?= 0
Expand All @@ -245,7 +240,6 @@ ifeq ($(DUMMY),FAIL)
$(error Failed to build tools)
endif

endif
endif

################ Target Executable and Sources ###############
Expand All @@ -262,18 +256,13 @@ endif
LIBULTRA := $(BUILD_DIR)/libultra.a

ifeq ($(TARGET_WEB),1)
EXE := $(BUILD_DIR)/$(TARGET).html
else
ifeq ($(WINDOWS_BUILD),1)
EXE := $(BUILD_DIR)/$(TARGET).exe

else # Linux builds/binary namer
ifeq ($(TARGET_RPI),1)
EXE := $(BUILD_DIR)/$(TARGET).arm
else
EXE := $(BUILD_DIR)/$(TARGET)
endif
endif
EXE := $(BUILD_DIR)/$(TARGET).html
else ifeq ($(WINDOWS_BUILD),1)
EXE := $(BUILD_DIR)/$(TARGET).exe
else ifeq ($(TARGET_RPI),1) # Linux builds/binary namer
EXE := $(BUILD_DIR)/$(TARGET).arm
else
EXE := $(BUILD_DIR)/$(TARGET)
endif

ELF := $(BUILD_DIR)/$(TARGET).elf
Expand Down Expand Up @@ -322,31 +311,29 @@ ifeq ($(TARGET_RPI),1)
machine = $(shell sh -c 'uname -m 2>/dev/null || echo unknown')
# Raspberry Pi B+, Zero, etc
ifneq (,$(findstring armv6l,$(machine)))
OPT_FLAGS := -march=armv6zk+fp -mfpu=vfp -Ofast
endif
OPT_FLAGS := -march=armv6zk+fp -mfpu=vfp -Ofast
endif

# Raspberry Pi 2 and 3 in ARM 32bit mode
ifneq (,$(findstring armv7l,$(machine)))
model = $(shell sh -c 'cat /sys/firmware/devicetree/base/model 2>/dev/null || echo unknown')

ifneq (,$(findstring 3,$(model)))
OPT_FLAGS := -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -O3
else
OPT_FLAGS := -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -O3
endif
endif
ifneq (,$(findstring armv7l,$(machine)))
model = $(shell sh -c 'cat /sys/firmware/devicetree/base/model 2>/dev/null || echo unknown')
ifneq (,$(findstring 3,$(model)))
OPT_FLAGS := -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -O3
else
OPT_FLAGS := -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -O3
endif
endif

# RPi3 or RPi4, in ARM64 (aarch64) mode. NEEDS TESTING 32BIT.
# DO NOT pass -mfpu stuff here, thats for 32bit ARM only and will fail for 64bit ARM.
ifneq (,$(findstring aarch64,$(machine)))
model = $(shell sh -c 'cat /sys/firmware/devicetree/base/model 2>/dev/null || echo unknown')
ifneq (,$(findstring 3,$(model)))
OPT_FLAGS := -march=armv8-a+crc -mtune=cortex-a53 -O3
else ifneq (,$(findstring 4,$(model)))
OPT_FLAGS := -march=armv8-a+crc+simd -mtune=cortex-a72 -O3
endif

endif
# DO NOT pass -mfpu stuff here, that's for 32bit ARM only and will fail for 64bit ARM.
ifneq (,$(findstring aarch64,$(machine)))
model = $(shell sh -c 'cat /sys/firmware/devicetree/base/model 2>/dev/null || echo unknown')
ifneq (,$(findstring 3,$(model)))
OPT_FLAGS := -march=armv8-a+crc -mtune=cortex-a53 -O3
else ifneq (,$(findstring 4,$(model)))
OPT_FLAGS := -march=armv8-a+crc+simd -mtune=cortex-a72 -O3
endif
endif
endif

# File dependencies and variables for specific files
Expand Down Expand Up @@ -468,8 +455,8 @@ ifeq ($(WINDOWS_BUILD),1) # fixes compilation in MXE on Linux and WSL
OBJDUMP := $(CROSS)objdump
else ifeq ($(OSX_BUILD),1)
CPP := cpp-9 -P
OBJDUMP := i686-w64-mingw32-objdump
OBJCOPY := i686-w64-mingw32-objcopy
OBJDUMP := i686-w64-mingw32-objdump
else # Linux & other builds
CPP := $(CROSS)cpp -P
OBJCOPY := $(CROSS)objcopy
Expand All @@ -484,7 +471,7 @@ SDLCONFIG := $(CROSS)sdl2-config
BACKEND_CFLAGS := -DRAPI_$(RENDER_API)=1 -DWAPI_$(WINDOW_API)=1 -DAAPI_$(AUDIO_API)=1
# can have multiple controller APIs
BACKEND_CFLAGS += $(foreach capi,$(CONTROLLER_API),-DCAPI_$(capi)=1)
BACKEND_LDFLAG0S :=
BACKEND_LDFLAGS :=

SDL1_USED := 0
SDL2_USED := 0
Expand Down Expand Up @@ -541,16 +528,15 @@ ifneq ($(SDL1_USED)$(SDL2_USED),00)
endif

ifeq ($(WINDOWS_BUILD),1)
CC_CHECK := $(CC) -fsyntax-only -fsigned-char $(BACKEND_CFLAGS) $(INCLUDE_CFLAGS) -Wall -Wextra -Wno-format-security $(VERSION_CFLAGS) $(GRUCODE_CFLAGS)
CC_CHECK := $(CC) -fsyntax-only -fsigned-char $(BACKEND_CFLAGS) $(INCLUDE_CFLAGS) -Wall -Wextra $(VERSION_CFLAGS) $(GRUCODE_CFLAGS)
CFLAGS := $(OPT_FLAGS) $(INCLUDE_CFLAGS) $(BACKEND_CFLAGS) $(VERSION_CFLAGS) $(GRUCODE_CFLAGS) -fno-strict-aliasing -fwrapv

else ifeq ($(TARGET_WEB),1)
CC_CHECK := $(CC) -fsyntax-only -fsigned-char $(BACKEND_CFLAGS) $(INCLUDE_CFLAGS) -Wall -Wextra -Wno-format-security $(VERSION_CFLAGS) $(GRUCODE_CFLAGS) -s USE_SDL=2
CC_CHECK := $(CC) -fsyntax-only -fsigned-char $(BACKEND_CFLAGS) $(INCLUDE_CFLAGS) -Wall -Wextra $(VERSION_CFLAGS) $(GRUCODE_CFLAGS) -s USE_SDL=2
CFLAGS := $(OPT_FLAGS) $(INCLUDE_CFLAGS) $(BACKEND_CFLAGS) $(VERSION_CFLAGS) $(GRUCODE_CFLAGS) -fno-strict-aliasing -fwrapv -s USE_SDL=2

# Linux / Other builds below
else
CC_CHECK := $(CC) -fsyntax-only -fsigned-char $(BACKEND_CFLAGS) $(INCLUDE_CFLAGS) -Wall -Wextra -Wno-format-security $(VERSION_CFLAGS) $(GRUCODE_CFLAGS)
else # Linux / Other builds below
CC_CHECK := $(CC) -fsyntax-only -fsigned-char $(BACKEND_CFLAGS) $(INCLUDE_CFLAGS) -Wall -Wextra $(VERSION_CFLAGS) $(GRUCODE_CFLAGS)
CFLAGS := $(OPT_FLAGS) $(INCLUDE_CFLAGS) $(BACKEND_CFLAGS) $(VERSION_CFLAGS) $(GRUCODE_CFLAGS) -fno-strict-aliasing -fwrapv

endif
Expand All @@ -564,6 +550,7 @@ ifeq ($(BETTERCAMERA),1)
EXT_OPTIONS_MENU := 1
endif

# Check for text saves option
ifeq ($(TEXTSAVES),1)
CC_CHECK += -DTEXTSAVES
CFLAGS += -DTEXTSAVES
Expand All @@ -581,10 +568,16 @@ ifeq ($(DISCORDRPC),1)
CFLAGS += -DDISCORDRPC
endif

# Check for texture fix option
ifeq ($(TEXTURE_FIX),1)
CC_CHECK += -DTEXTURE_FIX
CFLAGS += -DTEXTURE_FIX
# Check for QoL fix option
ifeq ($(QOL_FIXES),1)
CC_CHECK += -DQOL_FIXES
CFLAGS += -DQOL_FIXES
endif

# Check for unused play state option
ifeq ($(USE_UNUSED_PLAY_STATE),1)
CC_CHECK += -DUSE_UNUSED_PLAY_STATE
CFLAGS += -DUSE_UNUSED_PLAY_STATE
endif

# Check for extended options menu option
Expand Down Expand Up @@ -642,7 +635,7 @@ else ifeq ($(OSX_BUILD),1)

else
LDFLAGS := $(BITS) -march=$(TARGET_ARCH) -lm $(BACKEND_LDFLAGS) -lpthread -ldl
ifeq ($(NO_PIE), 1)
ifeq ($(NO_PIE),1)
LDFLAGS += -no-pie
endif

Expand Down Expand Up @@ -724,7 +717,7 @@ clean:
$(RM) -r $(BUILD_DIR_BASE)

cleantools:
$(MAKE) -s -C tools clean
$(MAKE) -C tools clean

distclean:
$(RM) -r $(BUILD_DIR_BASE)
Expand Down Expand Up @@ -770,8 +763,7 @@ $(BUILD_DIR)/levels/menu/leveldata.o: $(BUILD_DIR)/text/us/define_courses.inc.c
$(BUILD_DIR)/levels/menu/leveldata.o: $(BUILD_DIR)/text/de/define_courses.inc.c
$(BUILD_DIR)/levels/menu/leveldata.o: $(BUILD_DIR)/text/fr/define_courses.inc.c

else
ifeq ($(VERSION),sh)
else ifeq ($(VERSION),sh)
TEXT_DIRS := text/jp
$(BUILD_DIR)/bin/segment2.o: $(BUILD_DIR)/text/jp/define_text.inc.c

Expand All @@ -781,13 +773,12 @@ TEXT_DIRS := text/$(VERSION)
# non-EU encoded text inserted into segment 0x02
$(BUILD_DIR)/bin/segment2.o: $(BUILD_DIR)/text/$(VERSION)/define_text.inc.c
endif
endif

$(BUILD_DIR)/text/%/define_courses.inc.c: text/define_courses.inc.c text/%/courses.h
$(CPP) $(VERSION_CFLAGS) $< -o - -I text/$*/ | $(TEXTCONV) charmap.txt - $@

$(BUILD_DIR)/text/%/define_text.inc.c: text/define_text.inc.c text/%/courses.h text/%/dialogs.h
$(CPP) $(VERSION_CFLAGS) $< -o - -I text/$*/ | $(TEXTCONV) charmap.txt - $@
$(CPP) $(VERSION_CFLAGS) -Wno-trigraphs $< -o - -I text/$*/ | $(TEXTCONV) charmap.txt - $@

RSP_DIRS := $(BUILD_DIR)/rsp
ALL_DIRS := $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) $(ASM_DIRS) $(GODDARD_SRC_DIRS) $(ULTRA_SRC_DIRS) $(ULTRA_ASM_DIRS) $(ULTRA_BIN_DIRS) $(BIN_DIRS) $(TEXTURE_DIRS) $(TEXT_DIRS) $(SOUND_SAMPLE_DIRS) $(addprefix levels/,$(LEVEL_DIRS)) include) $(MIO0_DIR) $(addprefix $(MIO0_DIR)/,$(VERSION)) $(SOUND_BIN_DIR) $(SOUND_BIN_DIR)/sequences/$(VERSION) $(RSP_DIRS)
Expand Down Expand Up @@ -918,8 +909,13 @@ $(BUILD_DIR)/include/level_headers.h: levels/level_headers.h.in
$(BUILD_DIR)/assets/mario_anim_data.c: $(wildcard assets/anims/*.inc.c)
$(PYTHON) tools/mario_anims_converter.py > $@

ifneq ($(QOL_FIXES),1)
$(BUILD_DIR)/assets/demo_data.c: assets/demo_data.json $(wildcard assets/demos/*.bin)
$(PYTHON) tools/demo_data_converter.py assets/demo_data.json $(VERSION_CFLAGS) > $@
else
$(BUILD_DIR)/assets/demo_data.c: assets/qol_demo_data.json $(wildcard assets/demos/*.bin)
$(PYTHON) tools/demo_data_converter.py assets/qol_demo_data.json $(VERSION_CFLAGS) > $@
endif

# Source code
$(BUILD_DIR)/levels/%/leveldata.o: OPT_FLAGS := -g
Expand Down Expand Up @@ -996,7 +992,7 @@ $(BUILD_DIR)/%.o: %.s
$(EXE): $(O_FILES) $(MIO0_FILES:.mio0=.o) $(SOUND_OBJ_FILES) $(ULTRA_O_FILES) $(GODDARD_O_FILES) $(BUILD_DIR)/$(RPC_LIBS)
$(LD) -L $(BUILD_DIR) -o $@ $(O_FILES) $(SOUND_OBJ_FILES) $(ULTRA_O_FILES) $(GODDARD_O_FILES) $(LDFLAGS)

.PHONY: all clean distclean default diff test load libultra res
.PHONY: all clean distclean cleantools default diff test load libultra res
.PRECIOUS: $(BUILD_DIR)/bin/%.elf $(SOUND_BIN_DIR)/%.ctl $(SOUND_BIN_DIR)/%.tbl $(SOUND_SAMPLE_TABLES) $(SOUND_BIN_DIR)/%.s $(BUILD_DIR)/%
.DELETE_ON_ERROR:

Expand Down
4 changes: 1 addition & 3 deletions Makefile.split
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,11 @@ define level_rules =
$$(BUILD_DIR)/levels/$(1)/leveldata.elf: TEXTURE_BIN := $(2)
endef

ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),distclean)
ifeq (,$(findstring clean,$(MAKECMDGOALS)))
$(BUILD_DIR)/level_rules.mk: levels/level_rules.mk levels/level_defines.h
$(CPP) $(VERSION_CFLAGS) -I . -o $@ $<
include $(BUILD_DIR)/level_rules.mk
endif
endif

# --------------------------------------
# Extra Level Rules
Expand Down
Loading