I'm doing a pretty straight-forward conversion of an existing library (libtcod) to Autotools (for OS X happiness). Unfortunately, when I switch my Makefile.am
's lib_LIBRARIES
rule to lib_LTLIBRARIES
, the build goes from successful to un. Excerpt from the output below:
Making all in .
make[1]: Nothing to be done for `all-am'.
Making all in src
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -g -O2 -MT bresenham_c.lo -MD -MP -MF .deps/bresenham_c.Tpo -c -o bresenham_c.lo bresenham_c.c
mv -f .deps/bresenham_c.Tpo .deps/bresenham_c.Plo
mv: rename .deps/bresenham_c.Tpo to .deps/bresenham_c.Plo: No such file or directory
make[1]: *** [bresenham_c.lo] Error 1
make: *** [all-recursive] Error 1
src/Makefile.am
looks like this:
lib_LTLIBRARIES = libtcod.la
libtcod_la_SOURCES = bresenham_c.c bresenham3_c.c bsp_c.c color_c.c ...
src/.deps
contains:
$ ls src/.deps/
bresenham_c.Plo bresenham_c.Po ...
Am I making an obvious mistake here, or should this work?
Yes, I'm making an obvious mistake. I needed to run autoreconf -i
to create a non-empty ltmain.sh
script; the existing one made ../libtool
here a no-op.
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