#67977 - Rinky - Sat Jan 21, 2006 9:20 pm
I have to say that despite having been programming since I was a very young kid (on all manner of systems) makefiles always give me grief.
I'm stuck. I tend to use the DS makefile examples from DoubleC
For example:
(and expand on them as needed) but I can't figure out how to link in an assembly .s file.
One of my test ARM9 programs declares an extern reference to a bunch of assembly in a .s file. But the compiler (understandably) says it can't find the code.
Would anyone mind putting me out of my misery? :)
I'm stuck. I tend to use the DS makefile examples from DoubleC
For example:
Code: |
# Makefile for demo1.nds # DoubleC [Removed the email address for posting] NDSLIB_INCLUDE=$(DEVKITPRO)/libnds/include NDSLIB_LIB=$(DEVKITPRO)/libnds/lib all: demo1.nds.gba arm7_main.o: arm7_main.cpp arm-elf-g++ -g -Wall -O2 -mcpu=arm7tdmi -mtune=arm7tdmi -fomit-frame-pointer -ffast-math -mthumb-interwork -I$(NDSLIB_INCLUDE) -DARM7 -c arm7_main.cpp -oarm7_main.o arm7.elf: arm7_main.o arm-elf-g++ -g -mthumb-interwork -mno-fpu -specs=ds_arm7.specs arm7_main.o -L$(NDSLIB_LIB) -lnds7 -oarm7.elf arm7.bin: arm7.elf arm-elf-objcopy -O binary arm7.elf arm7.bin arm9_main.o: arm9_main.cpp arm-elf-g++ -g -Wall -O2 -mcpu=arm9tdmi -mtune=arm9tdmi -fomit-frame-pointer -ffast-math -mthumb-interwork -I$(NDSLIB_INCLUDE) -DARM9 -c arm9_main.cpp -oarm9_main.o arm9.elf: arm9_main.o arm-elf-g++ -g -mthumb-interwork -mno-fpu -specs=ds_arm9.specs arm9_main.o -L$(NDSLIB_LIB) -lnds9 -o arm9.elf arm9.bin: arm9.elf arm-elf-objcopy -O binary arm9.elf arm9.bin demo1.nds: arm7.bin arm9.bin ndstool -c demo1.nds -9 arm9.bin -7 arm7.bin demo1.nds.gba: demo1.nds dsbuild demo1.nds -o demo1.nds.gba clean: rm -f *.bin rm -f *.elf rm -f *.o rm -f *~ |
(and expand on them as needed) but I can't figure out how to link in an assembly .s file.
One of my test ARM9 programs declares an extern reference to a bunch of assembly in a .s file. But the compiler (understandably) says it can't find the code.
Would anyone mind putting me out of my misery? :)