Blogging after a very long gap!
There came a need to compile all the c files in directory.Learnt that i need to make use of wildcards
a makefile to compile all C source files in the directory and then link them together could be written as follows:
objects := $(patsubst %.c,%.o,$(wildcard *.c))
foo : $(objects)
cc -o foo $(objects)
and a few pointers as usual
[1] http://www.metalshell.com/view/tutorial/120/
[2] http://theory.uwinnipeg.ca/localfiles/infofiles/make/make_25.html
[3] http://www.gnu.org/software/make/manual/make.html
Labels: makefile