Two questions..
First off, I have noticed that a lot of big projects allow the user
to pick a malloc(), for example:
# Chose one of these mallocs:
MALLOC=smalloc
#
# Gnu malloc, fastest but uses most memory.
#MALLOC=gmalloc
etc.. etc..
but then they use malloc() in the actual code, not something like
mymalloc() which is then #defined to the proper malloc.. even so,
most of the malloc packages I have seen (like gnumalloc) have the
malloc function in them, not something else (like gmalloc()) so
how do I keep from getting the compiler errors about redefining
malloc()??
Secondly, how can I redefine a default inference rule in a makefile
to have extra dependencies, for example, from:
.c.o:
$(CC) $(CFLAGS) -c $<
to:
.c.o: config.h
$(CC) $(CFLAGS) -c $<
So if I change the config.h file, all the .c files need to be recompiled.
Any ideas? Please email me.. I don't do 'rn' :)
Dave
------------------------------------------------------------------ (__) ----
David Ljung 310 S. Bassett St. oo )
Spawning Cow! Productions Madison, WI. 53703 moo. |_/\
----------------= I program in C because it turns women on. =-----------------