Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!pacbell.com!att!ucbvax!SCT60A.SUNYCT.EDU!sweetmr From: sweetmr@SCT60A.SUNYCT.EDU (michael sweet) Newsgroups: comp.sys.sgi Subject: Re: Makefile madness Message-ID: <2353.on.Mon,.18.Mar.91.17:30:48.EST.@sct60a.sunyct.edu> Date: 18 Mar 91 22:30:48 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 26 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@sct60a.sunyct.edu truths, only beliefs." Delphi: DODGECOLT ------------------------------------------------------------------------------