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