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
52 BUILT_SOURCES = $(PCH_FILE)
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
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.
100 lyx_SOURCES += lyxwinres.rc
128 BufferEncodings.cpp \
153 LayoutModuleList.cpp \
170 output_plaintext.cpp \
172 ParagraphMetrics.cpp \
173 ParagraphParameters.cpp \
279 ParagraphParameters.h \
309 .PHONY: update_commit_hash
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";
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 ; \
323 lyx_commit_hash.h: update_commit_hash
325 BUILT_SOURCES += lyx_commit_hash.h
326 CLEANFILES += lyx_commit_hash.h
329 @echo -e '$(SOURCEFILESCORE:%=\n#include "%")\n' > $@
333 BUILT_SOURCES += lyxcore.cpp $(STANDALONEFILES)
334 CLEANFILES += lyxcore.cpp
336 liblyxcore_a_SOURCES = lyxcore.cpp $(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/InsetMathCases.cpp \
407 mathed/InsetMathChar.cpp \
408 mathed/InsetMathColor.cpp \
409 mathed/InsetMathComment.cpp \
410 mathed/InsetMathDecoration.cpp \
411 mathed/InsetMathDecoration.h \
412 mathed/InsetMathDelim.cpp \
413 mathed/InsetMathDiff.cpp \
414 mathed/InsetMathDots.cpp \
415 mathed/InsetMathEnsureMath.cpp \
416 mathed/InsetMathEnv.cpp \
417 mathed/InsetMathExFunc.cpp \
418 mathed/InsetMathExInt.cpp \
419 mathed/InsetMathFont.cpp \
420 mathed/InsetMathFontOld.cpp \
421 mathed/InsetMathFrac.cpp \
422 mathed/InsetMathGrid.cpp \
423 mathed/InsetMathHull.cpp \
424 mathed/InsetMathKern.cpp \
425 mathed/InsetMathLefteqn.cpp \
426 mathed/InsetMathLim.cpp \
427 mathed/InsetMathCancel.cpp \
428 mathed/InsetMathCancelto.cpp \
429 mathed/InsetMathMatrix.cpp \
430 mathed/InsetMathNest.cpp \
431 mathed/InsetMathNumber.cpp \
432 mathed/InsetMathOverset.cpp \
433 mathed/InsetMathPar.cpp \
434 mathed/InsetMathPhantom.cpp \
435 mathed/InsetMathRef.cpp \
436 mathed/InsetMathRoot.cpp \
437 mathed/InsetMathScript.cpp \
438 mathed/InsetMathSideset.cpp \
439 mathed/InsetMathSize.cpp \
440 mathed/InsetMathSpace.cpp \
441 mathed/InsetMathSpecialChar.cpp \
442 mathed/InsetMathSplit.cpp \
443 mathed/InsetMathSqrt.cpp \
444 mathed/InsetMathStackrel.cpp \
445 mathed/InsetMathString.cpp \
446 mathed/InsetMathSubstack.cpp \
447 mathed/InsetMathSymbol.cpp \
448 mathed/InsetMathTabular.cpp \
449 mathed/InsetMathUnderset.cpp \
450 mathed/InsetMathUnknown.cpp \
451 mathed/InsetMathXArrow.cpp \
452 mathed/InsetMathXYMatrix.cpp \
453 mathed/InsetMathDiagram.cpp \
454 mathed/MathAtom.cpp \
455 mathed/MathAutoCorrect.cpp \
456 mathed/MathData.cpp \
457 mathed/MathExtern.cpp \
458 mathed/MathFactory.cpp \
459 mathed/MathMacro.cpp \
460 mathed/MathMacroArgument.cpp \
461 mathed/MacroTable.cpp \
462 mathed/MathMacroTemplate.cpp \
463 mathed/MathParser.cpp \
464 mathed/MathStream.cpp \
465 mathed/MathSupport.cpp \
466 mathed/TextPainter.cpp
468 HEADERFILESMATHED = \
469 mathed/CommandInset.h \
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/InsetMathColor.h \
481 mathed/InsetMathComment.h \
482 mathed/InsetMathDelim.h \
483 mathed/InsetMathDiff.h \
484 mathed/InsetMathDots.h \
485 mathed/InsetMathEnsureMath.h \
486 mathed/InsetMathEnv.h \
487 mathed/InsetMathExFunc.h \
488 mathed/InsetMathExInt.h \
489 mathed/InsetMathFont.h \
490 mathed/InsetMathFontOld.h \
491 mathed/InsetMathFrac.h \
492 mathed/InsetMathGrid.h \
494 mathed/InsetMathHull.h \
495 mathed/InsetMathKern.h \
496 mathed/InsetMathLefteqn.h \
497 mathed/InsetMathLim.h \
498 mathed/InsetMathMatrix.h \
499 mathed/InsetMathNest.h \
500 mathed/InsetMathNumber.h \
501 mathed/InsetMathOverset.h \
502 mathed/InsetMathPar.h \
503 mathed/InsetMathPhantom.h \
504 mathed/InsetMathRef.h \
505 mathed/InsetMathRoot.h \
506 mathed/InsetMathScript.h \
507 mathed/InsetMathSideset.h \
508 mathed/InsetMathSize.h \
509 mathed/InsetMathSpace.h \
510 mathed/InsetMathSpecialChar.h \
511 mathed/InsetMathSplit.h \
512 mathed/InsetMathSqrt.h \
513 mathed/InsetMathStackrel.h \
514 mathed/InsetMathString.h \
515 mathed/InsetMathSubstack.h \
516 mathed/InsetMathSymbol.h \
517 mathed/InsetMathTabular.h \
518 mathed/InsetMathUnderset.h \
519 mathed/InsetMathUnknown.h \
520 mathed/InsetMathXArrow.h \
521 mathed/InsetMathXYMatrix.h \
522 mathed/InsetMathDiagram.h \
524 mathed/MathAutoCorrect.h \
526 mathed/MathCompletionList.h \
527 mathed/MathExtern.h \
528 mathed/MathFactory.h \
530 mathed/MathMacroArgument.h \
531 mathed/MacroTable.h \
532 mathed/MathMacroTemplate.h \
533 mathed/MathParser.h \
534 mathed/MathParser_flags.h \
535 mathed/ReplaceData.h \
536 mathed/MathStream.h \
537 mathed/MathSupport.h \
541 @echo -e '$(SOURCEFILESMATHED:%=\n#include "%")\n' > $@
545 BUILT_SOURCES += lyxmathed.cpp
546 CLEANFILES += lyxmathed.cpp
548 liblyxmathed_a_SOURCES = lyxmathed.cpp $(HEADERFILESMATHED)
552 liblyxmathed_a_SOURCES = $(SOURCEFILESMATHED) $(HEADERFILESMATHED)
556 ############################### Insets ##############################
558 noinst_LIBRARIES += liblyxinsets.a
560 SOURCEFILESINSETS = \
561 insets/ExternalSupport.cpp \
562 insets/ExternalTemplate.cpp \
563 insets/ExternalTransforms.cpp \
564 insets/RenderButton.cpp \
565 insets/RenderGraphic.cpp \
566 insets/RenderPreview.cpp \
568 insets/InsetArgument.cpp \
569 insets/InsetBibitem.cpp \
570 insets/InsetBibtex.cpp \
571 insets/InsetBox.cpp \
572 insets/InsetBranch.cpp \
573 insets/InsetCaption.cpp \
574 insets/InsetCitation.cpp \
575 insets/InsetCollapsable.cpp \
576 insets/InsetCommand.cpp \
577 insets/InsetCommandParams.cpp \
578 insets/InsetERT.cpp \
579 insets/InsetExternal.cpp \
580 insets/InsetFlex.cpp \
581 insets/InsetFloat.cpp \
582 insets/InsetFloatList.cpp \
583 insets/InsetFoot.cpp \
584 insets/InsetFootlike.cpp \
585 insets/InsetGraphicsParams.cpp \
586 insets/InsetGraphics.cpp \
587 insets/InsetHyperlink.cpp \
588 insets/InsetInclude.cpp \
589 insets/InsetIndex.cpp \
590 insets/InsetInfo.cpp \
591 insets/InsetIPA.cpp \
592 insets/InsetIPAMacro.cpp \
593 insets/InsetLabel.cpp \
594 insets/InsetLayout.cpp \
595 insets/InsetLine.cpp \
596 insets/InsetListings.cpp \
597 insets/InsetListingsParams.cpp \
598 insets/InsetMarginal.cpp \
599 insets/InsetNewline.cpp \
600 insets/InsetNewpage.cpp \
601 insets/InsetNomencl.cpp \
602 insets/InsetNote.cpp \
603 insets/InsetPhantom.cpp \
604 insets/InsetPreview.cpp \
605 insets/InsetQuotes.cpp \
606 insets/InsetRef.cpp \
607 insets/InsetScript.cpp \
608 insets/InsetSeparator.cpp \
609 insets/InsetSpace.cpp \
610 insets/InsetSpecialChar.cpp \
611 insets/InsetTabular.cpp \
612 insets/InsetText.cpp \
613 insets/InsetTOC.cpp \
614 insets/InsetVSpace.cpp \
617 HEADERFILESINSETS = \
618 insets/ExternalSupport.h \
619 insets/ExternalTemplate.h \
620 insets/ExternalTransforms.h \
621 insets/RenderBase.h \
622 insets/RenderButton.h \
623 insets/RenderGraphic.h \
624 insets/RenderPreview.h \
626 insets/InsetArgument.h \
627 insets/InsetBibitem.h \
628 insets/InsetBibtex.h \
630 insets/InsetBranch.h \
631 insets/InsetCaption.h \
632 insets/InsetCitation.h \
634 insets/InsetCollapsable.h \
635 insets/InsetCommand.h \
636 insets/InsetCommandParams.h \
638 insets/InsetExternal.h \
640 insets/InsetFloat.h \
642 insets/InsetFloatList.h \
643 insets/InsetFootlike.h \
644 insets/InsetGraphicsParams.h \
645 insets/InsetGraphics.h \
646 insets/InsetHyperlink.h \
647 insets/InsetInclude.h \
648 insets/InsetIndex.h \
651 insets/InsetIPAMacro.h \
652 insets/InsetPreview.h \
653 insets/InsetLabel.h \
654 insets/InsetLayout.h \
656 insets/InsetListings.h \
657 insets/InsetListingsParams.h \
658 insets/InsetMarginal.h \
659 insets/InsetNewline.h \
660 insets/InsetNewpage.h \
661 insets/InsetNomencl.h \
663 insets/InsetPhantom.h \
664 insets/InsetQuotes.h \
666 insets/InsetScript.h \
667 insets/InsetSeparator.h \
668 insets/InsetSpace.h \
669 insets/InsetSpecialChar.h \
670 insets/InsetTabular.h \
673 insets/InsetVSpace.h \
676 # insets/InsetList.cpp \
677 # insets/InsetList.h \
678 # insets/InsetSection.h \
679 # insets/InsetSection.cpp
682 @echo -e '$(SOURCEFILESINSETS:%=\n#include "%")\n' > $@
686 BUILT_SOURCES += lyxinsets.cpp
687 CLEANFILES += lyxinsets.cpp
689 liblyxinsets_a_SOURCES = lyxinsets.cpp $(HEADERFILESINSETS)
693 liblyxinsets_a_SOURCES = $(SOURCEFILESINSETS) $(HEADERFILESINSETS)
698 ############################## Tests ##################################
701 tests/test_ExternalTransforms \
702 tests/regfiles/ExternalTransforms \
705 TESTS = tests/test_ExternalTransforms
707 alltests: check alltests-recursive
709 alltests-recursive: check_layout
710 @srcdir=$(srcdir) $(srcdir)/tests/test_layout; \
711 if test $$? -eq 0; then \
712 echo -e "====================\nlayout tests passed.\n===================="; \
714 echo -e "====================\nlayout tests failed.\n===================="; \
716 cd tex2lyx; $(MAKE) alltests-recursive
719 cd tex2lyx; $(MAKE) updatetests
722 check_ExternalTransforms \
726 ADD_FRAMEWORKS = -framework QtGui -framework QtCore -framework AppKit -framework ApplicationServices
729 check_layout_CPPFLAGS = $(AM_CPPFLAGS)
730 check_layout_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ $(QT_LIB) $(LIBSHLWAPI)
731 check_layout_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
732 check_layout_SOURCES = \
733 insets/InsetLayout.cpp \
745 tests/check_layout.cpp \
747 tests/dummy_functions.cpp
749 check_ExternalTransforms_CPPFLAGS = $(AM_CPPFLAGS)
750 check_ExternalTransforms_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ $(QT_LIB) $(LIBSHLWAPI)
751 check_ExternalTransforms_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
752 check_ExternalTransforms_SOURCES = \
753 graphics/GraphicsParams.cpp \
754 insets/ExternalTransforms.cpp \
757 tests/check_ExternalTransforms.cpp \
759 tests/dummy_functions.cpp
761 .PHONY: alltests alltests-recursive updatetests