How do I access the custom variable defined at the beginning of the Makefile.am?
Specifically, I want to do something in the following lines. For a Makefile.am script that defines how the library file should be created, I want to be able to access the shared name of the library. For example, if I wanted the library name to be named "name", I could start with the following variable:
LIBNAME = name
Then I might have something like this:
lib_LTLIBRARIES = lib$(LIBNAME).la
But then automake starts to complain when I want to do something like the following:
lib$(LIBNAME)_la_SOURCES = file1.cpp file2.cpp lib$(LIBNAME)_la_LIBADD = ...
Is it possible to similarly use some other syntax so that I don't have to repeat the library name many times?
Greetings,
Ben.
+3
source to share
2 answers