#171146 - headspin - Tue Nov 03, 2009 2:48 am
I'm trying to modify a makefile to compile an EFS or FAT version based on the following:
I can get this to work in the Makefile itself like so:
But for some reason in the arm9 main.s the EFS value does not seem to be set..
So that is always failing to see if EFS is set to "1" in the makefile. On the other hand if I do a "#define EFS 1" at the start of main.s then it will be set and do what it's supposed to do.
Why isn't the environment variable set in the Makefile registered in the pre-processor commands in main.s? The Makefile in question is the main one, not the one for the arm7 or arm9 so it should be set before compiling main.s in arm9 right?
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game
Code: |
EFS := 1 |
I can get this to work in the Makefile itself like so:
Code: |
$(TARGET).nds : $(TARGET).arm7 $(TARGET).arm9
ifeq ($(EFS), 1) ndstool -c $(TARGET).nds -7 $(TARGET).arm7 -9 $(TARGET).arm9 $(NITRODIR) $(LOGO) $(ICON) "$(NAME);$(AUTHOR);$(VERSION)" efs $(TARGET).nds else ndstool -c $(TARGET).nds -7 $(TARGET).arm7 -9 $(TARGET).arm9 $(LOGO) $(ICON) "$(NAME);$(AUTHOR);$(VERSION)" endif |
But for some reason in the arm9 main.s the EFS value does not seem to be set..
Code: |
#if (EFS == 1)
mov r0, #(EFS_AND_FAT | EFS_DEFAULT_DEVICE) @ Init EFS mov r1, #0 bl EFS_Init #else bl fatInitDefault @ Init FAT #endif |
So that is always failing to see if EFS is set to "1" in the makefile. On the other hand if I do a "#define EFS 1" at the start of main.s then it will be set and do what it's supposed to do.
Why isn't the environment variable set in the Makefile registered in the pre-processor commands in main.s? The Makefile in question is the main one, not the one for the arm7 or arm9 so it should be set before compiling main.s in arm9 right?
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game