]> git.lyx.org Git - lyx.git/blobdiff - src/client/Makefile.am
Make document_language non-mutable
[lyx.git] / src / client / Makefile.am
index 8da3e2ac909161e2f38e0d46411b4931040bcbbc..d652f0f696bd492d5a1750b0993fc61cda6291e4 100644 (file)
@@ -1,28 +1,56 @@
 include $(top_srcdir)/config/common.am
 
-EXTRA_DIST = lyxclient.man
+CLEANFILES += $(man_MANS)
 
 man_MANS = lyxclient.1
 
 bin_PROGRAMS = lyxclient
 
-AM_CPPFLAGS = $(PCH_FLAGS) -I$(srcdir)/../ $(BOOST_INCLUDES)
+EXTRA_DIST = lyxclient.1in CMakeLists.txt
 
-BOOST_LIBS = $(BOOST_REGEX) $(BOOST_FILESYSTEM)
+AM_CPPFLAGS += -I$(srcdir)/.. $(BOOST_INCLUDES)
 
 lyxclient_LDADD = \
-       $(top_builddir)/src/support/libsupport.la \
-       $(BOOST_LIBS) $(INTLLIBS)
-
-lyxclient_SOURCES = \
-       boost.C \
-       client.C \
-       debug.C \
-       debug.h \
-       gettext.C \
-       gettext.h \
-       messages.C \
-       messages.h
-
-lyxclient.1:
-       cp -p $(srcdir)/lyxclient.man lyxclient.1
+       $(top_builddir)/src/support/liblyxsupport.a \
+       $(BOOST_LIBS) @LIBS@ $(SOCKET_LIBS) \
+       $(QT_LIB) $(QT_LDFLAGS) $(LIBSHLWAPI) $(LIBPSAPI)
+
+if INSTALL_MACOSX
+lyxclient_LDFLAGS = -framework AppKit
+endif
+
+# everything below the line containing the single backslashs
+# an ugly hack and needed because of the
+# linking problems described in ../Makefile.am
+# These four objects are linked as object files as they are not
+# referenced within the core and therefore are not picked up
+# by the linker without looping over libs. We do not want that,
+# and in fact libtools seems not able to do that.
+
+SOURCEFILES = \
+  boost.cpp \
+  client.cpp
+
+HEADERFILES = 
+
+
+lyxclient.cpp:
+       @echo -e '$(SOURCEFILES:%=\n#include "%")\n' > $@
+
+if MONOLITHIC_CLIENT
+
+AM_CPPFLAGS += -I$(srcdir)/.. $(BOOST_INCLUDES)
+BUILT_SOURCES = lyxclient.cpp
+CLEANFILES += lyxclient.cpp
+
+lyxclient_SOURCES = lyxclient.cpp $(HEADERFILES)
+
+else
+
+EXTRA_DIST += pch.h
+AM_CPPFLAGS += $(PCH_FLAGS)
+BUILT_SOURCES = $(PCH_FILE)
+
+lyxclient_SOURCES = $(SOURCEFILES) $(HEADERFILES)
+
+endif