On Saturday, April 26, 2014 4:41:13 AM UTC+2, Quibbler wrote: > > Nah, don't define a symbol just to use it once. Use a wildcard as shown > below, > > But add the following symbol, which you will use multiple times > OBJS = a.o b.o >
Thanks for the help! That would definitely work, but what about when I have tons of object files, and only a few object files that contain main functions? It would be nicer to only have to write out the list of the files that contain main functions. > The rule should look something like this: > : foreach main?.o | $(OBJS) |> $(CXX) $(LINKFLAGS) %f $(OBJS) -o %o |> > %B > Ah, I should have picked different names for the example :) What if I main1.o and main2.o are actually called 'xyz.o' and 'abc.o', and there are going to be more in the future that have different names that don't follow any pattern? -- -- tup-users mailing list email: [email protected] unsubscribe: [email protected] options: http://groups.google.com/group/tup-users?hl=en --- You received this message because you are subscribed to the Google Groups "tup-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
