Makefile madness
michael sweet
sweetmr at SCT60A.SUNYCT.EDU
Tue Mar 19 08:30:48 AEST 1991
What I do in my makefiles is something like the following:
OBJS = .o files...
..
depend: $(OBJS:.o=.c)
makedepend -- $(CFLAGS) -- $(OBJS:.o=.c)
By using the modifier on the OBJS variable, I only have to maintain a
single list of object files. For automated RCS updates, I also have a
list of header files which goes along with the OBJS... Also, if you do
mixed-language work, you can define say FOBJS for FORTRAN stuff, and
COBJS for C stuff. Oh, if you _do_ do mixed-language programming, I
have a little shell script which will generate FORTRAN dependencies for
you. It works in conjunction with makedepend (for any C files) to generate
a new dependency list.
-Mike Sweet
------------------------------------------------------------------------------
"The only TASC (315) 724-1100 (voice)
truth is that 555 French Road (315) 724-2031 (fax)
there are no New Hartford, NY 13413 Internet: sweetmr at sct60a.sunyct.edu
truths, only beliefs." Delphi: DODGECOLT
------------------------------------------------------------------------------
More information about the Comp.sys.sgi
mailing list