1 include $(top_srcdir)/config/common.am
3 ############################### Core ##############################
5 AM_CPPFLAGS += $(PCH_FLAGS) -I$(top_srcdir)/src $(BOOST_INCLUDES) $(ENCHANT_CFLAGS) $(HUNSPELL_CFLAGS)
6 AM_CPPFLAGS += $(QT_CPPFLAGS) $(QT_CORE_INCLUDES)
12 SUBDIRS = support frontends . $(CLIENT) tex2lyx
14 EXTRA_DIST = lyx_commit_hash.h.in \
17 graphics/CMakeLists.txt \
18 insets/CMakeLists.txt \
19 mathed/CMakeLists.txt \
22 OTHERLIBS = $(BOOST_LIBS) $(MYTHES_LIBS) $(ENCHANT_LIBS) $(HUNSPELL_LIBS) \
23 @LIBS@ $(SOCKET_LIBS) $(LIBSHLWAPI) $(LIBPSAPI)
25 noinst_LIBRARIES = liblyxcore.a
32 frontends/liblyxfrontends.a \
33 frontends/qt4/liblyxqt4.a \
35 support/liblyxsupport.a \
42 cp $(top_srcdir)/development/Win32/packaging/icons/lyx_*32x32.ico .
43 windres -I$(top_builddir) --preprocessor "$(CPP) -xc-header -DRC_INVOKED" $< -o $@
47 lyx_LDFLAGS = -framework AppKit -framework ApplicationServices \
48 -Wl,-rpath,@loader_path/../Frameworks \
49 -Wl,-rpath,@executable_path/../Frameworks
54 BUILT_SOURCES = $(PCH_FILE)
57 APPLESPELL = AppleSpellChecker.cpp AppleSpellChecker.h
61 ASPELL = AspellChecker.cpp AspellChecker.h
62 PWL = PersonalWordList.cpp PersonalWordList.h
66 ENCHANT = EnchantChecker.cpp EnchantChecker.h
67 PWL = PersonalWordList.cpp PersonalWordList.h
71 HUNSPELL = HunspellChecker.cpp HunspellChecker.h
72 PWL = PersonalWordList.cpp PersonalWordList.h
75 # These four objects are linked as object files as they are not
76 # referenced within the core and therefore are not picked up
77 # by the linker without looping over libs. We do not want that,
78 # and in fact libtools seems not able to do that.
102 lyx_SOURCES += lyxwinres.rc
130 BufferEncodings.cpp \
155 LayoutModuleList.cpp \
172 output_plaintext.cpp \
174 ParagraphMetrics.cpp \
175 ParagraphParameters.cpp \
281 ParagraphParameters.h \
311 .PHONY: update_commit_hash
313 LCH_V_GEN = $(lch__v_GEN_@AM_V@)
314 lch__v_GEN_ = $(lch__v_GEN_@AM_DEFAULT_V@)
315 lch__v_GEN_0 = @echo " GEN lyx_commit_hash.h";
320 $(LCH_V_GEN)hash=`cd "$(top_srcdir)" && git log -1 --pretty=format:%H 2>/dev/null || echo none` ; \
321 sed s/@LYX_GIT_COMMIT_HASH@/$$hash/ "$(srcdir)"/lyx_commit_hash.h.in >hash-temp ; \
322 cmp -s lyx_commit_hash.h hash-temp || cp hash-temp lyx_commit_hash.h ; \
325 lyx_commit_hash.h: update_commit_hash
327 BUILT_SOURCES += lyx_commit_hash.h
328 CLEANFILES += lyx_commit_hash.h
331 @echo -e '$(SOURCEFILESCORE:%=\n#include "%")\n' > $@
335 BUILT_SOURCES += lyxcore.cpp $(STANDALONEFILES)
336 CLEANFILES += lyxcore.cpp
338 liblyxcore_a_SOURCES = lyxcore.cpp $(STANDALONEFILES) $(HEADERFILESCORE)
342 liblyxcore_a_SOURCES = $(SOURCEFILESCORE) $(STANDALONEFILES) $(HEADERFILESCORE)
346 ######################### Qt stuff ##############################
348 MOCHEADER = Compare.h PreviewLoader.h
352 MOCHEADER += Server.h
357 MOCEDFILES = $(MOCHEADER:%.h=moc_%.cpp)
359 BUILT_SOURCES += $(MOCEDFILES)
360 CLEANFILES += $(MOCEDFILES)
362 moc_PreviewLoader.cpp: graphics/PreviewLoader.h
363 $(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
366 $(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
368 liblyxcore_a_DEPENDENCIES = $(MOCEDFILES)
370 ############################### Graphics ##############################
372 noinst_LIBRARIES += liblyxgraphics.a
374 liblyxgraphics_a_SOURCES = \
375 graphics/epstools.h \
376 graphics/epstools.cpp \
377 graphics/GraphicsCache.h \
378 graphics/GraphicsCache.cpp \
379 graphics/GraphicsCacheItem.h \
380 graphics/GraphicsCacheItem.cpp \
381 graphics/GraphicsConverter.h \
382 graphics/GraphicsConverter.cpp \
383 graphics/GraphicsImage.h \
384 graphics/GraphicsLoader.h \
385 graphics/GraphicsLoader.cpp \
386 graphics/GraphicsParams.cpp \
387 graphics/GraphicsParams.h \
388 graphics/GraphicsTypes.h \
389 graphics/PreviewImage.h \
390 graphics/PreviewImage.cpp \
391 graphics/PreviewLoader.h \
392 graphics/PreviewLoader.cpp
395 ############################### Mathed ##############################
397 noinst_LIBRARIES += liblyxmathed.a
399 SOURCEFILESMATHED = \
400 mathed/CommandInset.cpp \
401 mathed/InsetMathAMSArray.cpp \
402 mathed/InsetMathArray.cpp \
403 mathed/InsetMathBig.cpp \
404 mathed/InsetMathBoldSymbol.cpp \
405 mathed/InsetMathBox.cpp \
406 mathed/InsetMathBrace.cpp \
407 mathed/InsetMath.cpp \
408 mathed/InsetMathCases.cpp \
409 mathed/InsetMathChar.cpp \
410 mathed/InsetMathColor.cpp \
411 mathed/InsetMathComment.cpp \
412 mathed/InsetMathDecoration.cpp \
413 mathed/InsetMathDecoration.h \
414 mathed/InsetMathDelim.cpp \
415 mathed/InsetMathDiff.cpp \
416 mathed/InsetMathDots.cpp \
417 mathed/InsetMathEnsureMath.cpp \
418 mathed/InsetMathEnv.cpp \
419 mathed/InsetMathExFunc.cpp \
420 mathed/InsetMathExInt.cpp \
421 mathed/InsetMathFont.cpp \
422 mathed/InsetMathFontOld.cpp \
423 mathed/InsetMathFrac.cpp \
424 mathed/InsetMathGrid.cpp \
425 mathed/InsetMathHull.cpp \
426 mathed/InsetMathKern.cpp \
427 mathed/InsetMathLefteqn.cpp \
428 mathed/InsetMathLim.cpp \
429 mathed/InsetMathCancel.cpp \
430 mathed/InsetMathCancelto.cpp \
431 mathed/InsetMathMatrix.cpp \
432 mathed/InsetMathNest.cpp \
433 mathed/InsetMathNumber.cpp \
434 mathed/InsetMathOverset.cpp \
435 mathed/InsetMathPar.cpp \
436 mathed/InsetMathPhantom.cpp \
437 mathed/InsetMathRef.cpp \
438 mathed/InsetMathRoot.cpp \
439 mathed/InsetMathScript.cpp \
440 mathed/InsetMathSideset.cpp \
441 mathed/InsetMathSize.cpp \
442 mathed/InsetMathSpace.cpp \
443 mathed/InsetMathSpecialChar.cpp \
444 mathed/InsetMathSplit.cpp \
445 mathed/InsetMathSqrt.cpp \
446 mathed/InsetMathStackrel.cpp \
447 mathed/InsetMathString.cpp \
448 mathed/InsetMathSubstack.cpp \
449 mathed/InsetMathSymbol.cpp \
450 mathed/InsetMathTabular.cpp \
451 mathed/InsetMathUnderset.cpp \
452 mathed/InsetMathUnknown.cpp \
453 mathed/InsetMathXArrow.cpp \
454 mathed/InsetMathXYMatrix.cpp \
455 mathed/InsetMathDiagram.cpp \
456 mathed/MathAtom.cpp \
457 mathed/MathAutoCorrect.cpp \
458 mathed/MathData.cpp \
459 mathed/MathExtern.cpp \
460 mathed/MathFactory.cpp \
461 mathed/MathMacro.cpp \
462 mathed/MathMacroArgument.cpp \
463 mathed/MacroTable.cpp \
464 mathed/MathMacroTemplate.cpp \
465 mathed/MathParser.cpp \
466 mathed/MathStream.cpp \
467 mathed/MathSupport.cpp \
468 mathed/TextPainter.cpp
470 HEADERFILESMATHED = \
471 mathed/CommandInset.h \
472 mathed/InsetMathAMSArray.h \
473 mathed/InsetMathArray.h \
474 mathed/InsetMathBig.h \
475 mathed/InsetMathBoldSymbol.h \
476 mathed/InsetMathBox.h \
477 mathed/InsetMathBrace.h \
478 mathed/InsetMathCancel.h \
479 mathed/InsetMathCancelto.h \
480 mathed/InsetMathCases.h \
481 mathed/InsetMathChar.h \
482 mathed/InsetMathColor.h \
483 mathed/InsetMathComment.h \
484 mathed/InsetMathDelim.h \
485 mathed/InsetMathDiff.h \
486 mathed/InsetMathDots.h \
487 mathed/InsetMathEnsureMath.h \
488 mathed/InsetMathEnv.h \
489 mathed/InsetMathExFunc.h \
490 mathed/InsetMathExInt.h \
491 mathed/InsetMathFont.h \
492 mathed/InsetMathFontOld.h \
493 mathed/InsetMathFrac.h \
494 mathed/InsetMathGrid.h \
496 mathed/InsetMathHull.h \
497 mathed/InsetMathKern.h \
498 mathed/InsetMathLefteqn.h \
499 mathed/InsetMathLim.h \
500 mathed/InsetMathMatrix.h \
501 mathed/InsetMathNest.h \
502 mathed/InsetMathNumber.h \
503 mathed/InsetMathOverset.h \
504 mathed/InsetMathPar.h \
505 mathed/InsetMathPhantom.h \
506 mathed/InsetMathRef.h \
507 mathed/InsetMathRoot.h \
508 mathed/InsetMathScript.h \
509 mathed/InsetMathSideset.h \
510 mathed/InsetMathSize.h \
511 mathed/InsetMathSpace.h \
512 mathed/InsetMathSpecialChar.h \
513 mathed/InsetMathSplit.h \
514 mathed/InsetMathSqrt.h \
515 mathed/InsetMathStackrel.h \
516 mathed/InsetMathString.h \
517 mathed/InsetMathSubstack.h \
518 mathed/InsetMathSymbol.h \
519 mathed/InsetMathTabular.h \
520 mathed/InsetMathUnderset.h \
521 mathed/InsetMathUnknown.h \
522 mathed/InsetMathXArrow.h \
523 mathed/InsetMathXYMatrix.h \
524 mathed/InsetMathDiagram.h \
526 mathed/MathAutoCorrect.h \
528 mathed/MathCompletionList.h \
529 mathed/MathExtern.h \
530 mathed/MathFactory.h \
532 mathed/MathMacroArgument.h \
533 mathed/MacroTable.h \
534 mathed/MathMacroTemplate.h \
535 mathed/MathParser.h \
536 mathed/MathParser_flags.h \
537 mathed/ReplaceData.h \
538 mathed/MathStream.h \
539 mathed/MathSupport.h \
543 @echo -e '$(SOURCEFILESMATHED:%=\n#include "%")\n' > $@
547 BUILT_SOURCES += lyxmathed.cpp
548 CLEANFILES += lyxmathed.cpp
550 liblyxmathed_a_SOURCES = lyxmathed.cpp $(HEADERFILESMATHED)
554 liblyxmathed_a_SOURCES = $(SOURCEFILESMATHED) $(HEADERFILESMATHED)
558 ############################### Insets ##############################
560 noinst_LIBRARIES += liblyxinsets.a
562 SOURCEFILESINSETS = \
563 insets/ExternalSupport.cpp \
564 insets/ExternalTemplate.cpp \
565 insets/ExternalTransforms.cpp \
566 insets/RenderButton.cpp \
567 insets/RenderGraphic.cpp \
568 insets/RenderPreview.cpp \
570 insets/InsetArgument.cpp \
571 insets/InsetBibitem.cpp \
572 insets/InsetBibtex.cpp \
573 insets/InsetBox.cpp \
574 insets/InsetBranch.cpp \
575 insets/InsetCaption.cpp \
576 insets/InsetCitation.cpp \
577 insets/InsetCollapsable.cpp \
578 insets/InsetCommand.cpp \
579 insets/InsetCommandParams.cpp \
580 insets/InsetERT.cpp \
581 insets/InsetExternal.cpp \
582 insets/InsetFlex.cpp \
583 insets/InsetFloat.cpp \
584 insets/InsetFloatList.cpp \
585 insets/InsetFoot.cpp \
586 insets/InsetFootlike.cpp \
587 insets/InsetGraphicsParams.cpp \
588 insets/InsetGraphics.cpp \
589 insets/InsetHyperlink.cpp \
590 insets/InsetInclude.cpp \
591 insets/InsetIndex.cpp \
592 insets/InsetInfo.cpp \
593 insets/InsetIPA.cpp \
594 insets/InsetIPAMacro.cpp \
595 insets/InsetLabel.cpp \
596 insets/InsetLayout.cpp \
597 insets/InsetLine.cpp \
598 insets/InsetListings.cpp \
599 insets/InsetListingsParams.cpp \
600 insets/InsetMarginal.cpp \
601 insets/InsetNewline.cpp \
602 insets/InsetNewpage.cpp \
603 insets/InsetNomencl.cpp \
604 insets/InsetNote.cpp \
605 insets/InsetPhantom.cpp \
606 insets/InsetPreview.cpp \
607 insets/InsetQuotes.cpp \
608 insets/InsetRef.cpp \
609 insets/InsetScript.cpp \
610 insets/InsetSeparator.cpp \
611 insets/InsetSpace.cpp \
612 insets/InsetSpecialChar.cpp \
613 insets/InsetTabular.cpp \
614 insets/InsetText.cpp \
615 insets/InsetTOC.cpp \
616 insets/InsetVSpace.cpp \
619 HEADERFILESINSETS = \
620 insets/ExternalSupport.h \
621 insets/ExternalTemplate.h \
622 insets/ExternalTransforms.h \
623 insets/RenderBase.h \
624 insets/RenderButton.h \
625 insets/RenderGraphic.h \
626 insets/RenderPreview.h \
628 insets/InsetArgument.h \
629 insets/InsetBibitem.h \
630 insets/InsetBibtex.h \
632 insets/InsetBranch.h \
633 insets/InsetCaption.h \
634 insets/InsetCitation.h \
636 insets/InsetCollapsable.h \
637 insets/InsetCommand.h \
638 insets/InsetCommandParams.h \
640 insets/InsetExternal.h \
642 insets/InsetFloat.h \
644 insets/InsetFloatList.h \
645 insets/InsetFootlike.h \
646 insets/InsetGraphicsParams.h \
647 insets/InsetGraphics.h \
648 insets/InsetHyperlink.h \
649 insets/InsetInclude.h \
650 insets/InsetIndex.h \
653 insets/InsetIPAMacro.h \
654 insets/InsetPreview.h \
655 insets/InsetLabel.h \
656 insets/InsetLayout.h \
658 insets/InsetListings.h \
659 insets/InsetListingsParams.h \
660 insets/InsetMarginal.h \
661 insets/InsetNewline.h \
662 insets/InsetNewpage.h \
663 insets/InsetNomencl.h \
665 insets/InsetPhantom.h \
666 insets/InsetQuotes.h \
668 insets/InsetScript.h \
669 insets/InsetSeparator.h \
670 insets/InsetSpace.h \
671 insets/InsetSpecialChar.h \
672 insets/InsetTabular.h \
675 insets/InsetVSpace.h \
678 # insets/InsetList.cpp \
679 # insets/InsetList.h \
680 # insets/InsetSection.h \
681 # insets/InsetSection.cpp
684 @echo -e '$(SOURCEFILESINSETS:%=\n#include "%")\n' > $@
688 BUILT_SOURCES += lyxinsets.cpp
689 CLEANFILES += lyxinsets.cpp
691 liblyxinsets_a_SOURCES = lyxinsets.cpp $(HEADERFILESINSETS)
695 liblyxinsets_a_SOURCES = $(SOURCEFILESINSETS) $(HEADERFILESINSETS)
700 ############################## Tests ##################################
703 tests/test_ExternalTransforms \
704 tests/regfiles/ExternalTransforms \
705 tests/regfiles/Length \
709 TESTS = tests/test_ExternalTransforms tests/test_Length
711 alltests: check alltests-recursive
713 alltests-recursive: check_layout
714 @srcdir=$(srcdir) $(srcdir)/tests/test_layout; \
715 if test $$? -eq 0; then \
716 echo -e "====================\nlayout tests passed.\n===================="; \
718 echo -e "====================\nlayout tests failed.\n===================="; \
720 cd tex2lyx; $(MAKE) alltests-recursive
723 cd tex2lyx; $(MAKE) updatetests
726 check_ExternalTransforms \
731 ADD_FRAMEWORKS = -framework QtGui -framework QtCore -framework AppKit -framework ApplicationServices
734 check_layout_CPPFLAGS = $(AM_CPPFLAGS)
735 check_layout_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ $(QT_LIB) $(LIBSHLWAPI)
736 check_layout_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
737 check_layout_SOURCES = \
738 insets/InsetLayout.cpp \
750 tests/check_layout.cpp \
752 tests/dummy_functions.cpp
754 check_ExternalTransforms_CPPFLAGS = $(AM_CPPFLAGS)
755 check_ExternalTransforms_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ $(QT_LIB) $(LIBSHLWAPI)
756 check_ExternalTransforms_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
757 check_ExternalTransforms_SOURCES = \
758 graphics/GraphicsParams.cpp \
759 insets/ExternalTransforms.cpp \
762 tests/check_ExternalTransforms.cpp \
764 tests/dummy_functions.cpp
766 check_Length_CPPFLAGS = $(AM_CPPFLAGS)
767 check_Length_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ $(QT_LIB) $(LIBSHLWAPI)
768 check_Length_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
769 check_Length_SOURCES = \
772 tests/check_Length.cpp \
774 tests/dummy_functions.cpp
776 .PHONY: alltests alltests-recursive updatetests