Makefile dependencies

This is a discussion on Makefile dependencies within the C Programming forums, part of the General Programming Boards category; Hi Im a bit confused on makefile dependencies. In the following makefile what are the dependencies? Code: miles: miles.o conversion.o ...

  1. #1
    Registered User
    Join Date
    Aug 2007
    Posts
    270

    Makefile dependencies

    Hi
    Im a bit confused on makefile dependencies. In the following makefile what are the dependencies?
    Code:
    miles: miles.o conversion.o milesIO.o
             gcc –o miles miles.o conversion.o milesIO.o
    miles.o: miles.c miles.h
             gcc –c miles.c
    milesIO.o: milesIO.c miles.h
             gcc –c milesIO.c
    conversion.o:conversion.c
             gcc –c conversion.c
    clean:
             rm miles miles.o milesIO.o conversion.o
    Is it everything after the colon? EG: miles.c miles.h
    Last edited by taurus; 11-08-2008 at 11:13 PM.

  2. #2
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Yes.
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with makefile
    By New_Programmer in forum C++ Programming
    Replies: 5
    Last Post: 03-31-2009, 04:55 PM
  2. Building a project using a Makefile
    By starcatcher in forum Windows Programming
    Replies: 2
    Last Post: 11-23-2008, 10:50 PM
  3. Need help with Makefile
    By xshapirox in forum C++ Programming
    Replies: 14
    Last Post: 09-28-2004, 03:32 PM
  4. makefile dependencies (again)
    By *ClownPimp* in forum Linux Programming
    Replies: 2
    Last Post: 05-06-2002, 03:13 AM
  5. makefile dependencies
    By *ClownPimp* in forum C++ Programming
    Replies: 7
    Last Post: 05-01-2002, 11:33 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21