For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > February 2006 > make: *** No rule to make target `all'. Stop.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author make: *** No rule to make target `all'. Stop.
Johs32

2006-02-24, 3:57 am

I use eclipse as my editor for C. I have then made a Standard Make C Project
and made my own makefile which I put in the same dir as my source code. I
contains:

qsort: qsort.c
gcc qsort.c -o qsort -pthread

In eclipse I have then specified "build command" to make qsort. When I build
I can see it uses my makefile but I get this error:

make qsort all
make: `qsort' is up to date.
make: *** No rule to make target `all'. Stop.

How do I get rid of the last error?

Johs
Robert Harris

2006-02-24, 7:57 am

Johs32 wrote:
> I use eclipse as my editor for C. I have then made a Standard Make C Project
> and made my own makefile which I put in the same dir as my source code. I
> contains:
>
> qsort: qsort.c
> gcc qsort.c -o qsort -pthread
>
> In eclipse I have then specified "build command" to make qsort. When I build
> I can see it uses my makefile but I get this error:
>
> make qsort all
> make: `qsort' is up to date.
> make: *** No rule to make target `all'. Stop.
>
> How do I get rid of the last error?
>
> Johs


Just add a line:

all: qsort

in the Makefile.
Johs32

2006-02-24, 7:57 am

Robert Harris wrote:

> Johs32 wrote:
>
> Just add a line:
>
> all: qsort
>
> in the Makefile.



I have tried that but if I change qsort.c and do make all I get this error:

johs@ubuntu:~/del2$ make all
cc qsort.c -o qsort
/tmp/cc42Zr95.o: In function `quicksort':
qsort.c:(.text+0x2bf): undefined reference to `pthread_create'
collect2: ld returned 1 exit status
make: *** [qsort] Error 1
johs@ubuntu:~/del2$

but if I first do "make qsort" followed by "make all" I get no error. This
is my makefile:

all: qsort
qsort: qsort.c
gcc qsort.c -o qsort -pthread
Maurizio Loreti

2006-02-24, 7:57 am

Johs32 <dfgdg@dsf.com> writes:

> I use eclipse as my editor for C. I have then made a Standard Make C Project
> and made my own makefile which I put in the same dir as my source code. I
> contains:
>
> qsort: qsort.c
> gcc qsort.c -o qsort -pthread
>
> In eclipse I have then specified "build command" to make qsort. When I build
> I can see it uses my makefile but I get this error:
>
> make qsort all
> make: `qsort' is up to date.
> make: *** No rule to make target `all'. Stop.
>
> How do I get rid of the last error?


Can you read? Or define a target "all", or don't ask to "make all".

--
Maurizio Loreti http://www.pd.infn.it/~loreti/mlo.html
Dept. of Physics, Univ. of Padova, Italy ROT13: ybergv@cq.vasa.vg
Ralf Fassel

2006-02-24, 7:57 am

* Johs32 <dfgdg@dsf.com>
| I have tried that but if I change qsort.c and do make all I get this
| error:

Why do you need to have 'all' as a target at all? Seems like 'qsort'
would be all that you need.

R'
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com