My project looks like this:

/Tupfile
/a.h
/a.c
/b.h
/b.c
/main1.c
/main2.c

I have rules to build a.o, b.o, main1.o, and main2.o

I would like to write a rule that links a.o, b.o and main1.o into an
executable, and a.o, b.o, and main2.o into an executable, but I'm not quite
sure how to write it.

Before I had two mains, my :-rule looked like this:

: *.o |> $(CXX) $(LINKFLAGS) %f -o %o |> main

Now I want to write something like:

: *.o EXCEPT main2.o |> $(CXX) $(LINKFLAGS) %f -o %o |> main1
: *.o EXCEPT main1.o |> $(CXX) $(LINKFLAGS) %f -o %o |> main2

Or better yet:

MAINS = main1 main2

: foreach $(MAINS) |> MAGICAL TUP GOODNESS |> %B

Any hints?

Thanks!

-- 
-- 
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.

Reply via email to