Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!bloom-beacon!gatech!pyr!joel From: joel@pyr.gatech.EDU (Joel Rives) Newsgroups: comp.windows.x Subject: Re: Multiple targets with one source Message-ID: <4306@pyr.gatech.EDU> Date: Wed, 28-Oct-87 11:41:13 EST Article-I.D.: pyr.4306 Posted: Wed Oct 28 11:41:13 1987 Date-Received: Sat, 31-Oct-87 08:05:45 EST References: <2496@calmasd.GE.COM> Reply-To: joel@pyr.UUCP (Joel Rives) Organization: Office of Computing Services, Georgia Tech Lines: 43 There is no need to rewrite the rules for 'make' to do what you are seeking to do. First, it is only necissary to remove object files which will be using an include file that has been altered. Secondly, it is possible to have entries in your 'Makefile' -- one for each system that you wish to rebuild 'X' for such that it saves and retrieves the appropriate object files from specific subdirectories. Here's an exmaple that I have just thrown together of the top of my head. There is probably a more efficient way to do this but it shows the general idea. # # Makefile example # CFLAGS = -g OBJS = ( list of object files) vax: setvax $(OBJDIR)/$(OBJS) cc $(CFLAGS) -o X $(OBJDIR)/$(OBJS) setvax: vaxobj/$(OBJS) OBJDIR = vaxobj sun: setsun $(OBJDIR)/$(OBJS) cc $(CFLAGS) -o X $OBJDIR)/$(OBJS) setsun: sunobj/$(OBJS) OBJDIR = sunobj foo.o: foo.c bar.h cc $(CFLAGS) foo.c mv foo.o $(OBJDIR) ============================================================ Joel Rives -- The thief Left it behind-- The moon at the window. -Ryokan