1 include $(top_srcdir)/config/common.am
3 ############################### Core ##############################
5 AM_CPPFLAGS += -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 \
16 graphics/CMakeLists.txt \
17 insets/CMakeLists.txt \
18 mathed/CMakeLists.txt \
21 OTHERLIBS = $(BOOST_LIBS) $(MYTHES_LIBS) $(ENCHANT_LIBS) $(HUNSPELL_LIBS) \
22 @LIBS@ $(SOCKET_LIBS) $(LIBSHLWAPI) $(LIBPSAPI)
24 noinst_LIBRARIES = liblyxcore.a
31 frontends/liblyxfrontends.a \
32 frontends/qt4/liblyxqt4.a \
34 support/liblyxsupport.a \
41 cp $(top_srcdir)/development/Win32/packaging/icons/lyx_*32x32.ico .
42 windres -I$(top_builddir) --preprocessor "$(CPP) -xc-header -DRC_INVOKED" $< -o $@
46 lyx_LDFLAGS = -framework AppKit -framework ApplicationServices \
47 -Wl,-rpath,@loader_path/../Frameworks \
48 -Wl,-rpath,@executable_path/../Frameworks
54 APPLESPELL = AppleSpellChecker.cpp AppleSpellChecker.h
58 ASPELL = AspellChecker.cpp AspellChecker.h
59 PWL = PersonalWordList.cpp PersonalWordList.h
63 ENCHANT = EnchantChecker.cpp EnchantChecker.h
64 PWL = PersonalWordList.cpp PersonalWordList.h
68 HUNSPELL = HunspellChecker.cpp HunspellChecker.h
69 PWL = PersonalWordList.cpp PersonalWordList.h
72 # These four objects are linked as object files as they are not
73 # referenced within the core and therefore are not picked up
74 # by the linker without looping over libs. We do not want that,
75 # and in fact libtools seems not able to do that.
99 lyx_SOURCES += lyxwinres.rc
126 BufferEncodings.cpp \
151 LayoutModuleList.cpp \
168 output_plaintext.cpp \
170 ParagraphMetrics.cpp \
171 ParagraphParameters.cpp \
276 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 @echo -e '$(SOURCEFILESCORE:%=\n#include "%")\n' > $@
330 BUILT_SOURCES += lyxcore.cpp $(STANDALONEFILES)
331 CLEANFILES += lyxcore.cpp
333 liblyxcore_a_SOURCES = lyxcore.cpp $(STANDALONEFILES) $(HEADERFILESCORE)
337 liblyxcore_a_SOURCES = $(SOURCEFILESCORE) $(STANDALONEFILES) $(HEADERFILESCORE)
341 ######################### Qt stuff ##############################
343 MOCHEADER = Compare.h PreviewLoader.h
347 MOCHEADER += Server.h
352 MOCEDFILES = $(MOCHEADER:%.h=moc_%.cpp)
354 BUILT_SOURCES += $(MOCEDFILES)
355 CLEANFILES += $(MOCEDFILES)
357 moc_PreviewLoader.cpp: graphics/PreviewLoader.h
358 $(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
361 $(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
363 liblyxcore_a_DEPENDENCIES = $(MOCEDFILES)
365 ############################### Graphics ##############################
367 noinst_LIBRARIES += liblyxgraphics.a
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
390 ############################### Mathed ##############################
392 noinst_LIBRARIES += liblyxmathed.a
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
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 \
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 \
521 mathed/MathAutoCorrect.h \
523 mathed/MathCompletionList.h \
524 mathed/MathExtern.h \
525 mathed/MathFactory.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 \
538 @echo -e '$(SOURCEFILESMATHED:%=\n#include "%")\n' > $@
542 BUILT_SOURCES += lyxmathed.cpp
543 CLEANFILES += lyxmathed.cpp
545 liblyxmathed_a_SOURCES = lyxmathed.cpp $(HEADERFILESMATHED)
549 liblyxmathed_a_SOURCES = $(SOURCEFILESMATHED) $(HEADERFILESMATHED)
553 ############################### Insets ##############################
555 noinst_LIBRARIES += liblyxinsets.a
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 \
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 \
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 \
624 insets/InsetArgument.h \
625 insets/InsetBibitem.h \
626 insets/InsetBibtex.h \
628 insets/InsetBranch.h \
629 insets/InsetCaption.h \
630 insets/InsetCaptionable.h \
631 insets/InsetCitation.h \
633 insets/InsetCollapsable.h \
634 insets/InsetCommand.h \
635 insets/InsetCommandParams.h \
637 insets/InsetExternal.h \
639 insets/InsetFloat.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 \
650 insets/InsetIPAMacro.h \
651 insets/InsetPreview.h \
652 insets/InsetLabel.h \
653 insets/InsetLayout.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 \
662 insets/InsetPhantom.h \
663 insets/InsetQuotes.h \
665 insets/InsetScript.h \
666 insets/InsetSeparator.h \
667 insets/InsetSpace.h \
668 insets/InsetSpecialChar.h \
669 insets/InsetTabular.h \
672 insets/InsetVSpace.h \
675 # insets/InsetList.cpp \
676 # insets/InsetList.h \
677 # insets/InsetSection.h \
678 # insets/InsetSection.cpp
681 @echo -e '$(SOURCEFILESINSETS:%=\n#include "%")\n' > $@
685 BUILT_SOURCES += lyxinsets.cpp
686 CLEANFILES += lyxinsets.cpp
688 liblyxinsets_a_SOURCES = lyxinsets.cpp $(HEADERFILESINSETS)
692 liblyxinsets_a_SOURCES = $(SOURCEFILESINSETS) $(HEADERFILESINSETS)
697 ############################## Tests ##################################
700 tests/test_ExternalTransforms \
701 tests/regfiles/ExternalTransforms \
702 tests/regfiles/Length \
706 TESTS = tests/test_ExternalTransforms tests/test_Length
708 alltests: check alltests-recursive
710 alltests-recursive: check_layout
711 @srcdir=$(srcdir) $(srcdir)/tests/test_layout; \
712 if test $$? -eq 0; then \
713 echo -e "====================\nlayout tests passed.\n===================="; \
715 echo -e "====================\nlayout tests failed.\n===================="; \
717 cd tex2lyx; $(MAKE) alltests-recursive
720 cd tex2lyx; $(MAKE) updatetests
723 check_ExternalTransforms \
728 ADD_FRAMEWORKS = -framework QtGui -framework QtCore -framework AppKit -framework ApplicationServices
731 check_layout_CPPFLAGS = $(AM_CPPFLAGS)
732 check_layout_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ $(QT_LIB) $(LIBSHLWAPI)
733 check_layout_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
734 check_layout_SOURCES = \
735 insets/InsetLayout.cpp \
747 tests/check_layout.cpp \
749 tests/dummy_functions.cpp
751 check_ExternalTransforms_CPPFLAGS = $(AM_CPPFLAGS)
752 check_ExternalTransforms_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ $(QT_LIB) $(LIBSHLWAPI)
753 check_ExternalTransforms_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
754 check_ExternalTransforms_SOURCES = \
755 graphics/GraphicsParams.cpp \
756 insets/ExternalTransforms.cpp \
759 tests/check_ExternalTransforms.cpp \
761 tests/dummy_functions.cpp
763 check_Length_CPPFLAGS = $(AM_CPPFLAGS)
764 check_Length_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ $(QT_LIB) $(LIBSHLWAPI)
765 check_Length_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
766 check_Length_SOURCES = \
769 tests/check_Length.cpp \
771 tests/dummy_functions.cpp
773 .PHONY: alltests alltests-recursive updatetests