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
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!
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)