This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: Problems with make
- From: "Rupert Wood" <me at rupey dot net>
- To: <kabir dot patel at uk dot andersen dot com>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: Mon, 28 Jan 2002 11:41:37 -0000
- Subject: RE: Problems with make
Kabir Patel wrote:
> The makefile has the following :
>
> ex2: ex1.c
> gcc ex1.c -o ex2
>
> and nothing else.
> When I run >>make makefile
> I always get the same message, namely:
>
> make: Nothing to be done for `makefile'.
You need to tell make what you'd like it to build. If you don't specify
anything then it assumes a target 'all' which doesn't exist in your
makefile.
You either need to:
make ex2
or add an 'all' target to the makefile which references ex2, e.g.
ex2: ex1.c
gcc ex1.c -o ex2
all: ex2
You may wish to investigate the GNU automake project which simplifies
generation of complex makefiles.
Rup.