An Internationalized Software Project With Auto Tools | ||
---|---|---|
Prev | Adding a Module | Next |
# mkdir src/testmodule # touch src/testmodule/testfunc.cpp # touch src/testmodule/testfunc.h # touch src/testmodule/Makefile.am |
src/testmodule/testfunc.h |
void printMessage(); |
src/testmodule/testfunf.cpp |
#include <stdio.h> #include "testfunc.h" void printMessage() { printf("hello world!\n"); } |
src/testmodule/Makefile.am |
noinst_LIBRARIES = libtestmodule.a noinst_HEADERS = testfunc.h libtestmodule_a_SOURCES = testfunc.cpp |
src/main.cpp |
|
src/Makefile.am |
SUBDIRS = testmodule bin_PROGRAMS = testproj testproj_SOURCES = main.cpp noinst_HEADERS = testproj.h testproj_LDADD = $(top_srcdir)/src/testmodule/libtestmodule.a |
configure.ac |
... AM_INIT_AUTOMAKE AC_PROG_RANLIB # Checks for programs. ... # Checks for library functions. AC_CONFIG_FILES([Makefile src/Makefile src/testmodule/Makefile]) AC_OUTPUT |
# gmake cd . && aclocal19 ... cd . && automake19 --gnu cd . && autoconf259 /usr/local/bin/bash ./config.status --recheck running /usr/local/bin/bash ./configure --no-create --no-recursion ... config.status: executing depfiles commands cd . && autoheader259 rm -f stamp-h1 touch config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h config.status: config.h is unchanged gmake all-recursive gmake[1]: Entering directory `/usr/home/he/develop/testproj' Making all in src gmake[2]: Entering directory `/usr/home/he/develop/testproj/src' Making all in testmodule gmake[3]: Entering directory `/usr/home/he/develop/testproj/src/testmodule' if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -g -O2 -MT testfunc.o -MD -MP -MF ".deps/testfunc.Tpo" -c -o testfunc.o testfunc.cpp; \ then mv -f ".deps/testfunc.Tpo" ".deps/testfunc.Po"; else rm -f ".deps/testfunc.Tpo"; exit 1; fi rm -f libtestmodule.a ar cru libtestmodule.a testfunc.o ranlib libtestmodule.a gmake[3]: Leaving directory `/usr/home/he/develop/testproj/src/testmodule' gmake[3]: Entering directory `/usr/home/he/develop/testproj/src' if g++ -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT main.o -MD -MP -MF ".deps/main.Tpo" -c -o main.o main.cpp; \ then mv -f ".deps/main.Tpo" ".deps/main.Po"; else rm -f ".deps/main.Tpo"; exit 1; fi g++ -g -O2 -o testproj main.o ../src/testmodule/libtestmodule.a gmake[3]: Leaving directory `/usr/home/he/develop/testproj/src' gmake[2]: Leaving directory `/usr/home/he/develop/testproj/src' gmake[2]: Entering directory `/usr/home/he/develop/testproj' gmake[2]: Leaving directory `/usr/home/he/develop/testproj' gmake[1]: Leaving directory `/usr/home/he/develop/testproj' |
# gmake install Making install in src gmake[1]: Entering directory `/usr/home/he/develop/testproj/src' Making install in testmodule gmake[2]: Entering directory `/usr/home/he/develop/testproj/src/testmodule' gmake[3]: Entering directory `/usr/home/he/develop/testproj/src/testmodule' gmake[3]: Nothing to be done for `install-exec-am'. gmake[3]: Nothing to be done for `install-data-am'. gmake[3]: Leaving directory `/usr/home/he/develop/testproj/src/testmodule' gmake[2]: Leaving directory `/usr/home/he/develop/testproj/src/testmodule' gmake[2]: Entering directory `/usr/home/he/develop/testproj/src' gmake[3]: Entering directory `/usr/home/he/develop/testproj/src' test -z "/usr/local/bin" || /usr/home/he/develop/testproj/install-sh -d "/usr/local/bin" /usr/bin/install -c 'testproj' '/usr/local/bin/testproj' ... |
# testproj hello world! |
Prev | Home | Next |
Revision Control | Adding libtool Support |