Using make

From: JS (d44sf_at_44ada.com)
Date: 03/28/05


Date: Mon, 28 Mar 2005 21:16:50 +0200

I have a c file called test.c

I have then made a Makefile that looks like this:

blop : test.c
        gcc -g -Wall test.c

When I type "make test" it compiles the test.c file and generates a test
executable file. But I thought make would only look for the target (blop),
and if no such target is found it would give an error.

Why does it compile test.c when I don't have a test target in my Makefile?

JS



Relevant Pages

  • Re: headerfiles and make?
    ... when I type make it compiles fine eventhough I don't write any dependency on ... How can I compile using the above makefile when types.h is not ... The second tas is to actually remake the target, ... you have to make sure that you have the correct dependency list e.g. ...
    (comp.unix.programmer)
  • Re: Using make
    ... >> and if no such target is found it would give an error. ... > case the target is blop. ... > you added -o blop to your gcc command it would do what make expects.) ... I tried the OP's makefile on Solaris, ...
    (comp.unix.programmer)
  • Re: Using make
    ... But I thought make would only look for the target (blop), ... > Why does it compile test.c when I don't have a test target in my Makefile? ... gcc command in an attempt to make 'blop' the file. ...
    (comp.unix.programmer)
  • Re: gtk+
    ... The Makefile supplied with gtkglext compiles the ... shouldn't start OpenGL yet. ...
    (comp.graphics.api.opengl)
  • Module building oddities with <module>-objs under Kernel 2.6.8.1
    ... The module compiles fine with the following Makefile, ... not compiled using datasim-objs: in the makefile). ... I find it odd that if i compile with the datasim-objs stuff that i can't ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)