makefiles
Tim Brown
tim at comcon.UUCP
Tue Jun 12 12:10:32 AEST 1990
I have been wrestling with this problem, I *have* RTFM and still I am
a little confused. I wrote some functions and put them into a
library. Can someone suggest the best way to maintain the library
with as few lines as possible but still maintain it the same way as
individually targeted objects?
I do it like this now:
replace.o: replace.c $(includes)
cc $(CFLAGS) -c replace.c
[ many other functions set up just like the first ]
libccd.a: $(objs) /* All the .o's */
ar rv libccd.a $(objs)
This works but is error prone and tedious to change, any ideas?
I tried this:
libccd: $(objs) .... where objs are like, libccd(replace.o)...
@echo Library up to date!
The above is from the manual and seems to work ok, but make doesn't
see changes in the .c files this way. What am I missing? The book
says something about a $% macro but gives no example.
Thanks in advance. I would like email replies on this whether or not
you post a followup.
Tim Brown
{}!nstar!comcon!tim
More information about the Comp.lang.c
mailing list