1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 06:24:30 +00:00

Rework handling of dmadata (#1036)

* Generate dmadata

* Remove tab indentations in mkdmadata.c and mkldscript.c

* Fix

* Review suggestions

* Hopefully fix

* Fix index

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
Tharo 2021-11-30 23:29:09 +00:00 committed by GitHub
parent 783ef3a117
commit 04a9d51e90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 2034 additions and 3438 deletions

View file

@ -71,6 +71,7 @@ CC_CHECK := gcc -fno-builtin -fsyntax-only -fsigned-char -std=gnu90 -D _LANGUA
CPP := cpp
MKLDSCRIPT := tools/mkldscript
MKDMADATA := tools/mkdmadata
ELF2ROM := tools/elf2rom
ZAPD := tools/ZAPD/ZAPD.out
@ -172,9 +173,11 @@ $(ROM): $(ELF)
$(ELF): $(TEXTURE_FILES_OUT) $(ASSET_FILES_OUT) $(O_FILES) build/ldscript.txt build/undefined_syms.txt
$(LD) -T build/undefined_syms.txt -T build/ldscript.txt --no-check-sections --accept-unknown-input-arch --emit-relocs -Map build/z64.map -o $@
build/ldscript.txt: $(SPEC)
$(CPP) $(CPPFLAGS) $< > build/spec
$(MKLDSCRIPT) build/spec $@
build/$(SPEC): $(SPEC)
$(CPP) $(CPPFLAGS) $< > $@
build/ldscript.txt: build/$(SPEC)
$(MKLDSCRIPT) $< $@
build/undefined_syms.txt: undefined_syms.txt
$(CPP) $(CPPFLAGS) $< > build/undefined_syms.txt
@ -227,6 +230,12 @@ build/assets/%.o: assets/%.c
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
$(OBJCOPY) -O binary $@ $@.bin
build/dmadata_table_spec.h: build/$(SPEC)
$(MKDMADATA) $< $@
build/src/boot/z_std_dma.o: build/dmadata_table_spec.h
build/src/dmadata/dmadata.o: build/dmadata_table_spec.h
build/src/overlays/%.o: src/overlays/%.c
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
$(CC_CHECK) $<