Coalesced audio rules into audio.mk
This commit is contained in:
parent
85f4ca6943
commit
cf1eaea7f7
2 changed files with 24 additions and 9 deletions
9
Makefile
9
Makefile
|
@ -86,8 +86,6 @@ DATA_SRC_SUBDIR = src/data
|
|||
DATA_ASM_SUBDIR = data
|
||||
SONG_SUBDIR = sound/songs
|
||||
MID_SUBDIR = sound/songs/midi
|
||||
SAMPLE_SUBDIR = sound/direct_sound_samples
|
||||
CRY_SUBDIR = sound/direct_sound_samples/cries
|
||||
|
||||
C_BUILDDIR = $(OBJ_DIR)/$(C_SUBDIR)
|
||||
GFLIB_BUILDDIR = $(OBJ_DIR)/$(GFLIB_SUBDIR)
|
||||
|
@ -263,7 +261,7 @@ include graphics_file_rules.mk
|
|||
include map_data_rules.mk
|
||||
include spritesheet_rules.mk
|
||||
include json_data_rules.mk
|
||||
include songs.mk
|
||||
include audio_rules.mk
|
||||
|
||||
%.s: ;
|
||||
%.png: ;
|
||||
|
@ -277,8 +275,6 @@ include songs.mk
|
|||
%.gbapal: %.png ; $(GFX) $< $@
|
||||
%.lz: % ; $(GFX) $< $@
|
||||
%.rl: % ; $(GFX) $< $@
|
||||
$(CRY_SUBDIR)/%.bin: $(CRY_SUBDIR)/%.aif ; $(AIF) $< $@ --compress
|
||||
sound/%.bin: sound/%.aif ; $(AIF) $< $@
|
||||
|
||||
|
||||
ifeq ($(MODERN),0)
|
||||
|
@ -393,9 +389,6 @@ $(foreach src, $(REGULAR_DATA_ASM_SRCS), $(eval $(call SRC_ASM_DATA_DEP,$(patsub
|
|||
endif
|
||||
endif
|
||||
|
||||
$(SONG_BUILDDIR)/%.o: $(SONG_SUBDIR)/%.s
|
||||
$(AS) $(ASFLAGS) -I sound -o $@ $<
|
||||
|
||||
$(OBJ_DIR)/sym_bss.ld: sym_bss.txt
|
||||
$(RAMSCRGEN) .bss $< ENGLISH > $@
|
||||
|
||||
|
|
|
@ -1,6 +1,28 @@
|
|||
# This file contains rules for making assemblies for most music in the game.
|
||||
|
||||
MID_ASM_DIR = $(MID_SUBDIR)
|
||||
CRY_SUBDIR := sound/direct_sound_samples/cries
|
||||
|
||||
MID_ASM_DIR := $(MID_SUBDIR)
|
||||
CRY_BIN_DIR := $(CRY_SUBDIR)
|
||||
SOUND_BIN_DIR := sound
|
||||
|
||||
SPECIAL_OUTDIRS := $(MID_ASM_DIR) $(CRY_BIN_DIR)
|
||||
SPECIAL_OUTDIRS += $(SOUND_BIN_DIR) $(SOUND_BIN_DIR)/direct_sound_samples/phonemes $(SOUND_BIN_DIR)/direct_sound_samples/cries
|
||||
$(shell mkdir -p $(SPECIAL_OUTDIRS) )
|
||||
|
||||
# Assembly song compilation
|
||||
$(SONG_BUILDDIR)/%.o: $(SONG_SUBDIR)/%.s
|
||||
$(AS) $(ASFLAGS) -I sound -o $@ $<
|
||||
$(MID_BUILDDIR)/%.o: $(MID_ASM_DIR)/%.s
|
||||
$(AS) $(ASFLAGS) -I sound -o $@ $<
|
||||
|
||||
# Compressed cries
|
||||
$(CRY_BIN_DIR)/%.bin: $(CRY_SUBDIR)/%.aif
|
||||
$(AIF) $< $@ --compress
|
||||
|
||||
# Uncompressed sounds
|
||||
$(SOUND_BIN_DIR)/%.bin: sound/%.aif
|
||||
$(AIF) $< $@
|
||||
|
||||
# For each line in midi.cfg, we do some trickery to convert it into a make rule for the `.mid` file described on the line
|
||||
# Data following the colon in said file corresponds to arguments passed into mid2agb
|
Loading…
Reference in a new issue