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