Automake Variables to tidy up Makefile.am

Viewed 2092

I have a directory /src containing all of my source files, and /bin to store all binary after running make command. The directory is something like below:

/BuildDirectory
- - /src
- - /bin
- - configure
- - Makefile.am
- - configure.ac 
- - ... 

Now in Makefile.am, I have to specified:

bin_PROGRAMS = bin/x bin/y bin/z bin/k ...

bin_x_SOURCES = src/x.cpp
bin_y_SOURCES = src/y.cpp
bin_z_SOURCES = src/z.cpp

Is there any variable that can help to get rid of all "bin/" and "src/" ? For example I just specify:

$BIN = bin
$SRC = src 

And they will look for the correct files in correct folders and compile it to the correct places.

Thanks

3 Answers
Related