Creating diff executables with autotools
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > Creating diff executables with autotools




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Creating diff executables with autotools  
Paulo Matos


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-08-05 11:29 PM

Hi all,

How can I specify using autotools, in Makefile.am that I wish to create
diff executables from the same set of sources. The executables differ
in that they are compiled with different flags.
For example:
bin_PROGRAMS = test otest dtest # Normal test, optimized test and debug
test

If they have few sources files we can specify them repeatedly for
test_SOURCES otest_SOURCES and dtest_SOURCES, however if they have
hundreds of source files it gets harder to maintain.
What's the best way to do this?

Cheers,

Paulo Matos






[ Post a follow-up to this message ]



    Re: Creating diff executables with autotools  
Måns Rullgård


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-08-05 11:29 PM

"Paulo Matos" <pocmatos@gmail.com> writes:

> Hi all,
>
> How can I specify using autotools, in Makefile.am that I wish to create
> diff executables from the same set of sources. The executables differ
> in that they are compiled with different flags.
> For example:
> bin_PROGRAMS = test otest dtest # Normal test, optimized test and debug
> test
>
> If they have few sources files we can specify them repeatedly for
> test_SOURCES otest_SOURCES and dtest_SOURCES, however if they have
> hundreds of source files it gets harder to maintain.
> What's the best way to do this?

Maybe not the best, but one way is this:

SOURCES = foo.c bar.c
test_SOURCES = $(SOURCES)
otest_SOURCES = $(SOURCES)

--
Måns Rullgård
mru@inprovide.com





[ Post a follow-up to this message ]



    Re: Creating diff executables with autotools  
Paulo Matos


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-08-05 11:29 PM

Thanks...






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 03:25 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register