Help in creating a makefile

Hi,
I wanted to know whether there is any way to specify in a makefile how to compile sources from a directory directly by giving the directory path name instead of mentioning each and every source file name.

Regards,
Anil

I think you're a bit confused. A makefile describes its targets; unless you're making source files, you shouldn't be giving it source files in the first place.

---------- Post updated at 01:13 PM ---------- Previous update was at 10:33 AM ----------

Thought of one way to fake it the way you want it.

target:directory/*.c
        $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@

This won't build in parallel, do partial rebuilds, or any other of the nice things people use makefiles to do. But it will do what you want.