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 += $(NOD_INCLUDES) $(QT_CPPFLAGS) $(QT_CORE_INCLUDES)
10 if BUILD_CLIENT_SUBDIR
14 SUBDIRS = support frontends . $(CLIENT) tex2lyx convert
16 EXTRA_DIST = lyx_commit_hash.h.in \
18 graphics/CMakeLists.txt \
19 insets/CMakeLists.txt \
20 mathed/CMakeLists.txt \
23 OTHERLIBS = $(MYTHES_LIBS) $(ENCHANT_LIBS) $(HUNSPELL_LIBS) \
24 @LIBS@ $(ICONV_LIBS) $(ZLIB_LIBS) $(SOCKET_LIBS) \
25 $(LIBSHLWAPI) $(LIBPSAPI)
27 noinst_LIBRARIES = liblyxcore.a
30 lyx_LDFLAGS = $(AM_LDFLAGS) $(QT_LDFLAGS)
36 frontends/liblyxfrontends.a \
37 frontends/qt/liblyxqt.a \
39 support/liblyxsupport.a \
45 cp $(top_srcdir)/development/Win32/packaging/icons/lyx.ico .
46 cp $(top_srcdir)/development/Win32/packaging/icons/lyx_doc.ico .
47 $(RC) -I$(top_builddir) --preprocessor "$(CPP) -xc-header -DRC_INVOKED" $< -o $@
51 lyx_LDFLAGS += -framework AppKit -framework ApplicationServices \
52 -Wl,-rpath,@loader_path/../Frameworks \
53 -Wl,-rpath,@executable_path/../Frameworks \
54 -Wl,-headerpad_max_install_names
58 APPLESPELL = AppleSpellChecker.cpp AppleSpellChecker.h
62 ASPELL = AspellChecker.cpp AspellChecker.h
63 PWL = PersonalWordList.cpp PersonalWordList.h
67 ENCHANT = EnchantChecker.cpp EnchantChecker.h
68 PWL = PersonalWordList.cpp PersonalWordList.h
72 HUNSPELL = HunspellChecker.cpp HunspellChecker.h
73 PWL = PersonalWordList.cpp PersonalWordList.h
97 lyx_SOURCES += lyxwinres.rc
112 CiteEnginesList.cpp \
125 BufferEncodings.cpp \
149 LayoutModuleList.cpp \
164 output_plaintext.cpp \
166 ParagraphMetrics.cpp \
167 ParagraphParameters.cpp \
272 ParagraphParameters.h \
305 .PHONY: update_commit_hash
307 LCH_V_CHK = $(lch__v_CHK_@AM_V@)
308 lch__v_CHK_ = $(lch__v_CHK_@AM_DEFAULT_V@)
309 lch__v_CHK_0 = @echo " CHK lyx_commit_hash.h";
313 $(LCH_V_CHK)rm -f hash-temp ; \
314 hash=`cd "$(top_srcdir)" && git log -1 --pretty=format:%H 2>/dev/null || echo none` ; \
315 sed s/@LYX_GIT_COMMIT_HASH@/$$hash/ "$(srcdir)"/lyx_commit_hash.h.in >hash-temp ; \
316 cmp -s lyx_commit_hash.h hash-temp || cp hash-temp lyx_commit_hash.h ; \
319 lyx_commit_hash.h: update_commit_hash
321 BUILT_SOURCES = lyx_commit_hash.h
322 CLEANFILES = lyx_commit_hash.h
324 liblyxcore_a_SOURCES = $(SOURCEFILESCORE) $(STANDALONEFILES) $(HEADERFILESCORE)
327 ######################### Qt stuff ##############################
329 MOCHEADER = Compare.h PreviewLoader.h
333 MOCHEADER += Server.h
338 MOCEDFILES = $(MOCHEADER:%.h=moc_%.cpp)
340 BUILT_SOURCES += $(MOCEDFILES)
341 CLEANFILES += $(MOCEDFILES)
343 moc_PreviewLoader.cpp: graphics/PreviewLoader.h
344 $(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
347 $(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
349 liblyxcore_a_DEPENDENCIES = $(MOCEDFILES)
351 ############################### Graphics ##############################
353 noinst_LIBRARIES += liblyxgraphics.a
355 liblyxgraphics_a_SOURCES = \
356 graphics/epstools.h \
357 graphics/epstools.cpp \
358 graphics/GraphicsCache.h \
359 graphics/GraphicsCache.cpp \
360 graphics/GraphicsCacheItem.h \
361 graphics/GraphicsCacheItem.cpp \
362 graphics/GraphicsConverter.h \
363 graphics/GraphicsConverter.cpp \
364 graphics/GraphicsImage.h \
365 graphics/GraphicsLoader.h \
366 graphics/GraphicsLoader.cpp \
367 graphics/GraphicsParams.cpp \
368 graphics/GraphicsParams.h \
369 graphics/GraphicsTypes.h \
370 graphics/PreviewImage.h \
371 graphics/PreviewImage.cpp \
372 graphics/PreviewLoader.h \
373 graphics/PreviewLoader.cpp
376 ############################### Mathed ##############################
378 noinst_LIBRARIES += liblyxmathed.a
380 SOURCEFILESMATHED = \
381 mathed/InsetMathAMSArray.cpp \
382 mathed/InsetMathArray.cpp \
383 mathed/InsetMathBig.cpp \
384 mathed/InsetMathBoldSymbol.cpp \
385 mathed/InsetMathBox.cpp \
386 mathed/InsetMathBrace.cpp \
387 mathed/InsetMath.cpp \
388 mathed/InsetMathCancel.cpp \
389 mathed/InsetMathCancelto.cpp \
390 mathed/InsetMathCases.cpp \
391 mathed/InsetMathChar.cpp \
392 mathed/InsetMathClass.cpp \
393 mathed/InsetMathColor.cpp \
394 mathed/InsetMathCommand.cpp \
395 mathed/InsetMathComment.cpp \
396 mathed/InsetMathDecoration.cpp \
397 mathed/InsetMathDecoration.h \
398 mathed/InsetMathDelim.cpp \
399 mathed/InsetMathDiagram.cpp \
400 mathed/InsetMathDiff.cpp \
401 mathed/InsetMathDots.cpp \
402 mathed/InsetMathEnsureMath.cpp \
403 mathed/InsetMathEnv.cpp \
404 mathed/InsetMathExFunc.cpp \
405 mathed/InsetMathExInt.cpp \
406 mathed/InsetMathFont.cpp \
407 mathed/InsetMathFontOld.cpp \
408 mathed/InsetMathFrac.cpp \
409 mathed/InsetMathGrid.cpp \
410 mathed/InsetMathHull.cpp \
411 mathed/InsetMathKern.cpp \
412 mathed/InsetMathLefteqn.cpp \
413 mathed/InsetMathLim.cpp \
414 mathed/InsetMathMacro.cpp \
415 mathed/InsetMathMacroArgument.cpp \
416 mathed/InsetMathMacroTemplate.cpp \
417 mathed/InsetMathMatrix.cpp \
418 mathed/InsetMathNest.cpp \
419 mathed/InsetMathNumber.cpp \
420 mathed/InsetMathOverset.cpp \
421 mathed/InsetMathPar.cpp \
422 mathed/InsetMathPhantom.cpp \
423 mathed/InsetMathRef.cpp \
424 mathed/InsetMathRoot.cpp \
425 mathed/InsetMathScript.cpp \
426 mathed/InsetMathSideset.cpp \
427 mathed/InsetMathSize.cpp \
428 mathed/InsetMathSpace.cpp \
429 mathed/InsetMathSpecialChar.cpp \
430 mathed/InsetMathSplit.cpp \
431 mathed/InsetMathSqrt.cpp \
432 mathed/InsetMathStackrel.cpp \
433 mathed/InsetMathString.cpp \
434 mathed/InsetMathSubstack.cpp \
435 mathed/InsetMathSymbol.cpp \
436 mathed/InsetMathTabular.cpp \
437 mathed/InsetMathUnderset.cpp \
438 mathed/InsetMathUnknown.cpp \
439 mathed/InsetMathXArrow.cpp \
440 mathed/InsetMathXYMatrix.cpp \
441 mathed/MacroTable.cpp \
442 mathed/MathAtom.cpp \
443 mathed/MathAutoCorrect.cpp \
444 mathed/MathClass.cpp \
445 mathed/MathData.cpp \
446 mathed/MathExtern.cpp \
447 mathed/MathFactory.cpp \
448 mathed/MathParser.cpp \
450 mathed/MathStream.cpp \
451 mathed/MathSupport.cpp \
452 mathed/TextPainter.cpp
454 HEADERFILESMATHED = \
455 mathed/InsetMathAMSArray.h \
456 mathed/InsetMathArray.h \
457 mathed/InsetMathBig.h \
458 mathed/InsetMathBoldSymbol.h \
459 mathed/InsetMathBox.h \
460 mathed/InsetMathBrace.h \
461 mathed/InsetMathCancel.h \
462 mathed/InsetMathCancelto.h \
463 mathed/InsetMathCases.h \
464 mathed/InsetMathChar.h \
465 mathed/InsetMathClass.h \
466 mathed/InsetMathColor.h \
467 mathed/InsetMathCommand.h \
468 mathed/InsetMathComment.h \
469 mathed/InsetMathDelim.h \
470 mathed/InsetMathDiff.h \
471 mathed/InsetMathDots.h \
472 mathed/InsetMathEnsureMath.h \
473 mathed/InsetMathEnv.h \
474 mathed/InsetMathExFunc.h \
475 mathed/InsetMathExInt.h \
476 mathed/InsetMathFont.h \
477 mathed/InsetMathFontOld.h \
478 mathed/InsetMathFrac.h \
479 mathed/InsetMathGrid.h \
481 mathed/InsetMathHull.h \
482 mathed/InsetMathKern.h \
483 mathed/InsetMathLefteqn.h \
484 mathed/InsetMathLim.h \
485 mathed/InsetMathMacro.h \
486 mathed/InsetMathMacroArgument.h \
487 mathed/InsetMathMacroTemplate.h \
488 mathed/InsetMathMatrix.h \
489 mathed/InsetMathNest.h \
490 mathed/InsetMathNumber.h \
491 mathed/InsetMathOverset.h \
492 mathed/InsetMathPar.h \
493 mathed/InsetMathPhantom.h \
494 mathed/InsetMathRef.h \
495 mathed/InsetMathRoot.h \
496 mathed/InsetMathScript.h \
497 mathed/InsetMathSideset.h \
498 mathed/InsetMathSize.h \
499 mathed/InsetMathSpace.h \
500 mathed/InsetMathSpecialChar.h \
501 mathed/InsetMathSplit.h \
502 mathed/InsetMathSqrt.h \
503 mathed/InsetMathStackrel.h \
504 mathed/InsetMathString.h \
505 mathed/InsetMathSubstack.h \
506 mathed/InsetMathSymbol.h \
507 mathed/InsetMathTabular.h \
508 mathed/InsetMathUnderset.h \
509 mathed/InsetMathUnknown.h \
510 mathed/InsetMathXArrow.h \
511 mathed/InsetMathXYMatrix.h \
512 mathed/InsetMathDiagram.h \
514 mathed/MathAutoCorrect.h \
517 mathed/MathCompletionList.h \
518 mathed/MathExtern.h \
519 mathed/MathFactory.h \
520 mathed/MacroTable.h \
521 mathed/MathParser.h \
522 mathed/MathParser_flags.h \
524 mathed/ReplaceData.h \
525 mathed/MathStream.h \
526 mathed/MathSupport.h \
529 liblyxmathed_a_SOURCES = $(SOURCEFILESMATHED) $(HEADERFILESMATHED)
532 ############################### Insets ##############################
534 noinst_LIBRARIES += liblyxinsets.a
536 SOURCEFILESINSETS = \
537 insets/ExternalSupport.cpp \
538 insets/ExternalTemplate.cpp \
539 insets/ExternalTransforms.cpp \
540 insets/RenderButton.cpp \
541 insets/RenderGraphic.cpp \
542 insets/RenderPreview.cpp \
544 insets/InsetArgument.cpp \
545 insets/InsetBibitem.cpp \
546 insets/InsetBibtex.cpp \
547 insets/InsetBox.cpp \
548 insets/InsetBranch.cpp \
549 insets/InsetCaption.cpp \
550 insets/InsetCaptionable.cpp \
551 insets/InsetCitation.cpp \
552 insets/InsetCollapsible.cpp \
553 insets/InsetCommand.cpp \
554 insets/InsetCommandParams.cpp \
555 insets/InsetCounter.cpp \
556 insets/InsetERT.cpp \
557 insets/InsetExternal.cpp \
558 insets/InsetFlex.cpp \
559 insets/InsetFloat.cpp \
560 insets/InsetFloatList.cpp \
561 insets/InsetFoot.cpp \
562 insets/InsetFootlike.cpp \
563 insets/InsetGraphicsParams.cpp \
564 insets/InsetGraphics.cpp \
565 insets/InsetHyperlink.cpp \
566 insets/InsetInclude.cpp \
567 insets/InsetIndex.cpp \
568 insets/InsetInfo.cpp \
569 insets/InsetIPA.cpp \
570 insets/InsetIPAMacro.cpp \
571 insets/InsetLabel.cpp \
572 insets/InsetLayout.cpp \
573 insets/InsetLine.cpp \
574 insets/InsetListings.cpp \
575 insets/InsetListingsParams.cpp \
576 insets/InsetMarginal.cpp \
577 insets/InsetNewline.cpp \
578 insets/InsetNewpage.cpp \
579 insets/InsetNomencl.cpp \
580 insets/InsetNote.cpp \
581 insets/InsetPhantom.cpp \
582 insets/InsetPreview.cpp \
583 insets/InsetQuotes.cpp \
584 insets/InsetRef.cpp \
585 insets/InsetScript.cpp \
586 insets/InsetSeparator.cpp \
587 insets/InsetSpace.cpp \
588 insets/InsetSpecialChar.cpp \
589 insets/InsetTabular.cpp \
590 insets/InsetText.cpp \
591 insets/InsetTOC.cpp \
592 insets/InsetVSpace.cpp \
595 HEADERFILESINSETS = \
596 insets/ExternalSupport.h \
597 insets/ExternalTemplate.h \
598 insets/ExternalTransforms.h \
599 insets/RenderBase.h \
600 insets/RenderButton.h \
601 insets/RenderGraphic.h \
602 insets/RenderPreview.h \
604 insets/InsetArgument.h \
605 insets/InsetBibitem.h \
606 insets/InsetBibtex.h \
608 insets/InsetBranch.h \
609 insets/InsetCaption.h \
610 insets/InsetCaptionable.h \
611 insets/InsetCitation.h \
613 insets/InsetCollapsible.h \
614 insets/InsetCommand.h \
615 insets/InsetCommandParams.h \
616 insets/InsetCounter.h \
618 insets/InsetExternal.h \
620 insets/InsetFloat.h \
622 insets/InsetFloatList.h \
623 insets/InsetFootlike.h \
624 insets/InsetGraphicsParams.h \
625 insets/InsetGraphics.h \
626 insets/InsetHyperlink.h \
627 insets/InsetInclude.h \
628 insets/InsetIndex.h \
631 insets/InsetIPAMacro.h \
632 insets/InsetPreview.h \
633 insets/InsetLabel.h \
634 insets/InsetLayout.h \
636 insets/InsetListings.h \
637 insets/InsetListingsParams.h \
638 insets/InsetMarginal.h \
639 insets/InsetNewline.h \
640 insets/InsetNewpage.h \
641 insets/InsetNomencl.h \
643 insets/InsetPhantom.h \
644 insets/InsetQuotes.h \
646 insets/InsetScript.h \
647 insets/InsetSeparator.h \
648 insets/InsetSpace.h \
649 insets/InsetSpecialChar.h \
650 insets/InsetTabular.h \
653 insets/InsetVSpace.h \
656 liblyxinsets_a_SOURCES = $(SOURCEFILESINSETS) $(HEADERFILESINSETS)
659 ############################## Tests ##################################
662 tests/test_ExternalTransforms \
663 tests/test_ListingsCaption \
666 tests/regfiles/ExternalTransforms \
667 tests/regfiles/Length \
668 tests/regfiles/ListingsCaption \
669 tests/dummy_functions.cpp \
672 TESTS = tests/test_ExternalTransforms tests/test_ListingsCaption \
673 tests/test_layout tests/test_Length
675 alltests: check alltests-recursive
677 alltests-recursive: check_layout
678 @srcdir=$(srcdir) $(srcdir)/tests/test_layout; \
679 if test $$? -eq 0; then \
680 echo -e "====================\nlayout tests passed.\n===================="; \
682 echo -e "====================\nlayout tests failed.\n===================="; \
684 cd tex2lyx; $(MAKE) alltests-recursive
687 cd tex2lyx; $(MAKE) updatetests
690 check_ExternalTransforms \
692 check_ListingsCaption \
696 ADD_FRAMEWORKS = -framework QtGui -framework QtCore -framework AppKit -framework ApplicationServices
699 TESTS_LIBS = support/liblyxsupport.a \
701 $(ICONV_LIBS) $(ZLIB_LIBS) $(QT_LIB) $(LIBSHLWAPI)
703 check_layout_CPPFLAGS = $(AM_CPPFLAGS)
704 check_layout_LDADD = $(check_layout_LYX_OBJS) $(TESTS_LIBS)
705 check_layout_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
706 check_layout_SOURCES = \
707 tests/check_layout.cpp \
708 tests/dummy_functions.cpp \
710 check_layout_LYX_OBJS = \
711 insets/InsetLayout.o \
725 check_ExternalTransforms_CPPFLAGS = $(AM_CPPFLAGS)
726 check_ExternalTransforms_LDADD = $(check_ExternalTransforms_LYX_OBJS) $(TESTS_LIBS)
727 check_ExternalTransforms_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
728 check_ExternalTransforms_SOURCES = \
729 tests/check_ExternalTransforms.cpp \
730 tests/dummy_functions.cpp \
732 check_ExternalTransforms_LYX_OBJS = \
733 graphics/GraphicsParams.o \
734 insets/ExternalTransforms.o
736 check_Length_CPPFLAGS = $(AM_CPPFLAGS)
737 check_Length_LDADD = $(TESTS_LIBS)
738 check_Length_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
739 check_Length_SOURCES = \
740 tests/check_Length.cpp \
741 tests/dummy_functions.cpp \
744 check_ListingsCaption_CPPFLAGS = $(AM_CPPFLAGS)
745 check_ListingsCaption_LDADD = $(check_ListingsCaption_LYX_OBJS) $(TESTS_LIBS)
746 check_ListingsCaption_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
747 check_ListingsCaption_SOURCES = \
748 tests/check_ListingsCaption.cpp \
749 tests/dummy_functions.cpp \
751 check_ListingsCaption_LYX_OBJS =
753 .PHONY: alltests alltests-recursive updatetests