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