A bit more re-organization.
[lyx.git] / src / Makefile.am
blobbc0d3682a16a3dfe3eb944df43468d24df489c03
1 include $(top_srcdir)/config/common.am
3 ############################### Core  ##############################
5 DISTCLEANFILES += config.h libintl.h
7 AM_CPPFLAGS += $(PCH_FLAGS) -I$(top_srcdir)/src $(BOOST_INCLUDES)
8 AM_CPPFLAGS += $(QT4_CPPFLAGS) $(QT4_CORE_INCLUDES)
10 if BUILD_CLIENT_SUBDIR
11 CLIENT = client
12 endif
14 SUBDIRS = support frontends . $(CLIENT) tex2lyx
16 EXTRA_DIST = Section.h \
17         Section.cpp \
18         Variables.cpp \
19         Variables.h \
20         paper.h \
21         pch.h
23 OTHERLIBS = $(BOOST_LIBS) $(INTLLIBS) $(MYTHES_LIBS) $(AIKSAURUS_LIBS) \
24                 @LIBS@ $(SOCKET_LIBS) $(LIBSHLWAPI) $(LIBPSAPI)
26 noinst_LIBRARIES = liblyxcore.a
27 bin_PROGRAMS = lyx
29 lyx_LDADD = \
30         liblyxcore.a \
31         liblyxmathed.a \
32         liblyxinsets.a \
33         frontends/liblyxfrontends.a \
34         frontends/qt4/liblyxqt4.a \
35         liblyxgraphics.a \
36         support/liblyxsupport.a \
37         $(OTHERLIBS) \
38         $(QT4_LDFLAGS) \
39         $(QT4_LIB)
41 if LYX_WIN_RESOURCE
42 .rc.o:
43         cp $(top_srcdir)/development/Win32/packaging/icons/lyx_*32x32.ico .
44         windres -I$(top_builddir) --preprocessor "$(CPP) -xc-header -DRC_INVOKED" $< -o $@
45 endif
47 #lyx_LDFLAGS=-Wl,-O1
49 BUILT_SOURCES = $(PCH_FILE)
51 if USE_ASPELL
52 ASPELL = AspellChecker.cpp AspellChecker.h
53 endif
55 if USE_HUNSPELL
56 HUNSPELL = HunspellChecker.cpp HunspellChecker.h
57 endif
59 # These four objects are linked as object files as they are not
60 # referenced within the core and therefore are not picked up
61 # by the linker without looping over libs. We do not want that,
62 # and in fact libtools seems not able to do that.
63 lyx_SOURCES = \
64         main.cpp \
65         $(ASPELL) \
66         BiblioInfo.h \
67         BiblioInfo.cpp \
68         Box.cpp \
69         Box.h \
70         Compare.cpp \
71         Compare.h \
72         Dimension.cpp \
73         Dimension.h \
74         $(HUNSPELL) \
75         PrinterParams.cpp \
76         PrinterParams.h \
77         Thesaurus.cpp \
78         Thesaurus.h
80 if LYX_WIN_RESOURCE
81 lyx_SOURCES += lyxwinres.rc
82 endif
84 SOURCEFILESCORE = \
85         Author.cpp \
86         Bidi.cpp \
87         boost.cpp \
88         BranchList.cpp \
89         Buffer.cpp \
90         buffer_funcs.cpp \
91         BufferList.cpp \
92         BufferParams.cpp \
93         BufferView.cpp \
94         Bullet.cpp \
95         Changes.cpp \
96         Chktex.cpp \
97         CmdDef.cpp \
98         Color.cpp \
99         ConverterCache.cpp \
100         Converter.cpp \
101         CoordCache.cpp \
102         Counters.cpp \
103         Cursor.cpp \
104         CursorSlice.cpp \
105         CutAndPaste.cpp \
106         DepTable.cpp \
107         DocIterator.cpp \
108         Encoding.cpp \
109         ErrorList.cpp \
110         Exporter.cpp \
111         factory.cpp \
112         Floating.cpp \
113         FloatList.cpp \
114         FontInfo.cpp \
115         FontList.cpp \
116         Font.cpp \
117         Format.cpp \
118         FuncRequest.cpp \
119         FuncStatus.cpp \
120         Graph.cpp \
121         HSpace.cpp \
122         IndicesList.cpp \
123         InsetIterator.cpp \
124         InsetList.cpp \
125         Intl.cpp \
126         KeyMap.cpp \
127         KeySequence.cpp \
128         Language.cpp \
129         LaTeX.cpp \
130         LaTeXFeatures.cpp \
131         LayoutFile.cpp \
132         LayoutModuleList.cpp \
133         Length.cpp \
134         lengthcommon.cpp \
135         Lexer.cpp \
136         LyX.cpp \
137         LyXAction.cpp \
138         lyxfind.cpp \
139         LyXFunc.cpp \
140         LyXRC.cpp \
141         LyXVC.cpp \
142         MetricsInfo.cpp \
143         ModuleList.cpp \
144         Mover.cpp \
145         output_docbook.cpp \
146         output.cpp \
147         output_latex.cpp \
148         output_xhtml.cpp \
149         OutputParams.cpp \
150         output_plaintext.cpp \
151         Paragraph.cpp \
152         ParagraphMetrics.cpp \
153         ParagraphParameters.cpp \
154         ParIterator.cpp \
155         PDFOptions.cpp \
156         Row.cpp \
157         rowpainter.cpp \
158         Server.cpp \
159         ServerSocket.cpp \
160         sgml.cpp \
161         Session.cpp \
162         Spacing.cpp \
163         TexRow.cpp \
164         Text.cpp \
165         Text2.cpp \
166         Text3.cpp \
167         TexStream.cpp \
168         TextClass.cpp \
169         TextMetrics.cpp \
170         TocBackend.cpp \
171         Trans.cpp \
172         Undo.cpp \
173         VCBackend.cpp \
174         version.cpp \
175         VSpace.cpp \
176         WordList.cpp
178 HEADERFILESCORE = \
179         Author.h \
180         Bidi.h \
181         BranchList.h \
182         buffer_funcs.h \
183         Buffer.h \
184         BufferList.h \
185         BufferParams.h \
186         BufferView.h \
187         Bullet.h \
188         Citation.h \
189         Changes.h \
190         Chktex.h \
191         CmdDef.h \
192         ColorCode.h \
193         Color.h \
194         ColorSet.h \
195         CompletionList.h \
196         ConverterCache.h \
197         Converter.h \
198         CoordCache.h \
199         Counters.h \
200         Cursor.h \
201         CursorSlice.h \
202         CutAndPaste.h \
203         DepTable.h \
204         DispatchResult.h \
205         DocIterator.h \
206         Encoding.h \
207         ErrorList.h \
208         Exporter.h \
209         factory.h \
210         Floating.h \
211         FloatList.h \
212         Font.h \
213         FontEnums.h \
214         FontInfo.h \
215         FontList.h \
216         Format.h \
217         FuncCode.h \
218         FuncRequest.h \
219         FuncStatus.h \
220         Graph.h \
221         HSpace.h \
222         IndicesList.h \
223         InsetIterator.h \
224         InsetList.h \
225         Intl.h \
226         KeyMap.h \
227         KeySequence.h \
228         Language.h \
229         LaTeXFeatures.h \
230         LaTeX.h \
231         Layout.h \
232         LayoutEnums.h \
233         LayoutFile.h \
234         LayoutModuleList.h \
235         Length.h \
236         Lexer.h \
237         LyXAction.h \
238         lyxfind.h \
239         LyXFunc.h \
240         LyX.h \
241         LyXRC.h \
242         LyXVC.h \
243         MetricsInfo.h \
244         ModuleList.h \
245         Mover.h \
246         output_docbook.h \
247         output.h \
248         output_latex.h \
249         output_xhtml.h \
250         OutputParams.h \
251         output_plaintext.h \
252         paper.h \
253         Paragraph.h \
254         ParagraphList.h \
255         ParagraphMetrics.h \
256         ParagraphParameters.h \
257         ParIterator.h \
258         PDFOptions.h \
259         Row.h \
260         rowpainter.h \
261         Server.h \
262         ServerSocket.h \
263         Session.h \
264         sgml.h \
265         Spacing.h \
266         SpellChecker.h \
267         TexRow.h \
268         TexStream.h \
269         Text.h \
270         TextClass.h \
271         TextMetrics.h \
272         TocBackend.h \
273         Trans.h \
274         Undo.h \
275         update_flags.h \
276         VCBackend.h \
277         version.h \
278         VSpace.h \
279         WordLangTuple.h \
280         WordList.h
282 STANDALONEFILES = \
283         Layout.cpp
286 lyxcore.cpp:
287         @echo -e '$(SOURCEFILESCORE:%=\n#include "%")\n' > $@
289 if MONOLITHIC_CORE
291 BUILT_SOURCES += lyxcore.cpp $(STANDALONEFILES)
292 CLEANFILES += lyxcore.cpp
294 liblyxcore_a_SOURCES = lyxcore.cpp $(STANDALONEFILES) $(HEADERFILESCORE)
296 else
298 liblyxcore_a_SOURCES = $(SOURCEFILESCORE) $(STANDALONEFILES) $(HEADERFILESCORE)
300 endif
302 #########################  Qt stuff  ##############################
304 MOCHEADER = Compare.h
306 if INSTALL_WINDOWS
308 MOCHEADER += Server.h
309 MOCFLAG = -D_WIN32
311 endif
313 MOCEDFILES = $(MOCHEADER:%.h=moc_%.cpp)
315 BUILT_SOURCES += $(MOCEDFILES)
316 CLEANFILES += $(MOCEDFILES)
318 moc_%.cpp: %.h
319         $(MOC4) $(MOCFLAG) -o $@ $<
321 liblyxcore_a_DEPENDENCIES = $(MOCEDFILES)
323 ############################### Graphics ##############################
325 noinst_LIBRARIES += liblyxgraphics.a
327 liblyxgraphics_a_SOURCES = \
328         graphics/GraphicsCache.h \
329         graphics/GraphicsCache.cpp \
330         graphics/GraphicsCacheItem.h \
331         graphics/GraphicsCacheItem.cpp \
332         graphics/GraphicsConverter.h \
333         graphics/GraphicsConverter.cpp \
334         graphics/GraphicsImage.h \
335         graphics/GraphicsLoader.h \
336         graphics/GraphicsLoader.cpp \
337         graphics/GraphicsParams.cpp \
338         graphics/GraphicsParams.h \
339         graphics/GraphicsTypes.h \
340         graphics/PreviewImage.h \
341         graphics/PreviewImage.cpp \
342         graphics/PreviewLoader.h \
343         graphics/PreviewLoader.cpp \
344         graphics/Previews.h \
345         graphics/Previews.cpp
348 ############################### Mathed  ##############################
350 EXTRA_DIST += mathed/InsetFormulaMacro.cpp
352 noinst_LIBRARIES += liblyxmathed.a
354 SOURCEFILESMATHED = \
355         mathed/InsetMathAMSArray.cpp \
356         mathed/InsetMathArray.cpp \
357         mathed/InsetMathBig.cpp \
358         mathed/InsetMathBoldSymbol.cpp \
359         mathed/InsetMathBox.cpp \
360         mathed/InsetMathBrace.cpp \
361         mathed/InsetMath.cpp \
362         mathed/InsetMathCases.cpp \
363         mathed/InsetMathChar.cpp \
364         mathed/InsetMathColor.cpp \
365         mathed/CommandInset.cpp \
366         mathed/InsetMathComment.cpp \
367         mathed/InsetMathDecoration.cpp \
368         mathed/InsetMathDecoration.h \
369         mathed/InsetMathDelim.cpp \
370         mathed/InsetMathDiff.cpp \
371         mathed/InsetMathDots.cpp \
372         mathed/InsetMathEnsureMath.cpp \
373         mathed/InsetMathEnv.cpp \
374         mathed/InsetMathExFunc.cpp \
375         mathed/InsetMathExInt.cpp \
376         mathed/InsetMathFont.cpp \
377         mathed/InsetMathFontOld.cpp \
378         mathed/InsetMathFrac.cpp \
379         mathed/InsetMathGrid.cpp \
380         mathed/InsetMathHull.cpp \
381         mathed/InsetMathKern.cpp \
382         mathed/InsetMathLefteqn.cpp \
383         mathed/InsetMathLim.cpp \
384         mathed/MathMacro.cpp \
385         mathed/InsetMathMatrix.cpp \
386         mathed/InsetMathNest.cpp \
387         mathed/InsetMathNumber.cpp \
388         mathed/InsetMathOverset.cpp \
389         mathed/InsetMathPar.cpp \
390         mathed/InsetMathPhantom.cpp \
391         mathed/InsetMathRef.cpp \
392         mathed/InsetMathRoot.cpp \
393         mathed/InsetMathScript.cpp \
394         mathed/InsetMathSize.cpp \
395         mathed/InsetMathSpace.cpp \
396         mathed/InsetMathSpecialChar.cpp \
397         mathed/InsetMathSplit.cpp \
398         mathed/InsetMathSqrt.cpp \
399         mathed/InsetMathStackrel.cpp \
400         mathed/InsetMathString.cpp \
401         mathed/InsetMathSubstack.cpp \
402         mathed/InsetMathSymbol.cpp \
403         mathed/InsetMathTabular.cpp \
404         mathed/InsetMathUnderset.cpp \
405         mathed/InsetMathUnknown.cpp \
406         mathed/InsetMathXArrow.cpp \
407         mathed/InsetMathXYMatrix.cpp \
408         mathed/MathAtom.cpp \
409         mathed/MathAutoCorrect.cpp \
410         mathed/MathData.cpp \
411         mathed/MathExtern.cpp \
412         mathed/MathFactory.cpp \
413         mathed/MathMacroArgument.cpp \
414         mathed/MacroTable.cpp \
415         mathed/MathMacroTemplate.cpp \
416         mathed/MathParser.cpp \
417         mathed/MathStream.cpp \
418         mathed/MathSupport.cpp \
419         mathed/TextPainter.cpp
421 HEADERFILESMATHED = \
422         mathed/InsetMathAMSArray.h \
423         mathed/InsetMathArray.h \
424         mathed/InsetMathBig.h \
425         mathed/InsetMathBoldSymbol.h \
426         mathed/InsetMathBox.h \
427         mathed/InsetMathBrace.h \
428         mathed/InsetMathCases.h \
429         mathed/InsetMathChar.h \
430         mathed/InsetMathColor.h \
431         mathed/CommandInset.h \
432         mathed/InsetMathComment.h \
433         mathed/InsetMathDelim.h \
434         mathed/InsetMathDiff.h \
435         mathed/InsetMathDots.h \
436         mathed/InsetMathEnsureMath.h \
437         mathed/InsetMathEnv.h \
438         mathed/InsetMathExFunc.h \
439         mathed/InsetMathExInt.h \
440         mathed/InsetMathFont.h \
441         mathed/InsetMathFontOld.h \
442         mathed/InsetMathFrac.h \
443         mathed/InsetMathGrid.h \
444         mathed/InsetMath.h \
445         mathed/InsetMathHull.h \
446         mathed/InsetMathKern.h \
447         mathed/InsetMathLefteqn.h \
448         mathed/InsetMathLim.h \
449         mathed/MathMacro.h \
450         mathed/InsetMathMatrix.h \
451         mathed/InsetMathNest.h \
452         mathed/InsetMathNumber.h \
453         mathed/InsetMathOverset.h \
454         mathed/InsetMathPar.h \
455         mathed/InsetMathPhantom.h \
456         mathed/InsetMathRef.h \
457         mathed/InsetMathRoot.h \
458         mathed/InsetMathScript.h \
459         mathed/InsetMathSize.h \
460         mathed/InsetMathSpace.h \
461         mathed/InsetMathSpecialChar.h \
462         mathed/InsetMathSplit.h \
463         mathed/InsetMathSqrt.h \
464         mathed/InsetMathStackrel.h \
465         mathed/InsetMathString.h \
466         mathed/InsetMathSubstack.h \
467         mathed/InsetMathSymbol.h \
468         mathed/InsetMathTabular.h \
469         mathed/InsetMathUnderset.h \
470         mathed/InsetMathUnknown.h \
471         mathed/InsetMathXArrow.h \
472         mathed/InsetMathXYMatrix.h \
473         mathed/MathAtom.h \
474         mathed/MathAutoCorrect.h \
475         mathed/MathData.h \
476         mathed/MathCompletionList.h \
477         mathed/MathExtern.h \
478         mathed/MathFactory.h \
479         mathed/MathGridInfo.h \
480         mathed/MathMacroArgument.h \
481         mathed/MacroTable.h \
482         mathed/MathMacroTemplate.h \
483         mathed/MathParser.h \
484         mathed/MathParser_flags.h \
485         mathed/ReplaceData.h \
486         mathed/MathStream.h \
487         mathed/MathSupport.h \
488         mathed/TextPainter.h
490 lyxmathed.cpp:
491         @echo -e '$(SOURCEFILESMATHED:%=\n#include "%")\n' > $@
493 if MONOLITHIC_MATHED
495 BUILT_SOURCES += lyxmathed.cpp
496 CLEANFILES += lyxmathed.cpp
498 liblyxmathed_a_SOURCES = lyxmathed.cpp $(HEADERFILESMATHED)
500 else
502 liblyxmathed_a_SOURCES = $(SOURCEFILESMATHED) $(HEADERFILESMATHED)
504 endif
506 ############################### Insets  ##############################
508 noinst_LIBRARIES += liblyxinsets.a
510 SOURCEFILESINSETS = \
511         insets/ExternalSupport.cpp \
512         insets/ExternalTemplate.cpp \
513         insets/ExternalTransforms.cpp \
514         insets/RenderButton.cpp \
515         insets/RenderGraphic.cpp \
516         insets/RenderPreview.cpp \
517         insets/Inset.cpp \
518         insets/InsetBibitem.cpp \
519         insets/InsetBibtex.cpp \
520         insets/InsetBox.cpp \
521         insets/InsetBranch.cpp \
522         insets/InsetCaption.cpp \
523         insets/InsetCitation.cpp \
524         insets/InsetCollapsable.cpp \
525         insets/InsetCommand.cpp \
526         insets/InsetCommandParams.cpp \
527         insets/InsetERT.cpp \
528         insets/InsetExternal.cpp \
529         insets/InsetFlex.cpp \
530         insets/InsetFloat.cpp \
531         insets/InsetFloatList.cpp \
532         insets/InsetFoot.cpp \
533         insets/InsetFootlike.cpp \
534         insets/InsetGraphicsParams.cpp \
535         insets/InsetGraphics.cpp \
536         insets/InsetHyperlink.cpp \
537         insets/InsetInclude.cpp \
538         insets/InsetIndex.cpp \
539         insets/InsetInfo.cpp \
540         insets/InsetLabel.cpp \
541         insets/InsetLayout.cpp \
542         insets/InsetLine.cpp \
543         insets/InsetListings.cpp \
544         insets/InsetListingsParams.cpp \
545         insets/InsetMarginal.cpp \
546         insets/InsetNewline.cpp \
547         insets/InsetNewpage.cpp \
548         insets/InsetNomencl.cpp \
549         insets/InsetNote.cpp \
550         insets/InsetOptArg.cpp \
551         insets/InsetPhantom.cpp \
552         insets/InsetQuotes.cpp \
553         insets/InsetRef.cpp \
554         insets/InsetSpace.cpp \
555         insets/InsetSpecialChar.cpp \
556         insets/InsetTabular.cpp \
557         insets/InsetText.cpp \
558         insets/InsetTOC.cpp \
559         insets/InsetVSpace.cpp \
560         insets/InsetWrap.cpp
562 HEADERFILESINSETS = \
563         insets/ExternalSupport.h \
564         insets/ExternalTemplate.h \
565         insets/ExternalTransforms.h \
566         insets/RenderBase.h \
567         insets/RenderButton.h \
568         insets/RenderGraphic.h \
569         insets/RenderPreview.h \
570         insets/Inset.h \
571         insets/InsetBibitem.h \
572         insets/InsetBibtex.h \
573         insets/InsetBox.h \
574         insets/InsetBranch.h \
575         insets/InsetCaption.h \
576         insets/InsetCitation.h \
577         insets/InsetCode.h \
578         insets/InsetCollapsable.h \
579         insets/InsetCommand.h \
580         insets/InsetCommandParams.h \
581         insets/InsetERT.h \
582         insets/InsetExternal.h \
583         insets/InsetFlex.h \
584         insets/InsetFloat.h \
585         insets/InsetFoot.h \
586         insets/InsetFloatList.h \
587         insets/InsetFootlike.h \
588         insets/InsetGraphicsParams.h \
589         insets/InsetGraphics.h \
590         insets/InsetHyperlink.h \
591         insets/InsetInclude.h \
592         insets/InsetIndex.h \
593         insets/InsetInfo.h \
594         insets/InsetLabel.h \
595         insets/InsetLayout.h \
596         insets/InsetLine.h \
597         insets/InsetListings.h \
598         insets/InsetListingsParams.h \
599         insets/InsetMarginal.h \
600         insets/InsetNewline.h \
601         insets/InsetNewpage.h \
602         insets/InsetNomencl.h \
603         insets/InsetNote.h \
604         insets/InsetOptArg.h \
605         insets/InsetPhantom.h \
606         insets/InsetQuotes.h \
607         insets/InsetRef.h \
608         insets/InsetSpace.h \
609         insets/InsetSpecialChar.h \
610         insets/InsetTabular.h \
611         insets/InsetText.h \
612         insets/InsetTOC.h \
613         insets/InsetVSpace.h \
614         insets/InsetWrap.h
616 #       insets/InsetList.cpp \
617 #       insets/InsetList.h \
618 #       insets/InsetSection.h \
619 #       insets/InsetSection.cpp
621 lyxinsets.cpp:
622         @echo -e '$(SOURCEFILESINSETS:%=\n#include "%")\n' > $@
624 if MONOLITHIC_INSETS
626 BUILT_SOURCES += lyxinsets.cpp
627 CLEANFILES += lyxinsets.cpp
629 liblyxinsets_a_SOURCES = lyxinsets.cpp $(HEADERFILESINSETS)
631 else
633 liblyxinsets_a_SOURCES = $(SOURCEFILESINSETS) $(HEADERFILESINSETS)
635 endif