I'm looking to build and install an object file (crt1.o
, a C startup file) into the library directory (/usr/lib
) with Automake and Autoconf.
So, my initial though about doing this was to create a crt_DATA
variable inside the Makefile.am
file, and define special targets on how to build the file. However, this idea has an issue: the file would be installed in a data directory instead of a library directory.
I then proceeded to try adding crt1.o
to the lib_LIBRARIES
section of my Makefile.am
and creating crt1_o_SOURCES
. However, this gave an error:
error: 'crt1.o' is not a standard library name
At this point, I could not think of any more possible ways to do this.
How do I compile and install an individual object file using Automake?
Very specific requirements:
crt1.o
cannot be built into its own shared library or archive. It has to be just an object file. It's mandated by the compiler to be this way, so I have my hands tied.It would be lovely if this file could be tracked and installed to the correct place if
DESTDIR
is changed.