[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Paul's VPATH example
From: |
Payal |
Subject: |
Paul's VPATH example |
Date: |
Sun, 9 May 2010 02:04:36 -0700 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
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
--
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Paul's VPATH example,
Payal <=