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