> From: Vinay Ramdas Revankar <[EMAIL PROTECTED]>
> Date: Mon, 23 Apr 2007 11:02:04 +0530
>
> Please can any one tell me how to change the directory in the
> Makefile .I am using gmake to build a libray on windows-xp.
> i tread this but it is not working.
>
>
> obje=D:\project\obj
> lib=D:\project\lib
> target=MSM.lib
> src:=$(wildcard D:\project\MSM\src/*.c)
>
>
> $(lib)\$(target) : $(src)
> cd $(obje)
> armcc -c -O0 -g --cpu ARM1136J-S --apcs /inter --dwarf2 $(src)
Try this instead:
$(lib)\$(target) : $(src)
cd $(obje) && armcc -c -O0 -g --cpu ARM1136J-S --apcs /inter --dwarf2
$(src)
The problem here is that each command line is executed in a separate
shell, so `cd' does not affect the compilation command.
Btw, I would generally advise against using backslashes in gmake
Makefiles. Use forward slashes instead, because backslashes are
treated as escape characters in some Makefile contexts, and using them
will almost certainly get you in trouble at some point. By contrast,
forward slashes are supported by Windows filesystems as well (but you
may need to take them in quotes on some command lines).
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make