Hi all,
I was reading Paul Smith http://mad-scientist.net/make/vpath.html and
decided to test it with my simple example. I have 2 dirs - obj/ and src/
and pwd is src/
I don't understand why *my* step 3 is inconsistent with Paul's essay.
I started with clean slate.
$ cat Makefile1
VPATH = ../obj
fashion : fashion.c ready.o trendy.o
gcc $^ -o ../obj/$@
../obj/ready.o : ready.c
gcc -c $^ -o $@
@echo hi
../obj/trendy.o : trendy.c
gcc -c $^ -o $@
$ make -f Makefile1
gcc -c ready.c -o ../obj/ready.o
hi
gcc -c trendy.c -o ../obj/trendy.o
gcc fashion.c ../obj/ready.o ../obj/trendy.o -o ../obj/fashion
Why are my rules used instead of explict rules for creation of ready.o
and trendy.o?
Thanks a lot in advance.
With warm regards,
-Payal
--
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make