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) $(MYTHES_INCLUDES)
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 \
148 LayoutModuleList.cpp \
165 output_plaintext.cpp \
167 ParagraphMetrics.cpp \
168 ParagraphParameters.cpp \
274 ParagraphParameters.h \
306 .PHONY: update_commit_hash
308 LCH_V_GEN = $(lch__v_GEN_@AM_V@)
309 lch__v_GEN_ = $(lch__v_GEN_@AM_DEFAULT_V@)
310 lch__v_GEN_0 = @echo " GEN lyx_commit_hash.h";
315 $(LCH_V_GEN)hash=`cd "$(top_srcdir)" && git log -1 --pretty=format:%H 2>/dev/null || echo none` ; \
316 sed s/@LYX_GIT_COMMIT_HASH@/$$hash/ "$(srcdir)"/lyx_commit_hash.h.in >hash-temp ; \
317 cmp -s lyx_commit_hash.h hash-temp || cp hash-temp lyx_commit_hash.h ; \
320 lyx_commit_hash.h: update_commit_hash
322 BUILT_SOURCES = lyx_commit_hash.h
323 CLEANFILES = lyx_commit_hash.h
326 $(AM_V_GEN)for file in $(SOURCEFILESCORE) ; do echo '#include "'$${file}'"' ; done >$@
330 BUILT_SOURCES += lyxcore.cpp $(STANDALONEFILES)
331 CLEANFILES += lyxcore.cpp
333 nodist_liblyxcore_a_SOURCES = lyxcore.cpp
334 liblyxcore_a_SOURCES = $(STANDALONEFILES) $(HEADERFILESCORE)
338 liblyxcore_a_SOURCES = $(SOURCEFILESCORE) $(STANDALONEFILES) $(HEADERFILESCORE)
342 ######################### Qt stuff ##############################
344 MOCHEADER = Compare.h PreviewLoader.h
348 MOCHEADER += Server.h
353 MOCEDFILES = $(MOCHEADER:%.h=moc_%.cpp)
355 BUILT_SOURCES += $(MOCEDFILES)
356 CLEANFILES += $(MOCEDFILES)
358 moc_PreviewLoader.cpp: graphics/PreviewLoader.h
359 $(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
362 $(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
364 liblyxcore_a_DEPENDENCIES = $(MOCEDFILES)
366 ############################### Graphics ##############################
368 noinst_LIBRARIES += liblyxgraphics.a
370 liblyxgraphics_a_SOURCES = \
371 graphics/epstools.h \
372 graphics/epstools.cpp \
373 graphics/GraphicsCache.h \
374 graphics/GraphicsCache.cpp \
375 graphics/GraphicsCacheItem.h \
376 graphics/GraphicsCacheItem.cpp \
377 graphics/GraphicsConverter.h \
378 graphics/GraphicsConverter.cpp \
379 graphics/GraphicsImage.h \
380 graphics/GraphicsLoader.h \
381 graphics/GraphicsLoader.cpp \
382 graphics/GraphicsParams.cpp \
383 graphics/GraphicsParams.h \
384 graphics/GraphicsTypes.h \
385 graphics/PreviewImage.h \
386 graphics/PreviewImage.cpp \
387 graphics/PreviewLoader.h \
388 graphics/PreviewLoader.cpp
391 ############################### Mathed ##############################
393 noinst_LIBRARIES += liblyxmathed.a
395 SOURCEFILESMATHED = \
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/InsetMathCancel.cpp \
404 mathed/InsetMathCancelto.cpp \
405 mathed/InsetMathCases.cpp \
406 mathed/InsetMathChar.cpp \
407 mathed/InsetMathClass.cpp \
408 mathed/InsetMathColor.cpp \
409 mathed/InsetMathCommand.cpp \
410 mathed/InsetMathComment.cpp \
411 mathed/InsetMathDecoration.cpp \
412 mathed/InsetMathDecoration.h \
413 mathed/InsetMathDelim.cpp \
414 mathed/InsetMathDiff.cpp \
415 mathed/InsetMathDots.cpp \
416 mathed/InsetMathEnsureMath.cpp \
417 mathed/InsetMathEnv.cpp \
418 mathed/InsetMathExFunc.cpp \
419 mathed/InsetMathExInt.cpp \
420 mathed/InsetMathFont.cpp \
421 mathed/InsetMathFontOld.cpp \
422 mathed/InsetMathFrac.cpp \
423 mathed/InsetMathGrid.cpp \
424 mathed/InsetMathHull.cpp \
425 mathed/InsetMathKern.cpp \
426 mathed/InsetMathLefteqn.cpp \
427 mathed/InsetMathLim.cpp \
428 mathed/InsetMathMacro.cpp \
429 mathed/InsetMathMacroArgument.cpp \
430 mathed/InsetMathMacroTemplate.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/MacroTable.cpp \
457 mathed/MathAtom.cpp \
458 mathed/MathAutoCorrect.cpp \
459 mathed/MathClass.cpp \
460 mathed/MathData.cpp \
461 mathed/MathExtern.cpp \
462 mathed/MathFactory.cpp \
463 mathed/MathParser.cpp \
465 mathed/MathStream.cpp \
466 mathed/MathSupport.cpp \
467 mathed/TextPainter.cpp
469 HEADERFILESMATHED = \
470 mathed/InsetMathAMSArray.h \
471 mathed/InsetMathArray.h \
472 mathed/InsetMathBig.h \
473 mathed/InsetMathBoldSymbol.h \
474 mathed/InsetMathBox.h \
475 mathed/InsetMathBrace.h \
476 mathed/InsetMathCancel.h \
477 mathed/InsetMathCancelto.h \
478 mathed/InsetMathCases.h \
479 mathed/InsetMathChar.h \
480 mathed/InsetMathClass.h \
481 mathed/InsetMathColor.h \
482 mathed/InsetMathCommand.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/InsetMathMacro.h \
501 mathed/InsetMathMacroArgument.h \
502 mathed/InsetMathMacroTemplate.h \
503 mathed/InsetMathMatrix.h \
504 mathed/InsetMathNest.h \
505 mathed/InsetMathNumber.h \
506 mathed/InsetMathOverset.h \
507 mathed/InsetMathPar.h \
508 mathed/InsetMathPhantom.h \
509 mathed/InsetMathRef.h \
510 mathed/InsetMathRoot.h \
511 mathed/InsetMathScript.h \
512 mathed/InsetMathSideset.h \
513 mathed/InsetMathSize.h \
514 mathed/InsetMathSpace.h \
515 mathed/InsetMathSpecialChar.h \
516 mathed/InsetMathSplit.h \
517 mathed/InsetMathSqrt.h \
518 mathed/InsetMathStackrel.h \
519 mathed/InsetMathString.h \
520 mathed/InsetMathSubstack.h \
521 mathed/InsetMathSymbol.h \
522 mathed/InsetMathTabular.h \
523 mathed/InsetMathUnderset.h \
524 mathed/InsetMathUnknown.h \
525 mathed/InsetMathXArrow.h \
526 mathed/InsetMathXYMatrix.h \
527 mathed/InsetMathDiagram.h \
529 mathed/MathAutoCorrect.h \
532 mathed/MathCompletionList.h \
533 mathed/MathExtern.h \
534 mathed/MathFactory.h \
535 mathed/MacroTable.h \
536 mathed/MathParser.h \
537 mathed/MathParser_flags.h \
539 mathed/ReplaceData.h \
540 mathed/MathStream.h \
541 mathed/MathSupport.h \
545 $(AM_V_GEN)for file in $(SOURCEFILESMATHED) ; do echo '#include "'$${file}'"' ; done >$@
549 BUILT_SOURCES += lyxmathed.cpp
550 CLEANFILES += lyxmathed.cpp
552 nodist_liblyxmathed_a_SOURCES = lyxmathed.cpp
553 liblyxmathed_a_SOURCES = $(HEADERFILESMATHED)
557 liblyxmathed_a_SOURCES = $(SOURCEFILESMATHED) $(HEADERFILESMATHED)
561 ############################### Insets ##############################
563 noinst_LIBRARIES += liblyxinsets.a
565 SOURCEFILESINSETS = \
566 insets/ExternalSupport.cpp \
567 insets/ExternalTemplate.cpp \
568 insets/ExternalTransforms.cpp \
569 insets/RenderButton.cpp \
570 insets/RenderGraphic.cpp \
571 insets/RenderPreview.cpp \
573 insets/InsetArgument.cpp \
574 insets/InsetBibitem.cpp \
575 insets/InsetBibtex.cpp \
576 insets/InsetBox.cpp \
577 insets/InsetBranch.cpp \
578 insets/InsetCaption.cpp \
579 insets/InsetCaptionable.cpp \
580 insets/InsetCitation.cpp \
581 insets/InsetCollapsable.cpp \
582 insets/InsetCommand.cpp \
583 insets/InsetCommandParams.cpp \
584 insets/InsetERT.cpp \
585 insets/InsetExternal.cpp \
586 insets/InsetFlex.cpp \
587 insets/InsetFloat.cpp \
588 insets/InsetFloatList.cpp \
589 insets/InsetFoot.cpp \
590 insets/InsetFootlike.cpp \
591 insets/InsetGraphicsParams.cpp \
592 insets/InsetGraphics.cpp \
593 insets/InsetHyperlink.cpp \
594 insets/InsetInclude.cpp \
595 insets/InsetIndex.cpp \
596 insets/InsetInfo.cpp \
597 insets/InsetIPA.cpp \
598 insets/InsetIPAMacro.cpp \
599 insets/InsetLabel.cpp \
600 insets/InsetLayout.cpp \
601 insets/InsetLine.cpp \
602 insets/InsetListings.cpp \
603 insets/InsetListingsParams.cpp \
604 insets/InsetMarginal.cpp \
605 insets/InsetNewline.cpp \
606 insets/InsetNewpage.cpp \
607 insets/InsetNomencl.cpp \
608 insets/InsetNote.cpp \
609 insets/InsetPhantom.cpp \
610 insets/InsetPreview.cpp \
611 insets/InsetQuotes.cpp \
612 insets/InsetRef.cpp \
613 insets/InsetScript.cpp \
614 insets/InsetSeparator.cpp \
615 insets/InsetSpace.cpp \
616 insets/InsetSpecialChar.cpp \
617 insets/InsetTabular.cpp \
618 insets/InsetText.cpp \
619 insets/InsetTOC.cpp \
620 insets/InsetVSpace.cpp \
623 HEADERFILESINSETS = \
624 insets/ExternalSupport.h \
625 insets/ExternalTemplate.h \
626 insets/ExternalTransforms.h \
627 insets/RenderBase.h \
628 insets/RenderButton.h \
629 insets/RenderGraphic.h \
630 insets/RenderPreview.h \
632 insets/InsetArgument.h \
633 insets/InsetBibitem.h \
634 insets/InsetBibtex.h \
636 insets/InsetBranch.h \
637 insets/InsetCaption.h \
638 insets/InsetCaptionable.h \
639 insets/InsetCitation.h \
641 insets/InsetCollapsable.h \
642 insets/InsetCommand.h \
643 insets/InsetCommandParams.h \
645 insets/InsetExternal.h \
647 insets/InsetFloat.h \
649 insets/InsetFloatList.h \
650 insets/InsetFootlike.h \
651 insets/InsetGraphicsParams.h \
652 insets/InsetGraphics.h \
653 insets/InsetHyperlink.h \
654 insets/InsetInclude.h \
655 insets/InsetIndex.h \
658 insets/InsetIPAMacro.h \
659 insets/InsetPreview.h \
660 insets/InsetLabel.h \
661 insets/InsetLayout.h \
663 insets/InsetListings.h \
664 insets/InsetListingsParams.h \
665 insets/InsetMarginal.h \
666 insets/InsetNewline.h \
667 insets/InsetNewpage.h \
668 insets/InsetNomencl.h \
670 insets/InsetPhantom.h \
671 insets/InsetQuotes.h \
673 insets/InsetScript.h \
674 insets/InsetSeparator.h \
675 insets/InsetSpace.h \
676 insets/InsetSpecialChar.h \
677 insets/InsetTabular.h \
680 insets/InsetVSpace.h \
684 $(AM_V_GEN)for file in $(SOURCEFILESINSETS) ; do echo '#include "'$${file}'"' ; done >$@
688 BUILT_SOURCES += lyxinsets.cpp
689 CLEANFILES += lyxinsets.cpp
691 nodist_liblyxinsets_a_SOURCES = lyxinsets.cpp
692 liblyxinsets_a_SOURCES = $(HEADERFILESINSETS)
696 liblyxinsets_a_SOURCES = $(SOURCEFILESINSETS) $(HEADERFILESINSETS)
701 ############################## Tests ##################################
704 tests/test_ExternalTransforms \
705 tests/test_ListingsCaption \
708 tests/regfiles/ExternalTransforms \
709 tests/regfiles/Length \
710 tests/regfiles/ListingsCaption \
711 tests/dummy_functions.cpp \
714 TESTS = tests/test_ExternalTransforms tests/test_ListingsCaption \
715 tests/test_layout tests/test_Length
717 alltests: check alltests-recursive
719 alltests-recursive: check_layout
720 @srcdir=$(srcdir) $(srcdir)/tests/test_layout; \
721 if test $$? -eq 0; then \
722 echo -e "====================\nlayout tests passed.\n===================="; \
724 echo -e "====================\nlayout tests failed.\n===================="; \
726 cd tex2lyx; $(MAKE) alltests-recursive
729 cd tex2lyx; $(MAKE) updatetests
732 check_ExternalTransforms \
734 check_ListingsCaption \
738 ADD_FRAMEWORKS = -framework QtGui -framework QtCore -framework AppKit -framework ApplicationServices
741 TESTS_LIBS = support/liblyxsupport.a \
742 $(LIBICONV) $(BOOST_LIBS) @LIBS@ \
743 $(ICONV_LIBS) $(ZLIB_LIBS) $(QT_LIB) $(LIBSHLWAPI)
745 check_layout_CPPFLAGS = $(AM_CPPFLAGS)
746 check_layout_LDADD = $(check_layout_LYX_OBJS) $(TESTS_LIBS)
747 check_layout_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
748 check_layout_SOURCES = \
749 tests/check_layout.cpp
750 check_layout_LYX_OBJS = \
751 insets/InsetLayout.o \
764 tests/dummy_functions.o \
767 check_ExternalTransforms_CPPFLAGS = $(AM_CPPFLAGS)
768 check_ExternalTransforms_LDADD = $(check_ExternalTransforms_LYX_OBJS) $(TESTS_LIBS)
769 check_ExternalTransforms_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
770 check_ExternalTransforms_SOURCES = \
771 tests/check_ExternalTransforms.cpp
772 check_ExternalTransforms_LYX_OBJS = \
773 tests/dummy_functions.o \
775 graphics/GraphicsParams.o \
776 insets/ExternalTransforms.o \
780 check_Length_CPPFLAGS = $(AM_CPPFLAGS)
781 check_Length_LDADD = $(check_Length_LYX_OBJS) $(TESTS_LIBS)
782 check_Length_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
783 check_Length_SOURCES = \
784 tests/check_Length.cpp
785 check_Length_LYX_OBJS = \
786 tests/dummy_functions.o \
791 check_ListingsCaption_CPPFLAGS = $(AM_CPPFLAGS)
792 check_ListingsCaption_LDADD = $(check_ListingsCaption_LYX_OBJS) $(TESTS_LIBS)
793 check_ListingsCaption_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
794 check_ListingsCaption_SOURCES = \
795 tests/check_ListingsCaption.cpp
796 check_ListingsCaption_LYX_OBJS = \
797 tests/dummy_functions.o \
800 .PHONY: alltests alltests-recursive updatetests