[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Why make isn't running linker
From: |
sharan basappa |
Subject: |
Why make isn't running linker |
Date: |
Tue, 12 Jun 2007 10:32:18 +0000 |
I seem to be having trouble creating executable from object file using
implicit rule.
This is the chunk of make file ..
all:
include dir1/dir1.mk
objects := $(subst .c,.o,$(sources));
.PHONY : all
all : main
main : main.o $(objects)
.PHONY : clean_all
I am expecting make to link object files and main.o from the rule
main : main.o $(objects) and create main executable.
Make seems to process every rule as expected but does not run
the linker for this implicit rule ..
The output from make with --debug=verbose option is below
Reading makefiles...
Reading makefile `SmallPrjMain.mk'...
Reading makefile `dir1/dir1.mk' (search path) (no ~ expansion)...
Updating goal targets....
Considering target file `all'.
File `all' does not exist.
Considering target file `main'.
File `main' does not exist.
Considering target file `main.o'.
File `main.o' does not exist.
Considering target file `main.c'.
Finished prerequisites of target file `main.c'.
No need to remake target `main.c'.
Finished prerequisites of target file `main.o'.
Must remake target `main.o'.
cc -Ilib -Iinclude -c -o main.o main.c
Successfully remade target file `main.o'.
Considering target file `dir1/print1dir1.o'.
File `dir1/print1dir1.o' does not exist.
Considering target file `dir1/print1dir1.c'.
Finished prerequisites of target file `dir1/print1dir1.c'.
No need to remake target `dir1/print1dir1.c'.
Finished prerequisites of target file `dir1/print1dir1.o'.
Must remake target `dir1/print1dir1.o'.
cc -Ilib -Iinclude -c -o dir1/print1dir1.o dir1/print1dir1.c
Successfully remade target file `dir1/print1dir1.o'.
Considering target file `dir1/print2dir1.o'.
File `dir1/print2dir1.o' does not exist.
Considering target file `dir1/print2dir1.c'.
Finished prerequisites of target file `dir1/print2dir1.c'.
No need to remake target `dir1/print2dir1.c'.
Finished prerequisites of target file `dir1/print2dir1.o'.
Must remake target `dir1/print2dir1.o'.
cc -Ilib -Iinclude -c -o dir1/print2dir1.o dir1/print2dir1.c
Successfully remade target file `dir1/print2dir1.o'.
Finished prerequisites of target file `main'.
Must remake target `main'.
Successfully remade target file `main'.
Finished prerequisites of target file `all'.
Must remake target `all'.
Successfully remade target file `all'.
_________________________________________________________________
Voice your questions and our experts will answer them
http://content.msn.co.in/Lifestyle/AskExpert/Default01.htm
- Why make isn't running linker,
sharan basappa <=