Makefile wildcards!
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

1 Comments:
I found this site using [url=http://google.com]google.com[/url] And i want to thank you for your work. You have done really very good site. Great work, great site! Thank you!
Sorry for offtopic
Post a Comment
Subscribe to Post Comments [Atom]
<< Home