Keil™, An ARM® Company

Discussion Forum

Makefile help!

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
Gary Partis
Posted
22-Jan-2003 12:39 GMT
Toolset
C51
New! Makefile help!
I have a directory full of C files, of which everyone needs compiled.

I then need to add all the resultant OBJ files to LIB file.

Is there an easy way to do this with a MAKEFILE using MS NMAKE.

The problem I am having is specifting wildcards....

TIA

Gary
Read-Only
Author
Andrew Neil
Posted
22-Jan-2003 20:30 GMT
Toolset
C51
New! RE: Makefile help!
For help with MS NMAKE, I think you need to go to a Microsoft forum! ;-)

Any particular reason why you can't/don't want to do this in uVision?
It'd be a doddle to just select all the files and add them all at once to a Project!
Read-Only
Author
Shane Griffin
Posted
22-Jan-2003 20:30 GMT
Toolset
C51
New! RE: Makefile help!
To build the object files you can use an inference rule, as in the following makefile snippet:

# Source directory
S = .

# Output directory
O = ./objs

# Inference rule
{$S}.c{$(O)}.obj:
   C51 %s $(C51_OPTS) OBJECT($(O)/%|fF.obj)

I don't know any shortcut for linking all of the resultant object files, though.

Shane.

Next Thread | Thread List | Previous Thread Start a Thread | Settings