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

Need to run make twice on macOS 10.15.7 #5

Open
proximitysound opened this issue Nov 15, 2021 · 4 comments
Open

Need to run make twice on macOS 10.15.7 #5

proximitysound opened this issue Nov 15, 2021 · 4 comments

Comments

@proximitysound
Copy link

proximitysound commented Nov 15, 2021

This is not so much an issue as it is a workaround if anyone sees this, but running make the first time always seems to fail, but running it a second time builds successfully on my system. I'm on macOS 10.15.7

Love this tool!

@rondnelson99
Copy link
Owner

Thanks, that's a good PSA. I'm honestly surprised that it mostly works fine on MacOS without any tweaking. I'm happy you like the tool!

@proximitysound
Copy link
Author

proximitysound commented Nov 15, 2021

I found one issue that can be improved by the way. Going to try and solve it myself, but in the makefile, line 151 uses the hardcoded lsdj.s filename, but if the ROM supplied has a different name it will fail as the output is romname.s. I am guessing this is important as it states it can be supplied multiple ROMs as a space separated list.

Edit: This is how I worked around it:

res/lsdj.song: lsdpack/lsdpack${EXE} src/res/$(LSDJ_ROMS).gb
	@$(MKDIR_P) $(@D)
	$^
	$(MV) $(LSDJ_ROMS).s $@

The idea here was to enter the ROM name in the kit_config.mk and not the full path similar to how the pngs are listed in the kit_config.inc, but this doesn't work with multiple ROMS, though I believe there is a flag in lsdpack to solve this.

@proximitysound
Copy link
Author

Looking a bit more into it, lsdpack will export all songs into a single romname.s file, with the first ROM's filename.

I'm sure there's some string manipulation that can be done to sort through this, I am just not strong with makefiles.

@proximitysound
Copy link
Author

proximitysound commented Nov 15, 2021

Here's how I can get the makefile to parse through multiple ROMs, but this still causes an issue with regards to the covers.asm iterating through the number of songs.

LIST_ROM = $(foreach LSDJ_ROMS, $(LSDJ_ROMS), src/res/$(LSDJ_ROMS).gb)

res/lsdj.song: lsdpack/lsdpack${EXE} $(LIST_ROM)
	@$(MKDIR_P) $(@D)
	$^
	$(MV) $(word 1, $(LSDJ_ROMS)).s $@

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants