#132474 - HyperHacker - Wed Jun 27, 2007 3:48 am
I'm trying to learn how to use makefiles, and I found a decent tutorial, but I cannot for the life of me comprehend this problem. Here is my makefile (the filename should just be "makefile" right?):
And arm7.c:
arm9.c isn't important because it never gets there. >_> When I type "make" I get this:
Now the part that makes no sense at all is if I just run that command directly, it finds nds.h and compiles fine. So, uh, WTF? Why does it seem to ignore the -I parameter when called by make?
_________________
I'm a PSP hacker now, but I still <3 DS.
Code: |
# Path to libnds
LIBNDS = F:\DOS\DevKitPro\libnds PROGRAM = test OPTIONS = -fomit-frame-pointer -ffast-math -fno-exceptions -fno-rtti CXX = arm-eabi-g++ CXXFLAGS_7 = -g -mcpu=arm7tdmi -mtune=arm7tdmi -mthumb-interwork -I${LIBNDS}\include -DARM7 ${OPTIONS} CXXFLAGS_9 = -g -mcpu=arm9tdmi -mtune=arm9tdmi -mthumb-interwork -I${LIBNDS}\include -DARM9 ${OPTIONS} test: arm7.o arm9.o echo whee arm7.o: arm7.c # ${CXX} ${CXXFLAGS_7} -c arm7.c -o arm7.o arm-eabi-g++ -g -mcpu=arm7tdmi -mtune=arm7tdmi -mthumb-interwork -IF:\DOS\DevKitPro\libnds\include -DARM7 -fomit-frame-pointer -ffast-math -fno-exceptions -fno-rtti -c arm7.c -o arm7.o arm9.o: arm9.c ${CXX} ${CXXFLAGS_9} -c arm9.c -o arm9.o |
And arm7.c:
Code: |
#include <nds.h>
int main(int argc, char** argv) { while(true); } |
arm9.c isn't important because it never gets there. >_> When I type "make" I get this:
Code: |
arm-eabi-g++ -g -mcpu=arm7tdmi -mtune=arm7tdmi -mthumb-interwork -IF:\DOS\DevKitPro\libnds\include -DARM7 -fomit-frame-pointer -ffast-math -fno-exceptions -fno-rtti -c arm7.c -o arm7.o
arm7.c:1:17: error: nds.h: No such file or directory make: *** [arm7.o] Error 1 |
Now the part that makes no sense at all is if I just run that command directly, it finds nds.h and compiles fine. So, uh, WTF? Why does it seem to ignore the -I parameter when called by make?
_________________
I'm a PSP hacker now, but I still <3 DS.