This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]