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