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