]> git.lyx.org Git - lyx.git/blob - src/Makefile.am
1ebf6c21e99d901f56759e3f897f24bf1769cab6
[lyx.git] / src / Makefile.am
1 include $(top_srcdir)/config/common.am
2
3 ############################### Core  ##############################
4
5 AM_CPPFLAGS += -I$(top_srcdir)/src $(BOOST_INCLUDES) $(ENCHANT_CFLAGS) $(HUNSPELL_CFLAGS)
6 AM_CPPFLAGS += $(QT_CPPFLAGS) $(QT_CORE_INCLUDES)
7
8 if BUILD_CLIENT_SUBDIR
9 CLIENT = client
10 endif
11
12 SUBDIRS = support frontends . $(CLIENT) tex2lyx
13
14 EXTRA_DIST = lyx_commit_hash.h.in \
15         CMakeLists.txt \
16         graphics/CMakeLists.txt \
17         insets/CMakeLists.txt \
18         mathed/CMakeLists.txt \
19         tests/CMakeLists.txt
20
21 OTHERLIBS = $(BOOST_LIBS) $(MYTHES_LIBS) $(ENCHANT_LIBS) $(HUNSPELL_LIBS) \
22             @LIBS@ $(SOCKET_LIBS) $(LIBSHLWAPI) $(LIBPSAPI)
23
24 noinst_LIBRARIES = liblyxcore.a
25 bin_PROGRAMS = lyx
26
27 lyx_LDADD = \
28         liblyxcore.a \
29         liblyxmathed.a \
30         liblyxinsets.a \
31         frontends/liblyxfrontends.a \
32         frontends/qt4/liblyxqt4.a \
33         liblyxgraphics.a \
34         support/liblyxsupport.a \
35         $(OTHERLIBS) \
36         $(QT_LDFLAGS) \
37         $(QT_LIB)
38
39 if LYX_WIN_RESOURCE
40 .rc.o:
41         cp $(top_srcdir)/development/Win32/packaging/icons/lyx_*32x32.ico .
42         windres -I$(top_builddir) --preprocessor "$(CPP) -xc-header -DRC_INVOKED" $< -o $@
43 endif
44
45 if INSTALL_MACOSX
46 lyx_LDFLAGS = -framework AppKit -framework ApplicationServices \
47         -Wl,-rpath,@loader_path/../Frameworks \
48         -Wl,-rpath,@executable_path/../Frameworks
49 endif
50
51 #lyx_LDFLAGS=-Wl,-O1
52
53 if INSTALL_MACOSX
54 APPLESPELL = AppleSpellChecker.cpp AppleSpellChecker.h
55 endif
56
57 if USE_ASPELL
58 ASPELL = AspellChecker.cpp AspellChecker.h
59 PWL = PersonalWordList.cpp PersonalWordList.h
60 endif
61
62 if USE_ENCHANT
63 ENCHANT = EnchantChecker.cpp EnchantChecker.h
64 PWL = PersonalWordList.cpp PersonalWordList.h
65 endif
66
67 if USE_HUNSPELL
68 HUNSPELL = HunspellChecker.cpp HunspellChecker.h
69 PWL = PersonalWordList.cpp PersonalWordList.h
70 endif
71
72 # These four objects are linked as object files as they are not
73 # referenced within the core and therefore are not picked up
74 # by the linker without looping over libs. We do not want that,
75 # and in fact libtools seems not able to do that.
76 lyx_SOURCES = \
77         main.cpp \
78         $(APPLESPELL) \
79         $(ASPELL) \
80         BiblioInfo.h \
81         BiblioInfo.cpp \
82         Box.cpp \
83         Box.h \
84         Compare.cpp \
85         Compare.h \
86         Dimension.cpp \
87         Dimension.h \
88         $(ENCHANT) \
89         $(HUNSPELL) \
90         $(PWL) \
91         LaTeXFonts.cpp \
92         LaTeXFonts.h \
93         PrinterParams.cpp \
94         PrinterParams.h \
95         Thesaurus.cpp \
96         Thesaurus.h
97
98 if LYX_WIN_RESOURCE
99 lyx_SOURCES += lyxwinres.rc
100 endif
101
102 SOURCEFILESCORE = \
103         Author.cpp \
104         Bidi.cpp \
105         boost.cpp \
106         BranchList.cpp \
107         Buffer.cpp \
108         buffer_funcs.cpp \
109         BufferList.cpp \
110         BufferParams.cpp \
111         BufferView.cpp \
112         Bullet.cpp \
113         Changes.cpp \
114         Chktex.cpp \
115         CmdDef.cpp \
116         Color.cpp \
117         ConverterCache.cpp \
118         Converter.cpp \
119         CoordCache.cpp \
120         Counters.cpp \
121         Cursor.cpp \
122         CursorSlice.cpp \
123         CutAndPaste.cpp \
124         DepTable.cpp \
125         DocIterator.cpp \
126         Encoding.cpp \
127         BufferEncodings.cpp \
128         ErrorList.cpp \
129         Exporter.cpp \
130         factory.cpp \
131         Floating.cpp \
132         FloatList.cpp \
133         FontInfo.cpp \
134         FontList.cpp \
135         Font.cpp \
136         Format.cpp \
137         FuncRequest.cpp \
138         FuncStatus.cpp \
139         Graph.cpp \
140         HSpace.cpp \
141         IndicesList.cpp \
142         InsetIterator.cpp \
143         InsetList.cpp \
144         Intl.cpp \
145         KeyMap.cpp \
146         KeySequence.cpp \
147         Language.cpp \
148         LaTeX.cpp \
149         LaTeXFeatures.cpp \
150         LaTeXPackages.cpp \
151         LayoutFile.cpp \
152         LayoutModuleList.cpp \
153         Length.cpp \
154         lengthcommon.cpp \
155         Lexer.cpp \
156         LyX.cpp \
157         LyXAction.cpp \
158         lyxfind.cpp \
159         LyXRC.cpp \
160         LyXVC.cpp \
161         MetricsInfo.cpp \
162         ModuleList.cpp \
163         Mover.cpp \
164         output_docbook.cpp \
165         output.cpp \
166         output_latex.cpp \
167         output_xhtml.cpp \
168         OutputParams.cpp \
169         output_plaintext.cpp \
170         Paragraph.cpp \
171         ParagraphMetrics.cpp \
172         ParagraphParameters.cpp \
173         ParIterator.cpp \
174         PDFOptions.cpp \
175         Row.cpp \
176         RowPainter.cpp \
177         Server.cpp \
178         ServerSocket.cpp \
179         sgml.cpp \
180         Session.cpp \
181         Spacing.cpp \
182         TexRow.cpp \
183         texstream.cpp \
184         Text.cpp \
185         Text2.cpp \
186         Text3.cpp \
187         TextClass.cpp \
188         TextMetrics.cpp \
189         TocBackend.cpp \
190         Trans.cpp \
191         Undo.cpp \
192         VCBackend.cpp \
193         version.cpp \
194         VSpace.cpp \
195         WordList.cpp
196
197 HEADERFILESCORE = \
198         Author.h \
199         Bidi.h \
200         BranchList.h \
201         buffer_funcs.h \
202         Buffer.h \
203         BufferEncodings.h \
204         BufferList.h \
205         BufferParams.h \
206         BufferView.h \
207         Bullet.h \
208         Citation.h \
209         Changes.h \
210         Chktex.h \
211         CmdDef.h \
212         ColorCode.h \
213         Color.h \
214         ColorSet.h \
215         CompletionList.h \
216         ConverterCache.h \
217         Converter.h \
218         CoordCache.h \
219         Counters.h \
220         Cursor.h \
221         CursorSlice.h \
222         CutAndPaste.h \
223         DepTable.h \
224         DispatchResult.h \
225         DocIterator.h \
226         DocumentClassPtr.h \
227         Encoding.h \
228         ErrorList.h \
229         Exporter.h \
230         factory.h \
231         Floating.h \
232         FloatList.h \
233         Font.h \
234         FontEnums.h \
235         FontInfo.h \
236         FontList.h \
237         Format.h \
238         FuncCode.h \
239         FuncRequest.h \
240         FuncStatus.h \
241         Graph.h \
242         HSpace.h \
243         IndicesList.h \
244         InsetIterator.h \
245         InsetList.h \
246         Intl.h \
247         KeyMap.h \
248         KeySequence.h \
249         Language.h \
250         LaTeXFeatures.h \
251         LaTeXPackages.h \
252         LaTeX.h \
253         Layout.h \
254         LayoutEnums.h \
255         LayoutFile.h \
256         LayoutModuleList.h \
257         Length.h \
258         Lexer.h \
259         LyXAction.h \
260         lyxfind.h \
261         LyX.h \
262         LyXRC.h \
263         LyXVC.h \
264         MetricsInfo.h \
265         ModuleList.h \
266         Mover.h \
267         output_docbook.h \
268         output.h \
269         OutputEnums.h \
270         output_latex.h \
271         output_xhtml.h \
272         OutputParams.h \
273         output_plaintext.h \
274         paper.h \
275         Paragraph.h \
276         ParagraphList.h \
277         ParagraphMetrics.h \
278         ParagraphParameters.h \
279         ParIterator.h \
280         PDFOptions.h \
281         Row.h \
282         RowPainter.h \
283         Server.h \
284         ServerSocket.h \
285         Session.h \
286         sgml.h \
287         Spacing.h \
288         SpellChecker.h \
289         TexRow.h \
290         texstream.h \
291         Text.h \
292         TextClass.h \
293         TextMetrics.h \
294         TocBackend.h \
295         Trans.h \
296         Undo.h \
297         update_flags.h \
298         VCBackend.h \
299         version.h \
300         VSpace.h \
301         WordLangTuple.h \
302         WordList.h
303
304 STANDALONEFILES = \
305         Layout.cpp
306
307
308 .PHONY: update_commit_hash
309
310 LCH_V_GEN = $(lch__v_GEN_@AM_V@)
311 lch__v_GEN_ = $(lch__v_GEN_@AM_DEFAULT_V@)
312 lch__v_GEN_0 = @echo "  GEN      lyx_commit_hash.h";
313 lch__v_GEN_1 =
314
315 update_commit_hash:
316         rm -f hash-temp \
317         $(LCH_V_GEN)hash=`cd "$(top_srcdir)" && git log -1 --pretty=format:%H 2>/dev/null || echo none` ; \
318         sed s/@LYX_GIT_COMMIT_HASH@/$$hash/ "$(srcdir)"/lyx_commit_hash.h.in >hash-temp ; \
319         cmp -s lyx_commit_hash.h hash-temp || cp hash-temp lyx_commit_hash.h ; \
320         rm -f hash-temp
321
322 lyx_commit_hash.h: update_commit_hash
323
324 BUILT_SOURCES = lyx_commit_hash.h
325 CLEANFILES = lyx_commit_hash.h
326
327 lyxcore.cpp:
328         @echo -e '$(SOURCEFILESCORE:%=\n#include "%")\n' > $@
329
330 if MONOLITHIC_CORE
331
332 BUILT_SOURCES += lyxcore.cpp $(STANDALONEFILES)
333 CLEANFILES += lyxcore.cpp
334
335 liblyxcore_a_SOURCES = lyxcore.cpp $(STANDALONEFILES) $(HEADERFILESCORE)
336
337 else
338
339 liblyxcore_a_SOURCES = $(SOURCEFILESCORE) $(STANDALONEFILES) $(HEADERFILESCORE)
340
341 endif
342
343 #########################  Qt stuff  ##############################
344
345 MOCHEADER = Compare.h PreviewLoader.h
346
347 if INSTALL_WINDOWS
348
349 MOCHEADER += Server.h
350 MOCFLAG = -D_WIN32
351
352 endif
353
354 MOCEDFILES = $(MOCHEADER:%.h=moc_%.cpp)
355
356 BUILT_SOURCES += $(MOCEDFILES)
357 CLEANFILES += $(MOCEDFILES)
358
359 moc_PreviewLoader.cpp: graphics/PreviewLoader.h
360         $(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
361
362 moc_%.cpp: %.h
363         $(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
364
365 liblyxcore_a_DEPENDENCIES = $(MOCEDFILES)
366
367 ############################### Graphics ##############################
368
369 noinst_LIBRARIES += liblyxgraphics.a
370
371 liblyxgraphics_a_SOURCES = \
372         graphics/epstools.h \
373         graphics/epstools.cpp \
374         graphics/GraphicsCache.h \
375         graphics/GraphicsCache.cpp \
376         graphics/GraphicsCacheItem.h \
377         graphics/GraphicsCacheItem.cpp \
378         graphics/GraphicsConverter.h \
379         graphics/GraphicsConverter.cpp \
380         graphics/GraphicsImage.h \
381         graphics/GraphicsLoader.h \
382         graphics/GraphicsLoader.cpp \
383         graphics/GraphicsParams.cpp \
384         graphics/GraphicsParams.h \
385         graphics/GraphicsTypes.h \
386         graphics/PreviewImage.h \
387         graphics/PreviewImage.cpp \
388         graphics/PreviewLoader.h \
389         graphics/PreviewLoader.cpp
390
391
392 ############################### Mathed  ##############################
393
394 noinst_LIBRARIES += liblyxmathed.a
395
396 SOURCEFILESMATHED = \
397         mathed/CommandInset.cpp \
398         mathed/InsetMathAMSArray.cpp \
399         mathed/InsetMathArray.cpp \
400         mathed/InsetMathBig.cpp \
401         mathed/InsetMathBoldSymbol.cpp \
402         mathed/InsetMathBox.cpp \
403         mathed/InsetMathBrace.cpp \
404         mathed/InsetMath.cpp \
405         mathed/InsetMathCases.cpp \
406         mathed/InsetMathChar.cpp \
407         mathed/InsetMathColor.cpp \
408         mathed/InsetMathComment.cpp \
409         mathed/InsetMathDecoration.cpp \
410         mathed/InsetMathDecoration.h \
411         mathed/InsetMathDelim.cpp \
412         mathed/InsetMathDiff.cpp \
413         mathed/InsetMathDots.cpp \
414         mathed/InsetMathEnsureMath.cpp \
415         mathed/InsetMathEnv.cpp \
416         mathed/InsetMathExFunc.cpp \
417         mathed/InsetMathExInt.cpp \
418         mathed/InsetMathFont.cpp \
419         mathed/InsetMathFontOld.cpp \
420         mathed/InsetMathFrac.cpp \
421         mathed/InsetMathGrid.cpp \
422         mathed/InsetMathHull.cpp \
423         mathed/InsetMathKern.cpp \
424         mathed/InsetMathLefteqn.cpp \
425         mathed/InsetMathLim.cpp \
426         mathed/InsetMathCancel.cpp \
427         mathed/InsetMathCancelto.cpp \
428         mathed/InsetMathMatrix.cpp \
429         mathed/InsetMathNest.cpp \
430         mathed/InsetMathNumber.cpp \
431         mathed/InsetMathOverset.cpp \
432         mathed/InsetMathPar.cpp \
433         mathed/InsetMathPhantom.cpp \
434         mathed/InsetMathRef.cpp \
435         mathed/InsetMathRoot.cpp \
436         mathed/InsetMathScript.cpp \
437         mathed/InsetMathSideset.cpp \
438         mathed/InsetMathSize.cpp \
439         mathed/InsetMathSpace.cpp \
440         mathed/InsetMathSpecialChar.cpp \
441         mathed/InsetMathSplit.cpp \
442         mathed/InsetMathSqrt.cpp \
443         mathed/InsetMathStackrel.cpp \
444         mathed/InsetMathString.cpp \
445         mathed/InsetMathSubstack.cpp \
446         mathed/InsetMathSymbol.cpp \
447         mathed/InsetMathTabular.cpp \
448         mathed/InsetMathUnderset.cpp \
449         mathed/InsetMathUnknown.cpp \
450         mathed/InsetMathXArrow.cpp \
451         mathed/InsetMathXYMatrix.cpp \
452         mathed/InsetMathDiagram.cpp \
453         mathed/MathAtom.cpp \
454         mathed/MathAutoCorrect.cpp \
455         mathed/MathData.cpp \
456         mathed/MathExtern.cpp \
457         mathed/MathFactory.cpp \
458         mathed/MathMacro.cpp \
459         mathed/MathMacroArgument.cpp \
460         mathed/MacroTable.cpp \
461         mathed/MathMacroTemplate.cpp \
462         mathed/MathParser.cpp \
463         mathed/MathStream.cpp \
464         mathed/MathSupport.cpp \
465         mathed/TextPainter.cpp
466
467 HEADERFILESMATHED = \
468         mathed/CommandInset.h \
469         mathed/InsetMathAMSArray.h \
470         mathed/InsetMathArray.h \
471         mathed/InsetMathBig.h \
472         mathed/InsetMathBoldSymbol.h \
473         mathed/InsetMathBox.h \
474         mathed/InsetMathBrace.h \
475         mathed/InsetMathCancel.h \
476         mathed/InsetMathCancelto.h \
477         mathed/InsetMathCases.h \
478         mathed/InsetMathChar.h \
479         mathed/InsetMathColor.h \
480         mathed/InsetMathComment.h \
481         mathed/InsetMathDelim.h \
482         mathed/InsetMathDiff.h \
483         mathed/InsetMathDots.h \
484         mathed/InsetMathEnsureMath.h \
485         mathed/InsetMathEnv.h \
486         mathed/InsetMathExFunc.h \
487         mathed/InsetMathExInt.h \
488         mathed/InsetMathFont.h \
489         mathed/InsetMathFontOld.h \
490         mathed/InsetMathFrac.h \
491         mathed/InsetMathGrid.h \
492         mathed/InsetMath.h \
493         mathed/InsetMathHull.h \
494         mathed/InsetMathKern.h \
495         mathed/InsetMathLefteqn.h \
496         mathed/InsetMathLim.h \
497         mathed/InsetMathMatrix.h \
498         mathed/InsetMathNest.h \
499         mathed/InsetMathNumber.h \
500         mathed/InsetMathOverset.h \
501         mathed/InsetMathPar.h \
502         mathed/InsetMathPhantom.h \
503         mathed/InsetMathRef.h \
504         mathed/InsetMathRoot.h \
505         mathed/InsetMathScript.h \
506         mathed/InsetMathSideset.h \
507         mathed/InsetMathSize.h \
508         mathed/InsetMathSpace.h \
509         mathed/InsetMathSpecialChar.h \
510         mathed/InsetMathSplit.h \
511         mathed/InsetMathSqrt.h \
512         mathed/InsetMathStackrel.h \
513         mathed/InsetMathString.h \
514         mathed/InsetMathSubstack.h \
515         mathed/InsetMathSymbol.h \
516         mathed/InsetMathTabular.h \
517         mathed/InsetMathUnderset.h \
518         mathed/InsetMathUnknown.h \
519         mathed/InsetMathXArrow.h \
520         mathed/InsetMathXYMatrix.h \
521         mathed/InsetMathDiagram.h \
522         mathed/MathAtom.h \
523         mathed/MathAutoCorrect.h \
524         mathed/MathData.h \
525         mathed/MathCompletionList.h \
526         mathed/MathExtern.h \
527         mathed/MathFactory.h \
528         mathed/MathMacro.h \
529         mathed/MathMacroArgument.h \
530         mathed/MacroTable.h \
531         mathed/MathMacroTemplate.h \
532         mathed/MathParser.h \
533         mathed/MathParser_flags.h \
534         mathed/ReplaceData.h \
535         mathed/MathStream.h \
536         mathed/MathSupport.h \
537         mathed/TextPainter.h
538
539 lyxmathed.cpp:
540         @echo -e '$(SOURCEFILESMATHED:%=\n#include "%")\n' > $@
541
542 if MONOLITHIC_MATHED
543
544 BUILT_SOURCES += lyxmathed.cpp
545 CLEANFILES += lyxmathed.cpp
546
547 liblyxmathed_a_SOURCES = lyxmathed.cpp $(HEADERFILESMATHED)
548
549 else
550
551 liblyxmathed_a_SOURCES = $(SOURCEFILESMATHED) $(HEADERFILESMATHED)
552
553 endif
554
555 ############################### Insets  ##############################
556
557 noinst_LIBRARIES += liblyxinsets.a
558
559 SOURCEFILESINSETS = \
560         insets/ExternalSupport.cpp \
561         insets/ExternalTemplate.cpp \
562         insets/ExternalTransforms.cpp \
563         insets/RenderButton.cpp \
564         insets/RenderGraphic.cpp \
565         insets/RenderPreview.cpp \
566         insets/Inset.cpp \
567         insets/InsetArgument.cpp \
568         insets/InsetBibitem.cpp \
569         insets/InsetBibtex.cpp \
570         insets/InsetBox.cpp \
571         insets/InsetBranch.cpp \
572         insets/InsetCaption.cpp \
573         insets/InsetCaptionable.cpp \
574         insets/InsetCitation.cpp \
575         insets/InsetCollapsable.cpp \
576         insets/InsetCommand.cpp \
577         insets/InsetCommandParams.cpp \
578         insets/InsetERT.cpp \
579         insets/InsetExternal.cpp \
580         insets/InsetFlex.cpp \
581         insets/InsetFloat.cpp \
582         insets/InsetFloatList.cpp \
583         insets/InsetFoot.cpp \
584         insets/InsetFootlike.cpp \
585         insets/InsetGraphicsParams.cpp \
586         insets/InsetGraphics.cpp \
587         insets/InsetHyperlink.cpp \
588         insets/InsetInclude.cpp \
589         insets/InsetIndex.cpp \
590         insets/InsetInfo.cpp \
591         insets/InsetIPA.cpp \
592         insets/InsetIPAMacro.cpp \
593         insets/InsetLabel.cpp \
594         insets/InsetLayout.cpp \
595         insets/InsetLine.cpp \
596         insets/InsetListings.cpp \
597         insets/InsetListingsParams.cpp \
598         insets/InsetMarginal.cpp \
599         insets/InsetNewline.cpp \
600         insets/InsetNewpage.cpp \
601         insets/InsetNomencl.cpp \
602         insets/InsetNote.cpp \
603         insets/InsetPhantom.cpp \
604         insets/InsetPreview.cpp \
605         insets/InsetQuotes.cpp \
606         insets/InsetRef.cpp \
607         insets/InsetScript.cpp \
608         insets/InsetSeparator.cpp \
609         insets/InsetSpace.cpp \
610         insets/InsetSpecialChar.cpp \
611         insets/InsetTabular.cpp \
612         insets/InsetText.cpp \
613         insets/InsetTOC.cpp \
614         insets/InsetVSpace.cpp \
615         insets/InsetWrap.cpp
616
617 HEADERFILESINSETS = \
618         insets/ExternalSupport.h \
619         insets/ExternalTemplate.h \
620         insets/ExternalTransforms.h \
621         insets/RenderBase.h \
622         insets/RenderButton.h \
623         insets/RenderGraphic.h \
624         insets/RenderPreview.h \
625         insets/Inset.h \
626         insets/InsetArgument.h \
627         insets/InsetBibitem.h \
628         insets/InsetBibtex.h \
629         insets/InsetBox.h \
630         insets/InsetBranch.h \
631         insets/InsetCaption.h \
632         insets/InsetCaptionable.h \
633         insets/InsetCitation.h \
634         insets/InsetCode.h \
635         insets/InsetCollapsable.h \
636         insets/InsetCommand.h \
637         insets/InsetCommandParams.h \
638         insets/InsetERT.h \
639         insets/InsetExternal.h \
640         insets/InsetFlex.h \
641         insets/InsetFloat.h \
642         insets/InsetFoot.h \
643         insets/InsetFloatList.h \
644         insets/InsetFootlike.h \
645         insets/InsetGraphicsParams.h \
646         insets/InsetGraphics.h \
647         insets/InsetHyperlink.h \
648         insets/InsetInclude.h \
649         insets/InsetIndex.h \
650         insets/InsetInfo.h \
651         insets/InsetIPA.h \
652         insets/InsetIPAMacro.h \
653         insets/InsetPreview.h \
654         insets/InsetLabel.h \
655         insets/InsetLayout.h \
656         insets/InsetLine.h \
657         insets/InsetListings.h \
658         insets/InsetListingsParams.h \
659         insets/InsetMarginal.h \
660         insets/InsetNewline.h \
661         insets/InsetNewpage.h \
662         insets/InsetNomencl.h \
663         insets/InsetNote.h \
664         insets/InsetPhantom.h \
665         insets/InsetQuotes.h \
666         insets/InsetRef.h \
667         insets/InsetScript.h \
668         insets/InsetSeparator.h \
669         insets/InsetSpace.h \
670         insets/InsetSpecialChar.h \
671         insets/InsetTabular.h \
672         insets/InsetText.h \
673         insets/InsetTOC.h \
674         insets/InsetVSpace.h \
675         insets/InsetWrap.h
676
677 #       insets/InsetList.cpp \
678 #       insets/InsetList.h \
679 #       insets/InsetSection.h \
680 #       insets/InsetSection.cpp
681
682 lyxinsets.cpp:
683         @echo -e '$(SOURCEFILESINSETS:%=\n#include "%")\n' > $@
684
685 if MONOLITHIC_INSETS
686
687 BUILT_SOURCES += lyxinsets.cpp
688 CLEANFILES += lyxinsets.cpp
689
690 liblyxinsets_a_SOURCES = lyxinsets.cpp $(HEADERFILESINSETS)
691
692 else
693
694 liblyxinsets_a_SOURCES = $(SOURCEFILESINSETS) $(HEADERFILESINSETS)
695
696 endif
697
698
699 ############################## Tests ##################################
700
701 EXTRA_DIST += \
702         tests/test_ExternalTransforms \
703         tests/regfiles/ExternalTransforms \
704         tests/regfiles/Length \
705         tests/test_layout \
706         tests/test_Length
707
708 TESTS = tests/test_ExternalTransforms tests/test_Length
709
710 alltests: check alltests-recursive
711
712 alltests-recursive: check_layout
713         @srcdir=$(srcdir) $(srcdir)/tests/test_layout; \
714         if test $$? -eq 0; then \
715                 echo -e "====================\nlayout tests passed.\n===================="; \
716         else \
717                 echo -e "====================\nlayout tests failed.\n===================="; \
718         fi
719         cd tex2lyx; $(MAKE) alltests-recursive
720
721 updatetests:
722         cd tex2lyx; $(MAKE) updatetests
723
724 check_PROGRAMS = \
725         check_ExternalTransforms \
726         check_Length \
727         check_layout
728
729 if INSTALL_MACOSX
730 ADD_FRAMEWORKS = -framework QtGui -framework QtCore -framework AppKit -framework ApplicationServices
731 endif
732
733 check_layout_CPPFLAGS = $(AM_CPPFLAGS)
734 check_layout_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ $(QT_LIB) $(LIBSHLWAPI)
735 check_layout_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
736 check_layout_SOURCES = \
737         insets/InsetLayout.cpp \
738         Color.cpp \
739         Counters.cpp \
740         Floating.cpp \
741         FloatList.cpp \
742         FontInfo.cpp \
743         Layout.cpp \
744         LayoutFile.cpp \
745         Lexer.cpp \
746         ModuleList.cpp \
747         Spacing.cpp \
748         TextClass.cpp \
749         tests/check_layout.cpp \
750         tests/boost.cpp \
751         tests/dummy_functions.cpp
752
753 check_ExternalTransforms_CPPFLAGS = $(AM_CPPFLAGS)
754 check_ExternalTransforms_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ $(QT_LIB) $(LIBSHLWAPI)
755 check_ExternalTransforms_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
756 check_ExternalTransforms_SOURCES = \
757         graphics/GraphicsParams.cpp \
758         insets/ExternalTransforms.cpp \
759         Length.cpp \
760         lengthcommon.cpp \
761         tests/check_ExternalTransforms.cpp \
762         tests/boost.cpp \
763         tests/dummy_functions.cpp
764
765 check_Length_CPPFLAGS = $(AM_CPPFLAGS)
766 check_Length_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ $(QT_LIB) $(LIBSHLWAPI)
767 check_Length_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
768 check_Length_SOURCES = \
769         Length.cpp \
770         lengthcommon.cpp \
771         tests/check_Length.cpp \
772         tests/boost.cpp \
773         tests/dummy_functions.cpp
774
775 .PHONY: alltests alltests-recursive updatetests