From d5ae29dce60aec6b038720bbc076b1ce189cac9f Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Mon, 10 May 2021 07:52:50 +0300 Subject: [PATCH 45/45] Build separate library out of client/helpdata.c Link freeciv-manual against it, instead of compiling source file from a different directory ("../client") See osdn #42209 Signed-off-by: Marko Lindqvist --- Makefile.am | 8 +------- client/Makefile.am | 13 +++++++++---- tools/Makefile.am | 2 +- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Makefile.am b/Makefile.am index d04e017e2d..ae5e673f70 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,12 +2,6 @@ AM_DIST_FORMATS = gzip xz zip -if CLIENT -CSUBDIRS = client -else -CSUBDIRS = -endif - if SRV_LIB SSUBDIRS = ai server else @@ -20,7 +14,7 @@ else DSUBDIRS = endif -SUBDIRS = gen_headers $(DSUBDIRS) dependencies utility common tests windows $(SSUBDIRS) $(CSUBDIRS) translations doc tools lua bootstrap +SUBDIRS = gen_headers $(DSUBDIRS) dependencies utility common tests windows $(SSUBDIRS) client translations doc tools lua bootstrap docs = \ ABOUT-NLS \ diff --git a/client/Makefile.am b/client/Makefile.am index 180350b15e..e523723f3f 100644 --- a/client/Makefile.am +++ b/client/Makefile.am @@ -59,7 +59,9 @@ else CLI_INCLUDE = endif +if CLIENT SUBDIRS = $(GUI_SUBDIRS) $(CLI_INCLUDE) agents luascript +endif AM_CPPFLAGS = \ -I$(top_srcdir)/utility \ @@ -108,8 +110,6 @@ freeciv_client_src = $(AUDIO_SDL_FILES) \ global_worklist.h \ goto.c \ goto.h \ - helpdata.c \ - helpdata.h \ luaconsole_common.c \ luaconsole_common.h \ mapctrl_common.c \ @@ -171,13 +171,18 @@ gui_cbs_src = \ MAINTAINERCLEANFILES = $(srcdir)/packhand_gen.c $(srcdir)/packhand_gen.h bin_PROGRAMS = -noinst_LTLIBRARIES = +noinst_LTLIBRARIES = libfc_helpdata.la + +libfc_helpdata_la_SOURCES = \ + helpdata.c \ + helpdata.h clientlibs = \ $(top_builddir)/common/scriptcore/libscriptcore.la \ $(top_builddir)/client/agents/libagents.la \ $(top_builddir)/client/luascript/libscripting_client.la \ - $(top_builddir)/dependencies/cvercmp/libcvercmp.la + $(top_builddir)/dependencies/cvercmp/libcvercmp.la \ + libfc_helpdata.la if CLIENT_GUI_GTK_3_22 bin_PROGRAMS += freeciv-gtk3.22 diff --git a/tools/Makefile.am b/tools/Makefile.am index 8c55a81cec..3e011cbd3b 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -51,7 +51,7 @@ freeciv_manual_SOURCES = \ # but also uses some files from the client. freeciv_manual_LDADD = \ $(top_builddir)/server/libfreeciv-srv.la \ - ../client/helpdata.lo \ + $(top_builddir)/client/libfc_helpdata.la \ $(top_builddir)/common/libfreeciv.la \ $(top_builddir)/tools/shared/libtoolsshared.la \ $(INTLLIBS) $(TINYCTHR_LIBS) $(MAPIMG_WAND_LIBS) \ -- 2.30.2