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
123 BufferEncodings.cpp \
148 LayoutModuleList.cpp \
165 output_plaintext.cpp \
167 ParagraphMetrics.cpp \
168 ParagraphParameters.cpp \
273 ParagraphParameters.h \
304 .PHONY: update_commit_hash
306 LCH_V_GEN = $(lch__v_GEN_@AM_V@)
307 lch__v_GEN_ = $(lch__v_GEN_@AM_DEFAULT_V@)
308 lch__v_GEN_0 = @echo " GEN lyx_commit_hash.h";
313 $(LCH_V_GEN)hash=`cd "$(top_srcdir)" && git log -1 --pretty=format:%H 2>/dev/null || echo none` ; \
314 sed s/@LYX_GIT_COMMIT_HASH@/$$hash/ "$(srcdir)"/lyx_commit_hash.h.in >hash-temp ; \
315 cmp -s lyx_commit_hash.h hash-temp || cp hash-temp lyx_commit_hash.h ; \
318 lyx_commit_hash.h: update_commit_hash
320 BUILT_SOURCES = lyx_commit_hash.h
321 CLEANFILES = lyx_commit_hash.h
324 $(AM_V_GEN)for file in $(SOURCEFILESCORE) ; do echo '#include "'$${file}'"' ; done >$@
328 BUILT_SOURCES += lyxcore.cpp $(STANDALONEFILES)
329 CLEANFILES += lyxcore.cpp
331 nodist_liblyxcore_a_SOURCES = lyxcore.cpp
332 liblyxcore_a_SOURCES = $(STANDALONEFILES) $(HEADERFILESCORE)
336 liblyxcore_a_SOURCES = $(SOURCEFILESCORE) $(STANDALONEFILES) $(HEADERFILESCORE)
340 ######################### Qt stuff ##############################
342 MOCHEADER = Compare.h PreviewLoader.h
346 MOCHEADER += Server.h
351 MOCEDFILES = $(MOCHEADER:%.h=moc_%.cpp)
353 BUILT_SOURCES += $(MOCEDFILES)
354 CLEANFILES += $(MOCEDFILES)
356 moc_PreviewLoader.cpp: graphics/PreviewLoader.h
357 $(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
360 $(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
362 liblyxcore_a_DEPENDENCIES = $(MOCEDFILES)
364 ############################### Graphics ##############################
366 noinst_LIBRARIES += liblyxgraphics.a
368 liblyxgraphics_a_SOURCES = \
369 graphics/epstools.h \
370 graphics/epstools.cpp \
371 graphics/GraphicsCache.h \
372 graphics/GraphicsCache.cpp \
373 graphics/GraphicsCacheItem.h \
374 graphics/GraphicsCacheItem.cpp \
375 graphics/GraphicsConverter.h \
376 graphics/GraphicsConverter.cpp \
377 graphics/GraphicsImage.h \
378 graphics/GraphicsLoader.h \
379 graphics/GraphicsLoader.cpp \
380 graphics/GraphicsParams.cpp \
381 graphics/GraphicsParams.h \
382 graphics/GraphicsTypes.h \
383 graphics/PreviewImage.h \
384 graphics/PreviewImage.cpp \
385 graphics/PreviewLoader.h \
386 graphics/PreviewLoader.cpp
389 ############################### Mathed ##############################
391 noinst_LIBRARIES += liblyxmathed.a
393 SOURCEFILESMATHED = \
394 mathed/CommandInset.cpp \
395 mathed/InsetMathAMSArray.cpp \
396 mathed/InsetMathArray.cpp \
397 mathed/InsetMathBig.cpp \
398 mathed/InsetMathBoldSymbol.cpp \
399 mathed/InsetMathBox.cpp \
400 mathed/InsetMathBrace.cpp \
401 mathed/InsetMath.cpp \
402 mathed/InsetMathCases.cpp \
403 mathed/InsetMathChar.cpp \
404 mathed/InsetMathColor.cpp \
405 mathed/InsetMathComment.cpp \
406 mathed/InsetMathDecoration.cpp \
407 mathed/InsetMathDecoration.h \
408 mathed/InsetMathDelim.cpp \
409 mathed/InsetMathDiff.cpp \
410 mathed/InsetMathDots.cpp \
411 mathed/InsetMathEnsureMath.cpp \
412 mathed/InsetMathEnv.cpp \
413 mathed/InsetMathExFunc.cpp \
414 mathed/InsetMathExInt.cpp \
415 mathed/InsetMathFont.cpp \
416 mathed/InsetMathFontOld.cpp \
417 mathed/InsetMathFrac.cpp \
418 mathed/InsetMathGrid.cpp \
419 mathed/InsetMathHull.cpp \
420 mathed/InsetMathKern.cpp \
421 mathed/InsetMathLefteqn.cpp \
422 mathed/InsetMathLim.cpp \
423 mathed/InsetMathCancel.cpp \
424 mathed/InsetMathCancelto.cpp \
425 mathed/InsetMathMatrix.cpp \
426 mathed/InsetMathNest.cpp \
427 mathed/InsetMathNumber.cpp \
428 mathed/InsetMathOverset.cpp \
429 mathed/InsetMathPar.cpp \
430 mathed/InsetMathPhantom.cpp \
431 mathed/InsetMathRef.cpp \
432 mathed/InsetMathRoot.cpp \
433 mathed/InsetMathScript.cpp \
434 mathed/InsetMathSideset.cpp \
435 mathed/InsetMathSize.cpp \
436 mathed/InsetMathSpace.cpp \
437 mathed/InsetMathSpecialChar.cpp \
438 mathed/InsetMathSplit.cpp \
439 mathed/InsetMathSqrt.cpp \
440 mathed/InsetMathStackrel.cpp \
441 mathed/InsetMathString.cpp \
442 mathed/InsetMathSubstack.cpp \
443 mathed/InsetMathSymbol.cpp \
444 mathed/InsetMathTabular.cpp \
445 mathed/InsetMathUnderset.cpp \
446 mathed/InsetMathUnknown.cpp \
447 mathed/InsetMathXArrow.cpp \
448 mathed/InsetMathXYMatrix.cpp \
449 mathed/InsetMathDiagram.cpp \
450 mathed/MathAtom.cpp \
451 mathed/MathAutoCorrect.cpp \
452 mathed/MathData.cpp \
453 mathed/MathExtern.cpp \
454 mathed/MathFactory.cpp \
455 mathed/MathMacro.cpp \
456 mathed/MathMacroArgument.cpp \
457 mathed/MacroTable.cpp \
458 mathed/MathMacroTemplate.cpp \
459 mathed/MathParser.cpp \
460 mathed/MathStream.cpp \
461 mathed/MathSupport.cpp \
462 mathed/TextPainter.cpp
464 HEADERFILESMATHED = \
465 mathed/CommandInset.h \
466 mathed/InsetMathAMSArray.h \
467 mathed/InsetMathArray.h \
468 mathed/InsetMathBig.h \
469 mathed/InsetMathBoldSymbol.h \
470 mathed/InsetMathBox.h \
471 mathed/InsetMathBrace.h \
472 mathed/InsetMathCancel.h \
473 mathed/InsetMathCancelto.h \
474 mathed/InsetMathCases.h \
475 mathed/InsetMathChar.h \
476 mathed/InsetMathColor.h \
477 mathed/InsetMathComment.h \
478 mathed/InsetMathDelim.h \
479 mathed/InsetMathDiff.h \
480 mathed/InsetMathDots.h \
481 mathed/InsetMathEnsureMath.h \
482 mathed/InsetMathEnv.h \
483 mathed/InsetMathExFunc.h \
484 mathed/InsetMathExInt.h \
485 mathed/InsetMathFont.h \
486 mathed/InsetMathFontOld.h \
487 mathed/InsetMathFrac.h \
488 mathed/InsetMathGrid.h \
490 mathed/InsetMathHull.h \
491 mathed/InsetMathKern.h \
492 mathed/InsetMathLefteqn.h \
493 mathed/InsetMathLim.h \
494 mathed/InsetMathMatrix.h \
495 mathed/InsetMathNest.h \
496 mathed/InsetMathNumber.h \
497 mathed/InsetMathOverset.h \
498 mathed/InsetMathPar.h \
499 mathed/InsetMathPhantom.h \
500 mathed/InsetMathRef.h \
501 mathed/InsetMathRoot.h \
502 mathed/InsetMathScript.h \
503 mathed/InsetMathSideset.h \
504 mathed/InsetMathSize.h \
505 mathed/InsetMathSpace.h \
506 mathed/InsetMathSpecialChar.h \
507 mathed/InsetMathSplit.h \
508 mathed/InsetMathSqrt.h \
509 mathed/InsetMathStackrel.h \
510 mathed/InsetMathString.h \
511 mathed/InsetMathSubstack.h \
512 mathed/InsetMathSymbol.h \
513 mathed/InsetMathTabular.h \
514 mathed/InsetMathUnderset.h \
515 mathed/InsetMathUnknown.h \
516 mathed/InsetMathXArrow.h \
517 mathed/InsetMathXYMatrix.h \
518 mathed/InsetMathDiagram.h \
520 mathed/MathAutoCorrect.h \
522 mathed/MathCompletionList.h \
523 mathed/MathExtern.h \
524 mathed/MathFactory.h \
526 mathed/MathMacroArgument.h \
527 mathed/MacroTable.h \
528 mathed/MathMacroTemplate.h \
529 mathed/MathParser.h \
530 mathed/MathParser_flags.h \
531 mathed/ReplaceData.h \
532 mathed/MathStream.h \
533 mathed/MathSupport.h \
537 $(AM_V_GEN)for file in $(SOURCEFILESMATHED) ; do echo '#include "'$${file}'"' ; done >$@
541 BUILT_SOURCES += lyxmathed.cpp
542 CLEANFILES += lyxmathed.cpp
544 nodist_liblyxmathed_a_SOURCES = lyxmathed.cpp
545 liblyxmathed_a_SOURCES = $(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 \
676 $(AM_V_GEN)for file in $(SOURCEFILESINSETS) ; do echo '#include "'$${file}'"' ; done >$@
680 BUILT_SOURCES += lyxinsets.cpp
681 CLEANFILES += lyxinsets.cpp
683 nodist_liblyxinsets_a_SOURCES = lyxinsets.cpp
684 liblyxinsets_a_SOURCES = $(HEADERFILESINSETS)
688 liblyxinsets_a_SOURCES = $(SOURCEFILESINSETS) $(HEADERFILESINSETS)
693 ############################## Tests ##################################
696 tests/test_ExternalTransforms \
697 tests/test_ListingsCaption \
698 tests/regfiles/ExternalTransforms \
699 tests/regfiles/Length \
700 tests/regfiles/ListingsCaption \
704 TESTS = tests/test_ExternalTransforms tests/test_Length tests/test_ListingsCaption
706 alltests: check alltests-recursive
708 alltests-recursive: check_layout
709 @srcdir=$(srcdir) $(srcdir)/tests/test_layout; \
710 if test $$? -eq 0; then \
711 echo -e "====================\nlayout tests passed.\n===================="; \
713 echo -e "====================\nlayout tests failed.\n===================="; \
715 cd tex2lyx; $(MAKE) alltests-recursive
718 cd tex2lyx; $(MAKE) updatetests
721 check_ExternalTransforms \
723 check_ListingsCaption \
727 ADD_FRAMEWORKS = -framework QtGui -framework QtCore -framework AppKit -framework ApplicationServices
730 check_layout_CPPFLAGS = $(AM_CPPFLAGS)
731 check_layout_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ \
732 $(ICONV_LIBS) $(ZLIB_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@ \
753 $(ICONV_LIBS) $(ZLIB_LIBS) $(QT_LIB) $(LIBSHLWAPI)
754 check_ExternalTransforms_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
755 check_ExternalTransforms_SOURCES = \
756 graphics/GraphicsParams.cpp \
757 insets/ExternalTransforms.cpp \
760 tests/check_ExternalTransforms.cpp \
762 tests/dummy_functions.cpp
764 check_Length_CPPFLAGS = $(AM_CPPFLAGS)
765 check_Length_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ \
766 $(ICONV_LIBS) $(ZLIB_LIBS) $(QT_LIB) $(LIBSHLWAPI)
767 check_Length_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
768 check_Length_SOURCES = \
771 tests/check_Length.cpp \
773 tests/dummy_functions.cpp
775 check_ListingsCaption_CPPFLAGS = $(AM_CPPFLAGS)
776 check_ListingsCaption_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ \
777 $(ICONV_LIBS) $(ZLIB_LIBS) $(QT_LIB) $(LIBSHLWAPI)
778 check_ListingsCaption_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
779 check_ListingsCaption_SOURCES = \
780 tests/check_ListingsCaption.cpp \
782 tests/dummy_functions.cpp
784 .PHONY: alltests alltests-recursive updatetests