![]() |
|
#1
|
|||
|
|||
I need some help with my makefile programI have a program which is built of main.c utils.h and utils.c.
utils contains all the functions I've used. I wrote this makefile: Code:
make: `a.out' is up to date. can someone explain what is wrong with this makefile and how a working one should look like? |
|||
|
#2
|
|||
|
|||
Re: I need some help with my makefile programQuote:
Maybe it's telling you that a.out is up to date. (In other words none of the other files has been changed since the last time a.out was created/modified.) The whole idea is that the make program only does as much work as it needs to do. If target files have later timestamps than their dependencies, those rules are not executed. Do the files main.o and utils.o and a.out exist in that directory? What are the timestamps for utils.c, main.c, utils.o, main.o, a.out? (Just do "ls -l" at the command line and look at the times listed for each file.) Try pasting the following lines at the bottom of your Makefile: Code:
Then enter the following on your command line: Code:
Then Code:
Experiment with touching one or both of the source files and/or deleting one or both of the .o files and/or deleting a.out. Try make after each thing that you try. Regards, Dave |
|
#3
|
|||
|
|||
Re: I need some help with my makefile programthank you for your help.
|
Recent GIDBlog
Not selected for officer school by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Two-Tier data dissemination code installation problem | nidhibansal1984 | Computer Software Forum - Linux | 6 | 16-Sep-2007 10:13 |
| malloc/free usage, and general good programming behavior | lavaka | C Programming Language | 7 | 14-Jun-2007 19:50 |
| Text-Based Roulette Game | mfm1983 | C++ Forum | 5 | 29-Nov-2006 12:20 |
| BOOKEEPING program, HELP!! | yabud | C Programming Language | 10 | 17-Nov-2006 03:48 |
| Pipeline freeze simulation | darklightred | C++ Forum | 6 | 27-Jul-2006 19:37 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The