If in my Makefile.am, I have a set of hypothetically named sources:
lib_LTLIBRARIES = libmy_tutorial.la
libmy_tutorial_la_SOURCES = \
jump_table.h jump_table.c \
core.h core.c \
my_dynapi.c
bin_PROGRAMS = main
main_SOURCES = main.c
main_LDADD = libmy_tutorial.la
CLEANFILES = *.o
and I am in Vim. Is there a way to call :make
on a single target if my Makefile is generated from the Makefile.am above.
For example:
:make main.o
would compile only main.c from bin_PROGRAMS?
Just as if I had run:
gcc -c -o main.o $(CFLAGS) $(CPPFLAGS) main.c
Since you're using Libtool, your targets are .lo
files instead of .o
files. Call make main.lo
, or make libmy_tutorial_la-main.lo
if you're using per-target CFLAGS
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.