From 90ac074365e1dc15d447aaecd70ec4e0f1539523 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Sun, 10 May 2009 10:07:38 -0700 Subject: Turn the main loop code into a library, libtcmmain Rather than compiling tcm.c and dtcm.c for every test program, just build libtcmmain.a once and link it in. The same goes for tcmchild.c and libtcmchild.a. This also allows for an automake time saver since we can move tcm into the LIBS definition and then the program is a single source file of the same name. Automake defaults to using this source file without needing to define _SOURCES. --- src/tet3/Makefile.am | 2 +- src/tet3/tcm/Makefile.am | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/tet3/Makefile.am b/src/tet3/Makefile.am index 8ad60b41..dfc2b970 100644 --- a/src/tet3/Makefile.am +++ b/src/tet3/Makefile.am @@ -1,2 +1,2 @@ -SUBDIRS = tcm dtet2lib apilib tcclib tcc +SUBDIRS = dtet2lib tcm apilib tcclib tcc diff --git a/src/tet3/tcm/Makefile.am b/src/tet3/tcm/Makefile.am index dc939b1d..8c2795f3 100644 --- a/src/tet3/tcm/Makefile.am +++ b/src/tet3/tcm/Makefile.am @@ -1,17 +1,18 @@ AM_CPPFLAGS = -I../inc -I$(top_srcdir)/include -DTET_LITE -noinst_LTLIBRARIES = libtcm.la +noinst_LTLIBRARIES = libtcm.la libtcmmain.la libtcmchild.la libtcm_la_SOURCES = child.c \ ckversion.c \ dynlink.c \ ictp.c \ tcmfuncs.c +# When linking to either of these libraries, remember to link libapi.la +# after them +libtcmmain_la_SOURCES = tcm.c dtcm.c +libtcmchild_la_SOURCES = tcmchild.c # These didn't get compiled before the autotools conversion # tcm_bs.c # tcm_in.c # tcmrem.c # tcm_xt.c -# tcmchild.c -# tcm.c -# dtcm.c -- cgit v1.2.3