In my Makefile.am
file I have something like this:
bin_PROGRAMS = foo bar
foo_SOURCES = foo.cpp
bar_SOURCES = bar.cpp
I am interested in having bar
only compiled when I do a make bar
, not when I do a make all
. But I want foo
always compiled. How do I do that?
Thanks.
If you want do declare a program can be built (i.e. the target must be emitted by Automake), but should not be built by make all
or make check
, you can simply declare it as EXTRA_PROGRAMS
.
bin_PROGRAMS = foo
EXTRA_PROGRAMS = bar
foo_SOURCES = foo.cpp
bar_SOURCES = bar.cpp
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With