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