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