1 include $(top_srcdir)/config/common.am
3 ############################### Core ##############################
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)
10 if BUILD_CLIENT_SUBDIR
14 SUBDIRS = support frontends . $(CLIENT) tex2lyx
16 EXTRA_DIST = lyx_commit_hash.h.in \
18 graphics/CMakeLists.txt \
19 insets/CMakeLists.txt \
20 mathed/CMakeLists.txt \
23 OTHERLIBS = $(BOOST_LIBS) $(MYTHES_LIBS) $(ENCHANT_LIBS) $(HUNSPELL_LIBS) \
24 @LIBS@ $(ICONV_LIBS) $(ZLIB_LIBS) $(SOCKET_LIBS) \
25 $(LIBSHLWAPI) $(LIBPSAPI)
27 noinst_LIBRARIES = liblyxcore.a
34 frontends/liblyxfrontends.a \
35 frontends/qt4/liblyxqt4.a \
37 support/liblyxsupport.a \
44 cp $(top_srcdir)/development/Win32/packaging/icons/lyx_*32x32.ico .
45 $(RC) -I$(top_builddir) --preprocessor "$(CPP) -xc-header -DRC_INVOKED" $< -o $@
49 lyx_LDFLAGS = -framework AppKit -framework ApplicationServices \
50 -Wl,-rpath,@loader_path/../Frameworks \
51 -Wl,-rpath,@executable_path/../Frameworks
55 APPLESPELL = AppleSpellChecker.cpp AppleSpellChecker.h
59 ASPELL = AspellChecker.cpp AspellChecker.h
60 PWL = PersonalWordList.cpp PersonalWordList.h
64 ENCHANT = EnchantChecker.cpp EnchantChecker.h
65 PWL = PersonalWordList.cpp PersonalWordList.h
69 HUNSPELL = HunspellChecker.cpp HunspellChecker.h
70 PWL = PersonalWordList.cpp PersonalWordList.h
96 lyx_SOURCES += lyxwinres.rc
111 CiteEnginesList.cpp \
124 BufferEncodings.cpp \
149 LayoutModuleList.cpp \
166 output_plaintext.cpp \
168 ParagraphMetrics.cpp \
169 ParagraphParameters.cpp \
276 ParagraphParameters.h \
308 .PHONY: update_commit_hash
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";
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 ; \
322 lyx_commit_hash.h: update_commit_hash
324 BUILT_SOURCES = lyx_commit_hash.h
325 CLEANFILES = lyx_commit_hash.h
328 $(AM_V_GEN)for file in $(SOURCEFILESCORE) ; do echo '#include "'$${file}'"' ; done >$@
332 BUILT_SOURCES += lyxcore.cpp $(STANDALONEFILES)
333 CLEANFILES += lyxcore.cpp
335 nodist_liblyxcore_a_SOURCES = lyxcore.cpp
336 liblyxcore_a_SOURCES = $(STANDALONEFILES) $(HEADERFILESCORE)
340 liblyxcore_a_SOURCES = $(SOURCEFILESCORE) $(STANDALONEFILES) $(HEADERFILESCORE)
344 ######################### Qt stuff ##############################
346 MOCHEADER = Compare.h PreviewLoader.h
350 MOCHEADER += Server.h
355 MOCEDFILES = $(MOCHEADER:%.h=moc_%.cpp)
357 BUILT_SOURCES += $(MOCEDFILES)
358 CLEANFILES += $(MOCEDFILES)
360 moc_PreviewLoader.cpp: graphics/PreviewLoader.h
361 $(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
364 $(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
366 liblyxcore_a_DEPENDENCIES = $(MOCEDFILES)
368 ############################### Graphics ##############################
370 noinst_LIBRARIES += liblyxgraphics.a
372 liblyxgraphics_a_SOURCES = \
373 graphics/epstools.h \
374 graphics/epstools.cpp \
375 graphics/GraphicsCache.h \
376 graphics/GraphicsCache.cpp \
377 graphics/GraphicsCacheItem.h \
378 graphics/GraphicsCacheItem.cpp \
379 graphics/GraphicsConverter.h \
380 graphics/GraphicsConverter.cpp \
381 graphics/GraphicsImage.h \
382 graphics/GraphicsLoader.h \
383 graphics/GraphicsLoader.cpp \
384 graphics/GraphicsParams.cpp \
385 graphics/GraphicsParams.h \
386 graphics/GraphicsTypes.h \
387 graphics/PreviewImage.h \
388 graphics/PreviewImage.cpp \
389 graphics/PreviewLoader.h \
390 graphics/PreviewLoader.cpp
393 ############################### Mathed ##############################
395 noinst_LIBRARIES += liblyxmathed.a
397 SOURCEFILESMATHED = \
398 mathed/CommandInset.cpp \
399 mathed/InsetMathAMSArray.cpp \
400 mathed/InsetMathArray.cpp \
401 mathed/InsetMathBig.cpp \
402 mathed/InsetMathBoldSymbol.cpp \
403 mathed/InsetMathBox.cpp \
404 mathed/InsetMathBrace.cpp \
405 mathed/InsetMath.cpp \
406 mathed/InsetMathCancel.cpp \
407 mathed/InsetMathCancelto.cpp \
408 mathed/InsetMathCases.cpp \
409 mathed/InsetMathChar.cpp \
410 mathed/InsetMathClass.cpp \
411 mathed/InsetMathColor.cpp \
412 mathed/InsetMathComment.cpp \
413 mathed/InsetMathDecoration.cpp \
414 mathed/InsetMathDecoration.h \
415 mathed/InsetMathDelim.cpp \
416 mathed/InsetMathDiff.cpp \
417 mathed/InsetMathDots.cpp \
418 mathed/InsetMathEnsureMath.cpp \
419 mathed/InsetMathEnv.cpp \
420 mathed/InsetMathExFunc.cpp \
421 mathed/InsetMathExInt.cpp \
422 mathed/InsetMathFont.cpp \
423 mathed/InsetMathFontOld.cpp \
424 mathed/InsetMathFrac.cpp \
425 mathed/InsetMathGrid.cpp \
426 mathed/InsetMathHull.cpp \
427 mathed/InsetMathKern.cpp \
428 mathed/InsetMathLefteqn.cpp \
429 mathed/InsetMathLim.cpp \
430 mathed/InsetMathMatrix.cpp \
431 mathed/InsetMathNest.cpp \
432 mathed/InsetMathNumber.cpp \
433 mathed/InsetMathOverset.cpp \
434 mathed/InsetMathPar.cpp \
435 mathed/InsetMathPhantom.cpp \
436 mathed/InsetMathRef.cpp \
437 mathed/InsetMathRoot.cpp \
438 mathed/InsetMathScript.cpp \
439 mathed/InsetMathSideset.cpp \
440 mathed/InsetMathSize.cpp \
441 mathed/InsetMathSpace.cpp \
442 mathed/InsetMathSpecialChar.cpp \
443 mathed/InsetMathSplit.cpp \
444 mathed/InsetMathSqrt.cpp \
445 mathed/InsetMathStackrel.cpp \
446 mathed/InsetMathString.cpp \
447 mathed/InsetMathSubstack.cpp \
448 mathed/InsetMathSymbol.cpp \
449 mathed/InsetMathTabular.cpp \
450 mathed/InsetMathUnderset.cpp \
451 mathed/InsetMathUnknown.cpp \
452 mathed/InsetMathXArrow.cpp \
453 mathed/InsetMathXYMatrix.cpp \
454 mathed/InsetMathDiagram.cpp \
455 mathed/MacroTable.cpp \
456 mathed/MathAtom.cpp \
457 mathed/MathAutoCorrect.cpp \
458 mathed/MathClass.cpp \
459 mathed/MathData.cpp \
460 mathed/MathExtern.cpp \
461 mathed/MathFactory.cpp \
462 mathed/MathMacro.cpp \
463 mathed/MathMacroArgument.cpp \
464 mathed/MathMacroTemplate.cpp \
465 mathed/MathParser.cpp \
467 mathed/MathStream.cpp \
468 mathed/MathSupport.cpp \
469 mathed/TextPainter.cpp
471 HEADERFILESMATHED = \
472 mathed/CommandInset.h \
473 mathed/InsetMathAMSArray.h \
474 mathed/InsetMathArray.h \
475 mathed/InsetMathBig.h \
476 mathed/InsetMathBoldSymbol.h \
477 mathed/InsetMathBox.h \
478 mathed/InsetMathBrace.h \
479 mathed/InsetMathCancel.h \
480 mathed/InsetMathCancelto.h \
481 mathed/InsetMathCases.h \
482 mathed/InsetMathChar.h \
483 mathed/InsetMathClass.h \
484 mathed/InsetMathColor.h \
485 mathed/InsetMathComment.h \
486 mathed/InsetMathDelim.h \
487 mathed/InsetMathDiff.h \
488 mathed/InsetMathDots.h \
489 mathed/InsetMathEnsureMath.h \
490 mathed/InsetMathEnv.h \
491 mathed/InsetMathExFunc.h \
492 mathed/InsetMathExInt.h \
493 mathed/InsetMathFont.h \
494 mathed/InsetMathFontOld.h \
495 mathed/InsetMathFrac.h \
496 mathed/InsetMathGrid.h \
498 mathed/InsetMathHull.h \
499 mathed/InsetMathKern.h \
500 mathed/InsetMathLefteqn.h \
501 mathed/InsetMathLim.h \
502 mathed/InsetMathMatrix.h \
503 mathed/InsetMathNest.h \
504 mathed/InsetMathNumber.h \
505 mathed/InsetMathOverset.h \
506 mathed/InsetMathPar.h \
507 mathed/InsetMathPhantom.h \
508 mathed/InsetMathRef.h \
509 mathed/InsetMathRoot.h \
510 mathed/InsetMathScript.h \
511 mathed/InsetMathSideset.h \
512 mathed/InsetMathSize.h \
513 mathed/InsetMathSpace.h \
514 mathed/InsetMathSpecialChar.h \
515 mathed/InsetMathSplit.h \
516 mathed/InsetMathSqrt.h \
517 mathed/InsetMathStackrel.h \
518 mathed/InsetMathString.h \
519 mathed/InsetMathSubstack.h \
520 mathed/InsetMathSymbol.h \
521 mathed/InsetMathTabular.h \
522 mathed/InsetMathUnderset.h \
523 mathed/InsetMathUnknown.h \
524 mathed/InsetMathXArrow.h \
525 mathed/InsetMathXYMatrix.h \
526 mathed/InsetMathDiagram.h \
528 mathed/MathAutoCorrect.h \
531 mathed/MathCompletionList.h \
532 mathed/MathExtern.h \
533 mathed/MathFactory.h \
535 mathed/MathMacroArgument.h \
536 mathed/MacroTable.h \
537 mathed/MathMacroTemplate.h \
538 mathed/MathParser.h \
539 mathed/MathParser_flags.h \
541 mathed/ReplaceData.h \
542 mathed/MathStream.h \
543 mathed/MathSupport.h \
547 $(AM_V_GEN)for file in $(SOURCEFILESMATHED) ; do echo '#include "'$${file}'"' ; done >$@
551 BUILT_SOURCES += lyxmathed.cpp
552 CLEANFILES += lyxmathed.cpp
554 nodist_liblyxmathed_a_SOURCES = lyxmathed.cpp
555 liblyxmathed_a_SOURCES = $(HEADERFILESMATHED)
559 liblyxmathed_a_SOURCES = $(SOURCEFILESMATHED) $(HEADERFILESMATHED)
563 ############################### Insets ##############################
565 noinst_LIBRARIES += liblyxinsets.a
567 SOURCEFILESINSETS = \
568 insets/ExternalSupport.cpp \
569 insets/ExternalTemplate.cpp \
570 insets/ExternalTransforms.cpp \
571 insets/RenderButton.cpp \
572 insets/RenderGraphic.cpp \
573 insets/RenderPreview.cpp \
575 insets/InsetArgument.cpp \
576 insets/InsetBibitem.cpp \
577 insets/InsetBibtex.cpp \
578 insets/InsetBox.cpp \
579 insets/InsetBranch.cpp \
580 insets/InsetCaption.cpp \
581 insets/InsetCaptionable.cpp \
582 insets/InsetCitation.cpp \
583 insets/InsetCollapsable.cpp \
584 insets/InsetCommand.cpp \
585 insets/InsetCommandParams.cpp \
586 insets/InsetERT.cpp \
587 insets/InsetExternal.cpp \
588 insets/InsetFlex.cpp \
589 insets/InsetFloat.cpp \
590 insets/InsetFloatList.cpp \
591 insets/InsetFoot.cpp \
592 insets/InsetFootlike.cpp \
593 insets/InsetGraphicsParams.cpp \
594 insets/InsetGraphics.cpp \
595 insets/InsetHyperlink.cpp \
596 insets/InsetInclude.cpp \
597 insets/InsetIndex.cpp \
598 insets/InsetInfo.cpp \
599 insets/InsetIPA.cpp \
600 insets/InsetIPAMacro.cpp \
601 insets/InsetLabel.cpp \
602 insets/InsetLayout.cpp \
603 insets/InsetLine.cpp \
604 insets/InsetListings.cpp \
605 insets/InsetListingsParams.cpp \
606 insets/InsetMarginal.cpp \
607 insets/InsetNewline.cpp \
608 insets/InsetNewpage.cpp \
609 insets/InsetNomencl.cpp \
610 insets/InsetNote.cpp \
611 insets/InsetPhantom.cpp \
612 insets/InsetPreview.cpp \
613 insets/InsetQuotes.cpp \
614 insets/InsetRef.cpp \
615 insets/InsetScript.cpp \
616 insets/InsetSeparator.cpp \
617 insets/InsetSpace.cpp \
618 insets/InsetSpecialChar.cpp \
619 insets/InsetTabular.cpp \
620 insets/InsetText.cpp \
621 insets/InsetTOC.cpp \
622 insets/InsetVSpace.cpp \
625 HEADERFILESINSETS = \
626 insets/ExternalSupport.h \
627 insets/ExternalTemplate.h \
628 insets/ExternalTransforms.h \
629 insets/RenderBase.h \
630 insets/RenderButton.h \
631 insets/RenderGraphic.h \
632 insets/RenderPreview.h \
634 insets/InsetArgument.h \
635 insets/InsetBibitem.h \
636 insets/InsetBibtex.h \
638 insets/InsetBranch.h \
639 insets/InsetCaption.h \
640 insets/InsetCaptionable.h \
641 insets/InsetCitation.h \
643 insets/InsetCollapsable.h \
644 insets/InsetCommand.h \
645 insets/InsetCommandParams.h \
647 insets/InsetExternal.h \
649 insets/InsetFloat.h \
651 insets/InsetFloatList.h \
652 insets/InsetFootlike.h \
653 insets/InsetGraphicsParams.h \
654 insets/InsetGraphics.h \
655 insets/InsetHyperlink.h \
656 insets/InsetInclude.h \
657 insets/InsetIndex.h \
660 insets/InsetIPAMacro.h \
661 insets/InsetPreview.h \
662 insets/InsetLabel.h \
663 insets/InsetLayout.h \
665 insets/InsetListings.h \
666 insets/InsetListingsParams.h \
667 insets/InsetMarginal.h \
668 insets/InsetNewline.h \
669 insets/InsetNewpage.h \
670 insets/InsetNomencl.h \
672 insets/InsetPhantom.h \
673 insets/InsetQuotes.h \
675 insets/InsetScript.h \
676 insets/InsetSeparator.h \
677 insets/InsetSpace.h \
678 insets/InsetSpecialChar.h \
679 insets/InsetTabular.h \
682 insets/InsetVSpace.h \
686 $(AM_V_GEN)for file in $(SOURCEFILESINSETS) ; do echo '#include "'$${file}'"' ; done >$@
690 BUILT_SOURCES += lyxinsets.cpp
691 CLEANFILES += lyxinsets.cpp
693 nodist_liblyxinsets_a_SOURCES = lyxinsets.cpp
694 liblyxinsets_a_SOURCES = $(HEADERFILESINSETS)
698 liblyxinsets_a_SOURCES = $(SOURCEFILESINSETS) $(HEADERFILESINSETS)
703 ############################## Tests ##################################
706 tests/test_ExternalTransforms \
707 tests/test_ListingsCaption \
708 tests/regfiles/ExternalTransforms \
709 tests/regfiles/Length \
710 tests/regfiles/ListingsCaption \
714 TESTS = tests/test_ExternalTransforms tests/test_Length tests/test_ListingsCaption
716 alltests: check alltests-recursive
718 alltests-recursive: check_layout
719 @srcdir=$(srcdir) $(srcdir)/tests/test_layout; \
720 if test $$? -eq 0; then \
721 echo -e "====================\nlayout tests passed.\n===================="; \
723 echo -e "====================\nlayout tests failed.\n===================="; \
725 cd tex2lyx; $(MAKE) alltests-recursive
728 cd tex2lyx; $(MAKE) updatetests
731 check_ExternalTransforms \
733 check_ListingsCaption \
737 ADD_FRAMEWORKS = -framework QtGui -framework QtCore -framework AppKit -framework ApplicationServices
740 check_layout_CPPFLAGS = $(AM_CPPFLAGS)
741 check_layout_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ \
742 $(ICONV_LIBS) $(ZLIB_LIBS) $(QT_LIB) $(LIBSHLWAPI)
743 check_layout_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
744 check_layout_SOURCES = \
745 insets/InsetLayout.cpp \
757 support/tests/dummy_functions.cpp \
758 tests/check_layout.cpp \
761 check_ExternalTransforms_CPPFLAGS = $(AM_CPPFLAGS)
762 check_ExternalTransforms_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ \
763 $(ICONV_LIBS) $(ZLIB_LIBS) $(QT_LIB) $(LIBSHLWAPI)
764 check_ExternalTransforms_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
765 check_ExternalTransforms_SOURCES = \
766 graphics/GraphicsParams.cpp \
767 insets/ExternalTransforms.cpp \
770 support/tests/dummy_functions.cpp \
771 tests/check_ExternalTransforms.cpp \
774 check_Length_CPPFLAGS = $(AM_CPPFLAGS)
775 check_Length_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ \
776 $(ICONV_LIBS) $(ZLIB_LIBS) $(QT_LIB) $(LIBSHLWAPI)
777 check_Length_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
778 check_Length_SOURCES = \
781 support/tests/dummy_functions.cpp \
782 tests/check_Length.cpp \
785 check_ListingsCaption_CPPFLAGS = $(AM_CPPFLAGS)
786 check_ListingsCaption_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ \
787 $(ICONV_LIBS) $(ZLIB_LIBS) $(QT_LIB) $(LIBSHLWAPI)
788 check_ListingsCaption_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
789 check_ListingsCaption_SOURCES = \
790 support/tests/dummy_functions.cpp \
791 tests/check_ListingsCaption.cpp \
794 .PHONY: alltests alltests-recursive updatetests