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 convert
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_CHK = $(lch__v_CHK_@AM_V@)
309 lch__v_CHK_ = $(lch__v_CHK_@AM_DEFAULT_V@)
310 lch__v_CHK_0 = @echo " CHK lyx_commit_hash.h";
314 $(LCH_V_CHK)rm -f hash-temp ; \
315 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
325 liblyxcore_a_SOURCES = $(SOURCEFILESCORE) $(STANDALONEFILES) $(HEADERFILESCORE)
328 ######################### Qt stuff ##############################
330 MOCHEADER = Compare.h PreviewLoader.h
334 MOCHEADER += Server.h
339 MOCEDFILES = $(MOCHEADER:%.h=moc_%.cpp)
341 BUILT_SOURCES += $(MOCEDFILES)
342 CLEANFILES += $(MOCEDFILES)
344 moc_PreviewLoader.cpp: graphics/PreviewLoader.h
345 $(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
348 $(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
350 liblyxcore_a_DEPENDENCIES = $(MOCEDFILES)
352 ############################### Graphics ##############################
354 noinst_LIBRARIES += liblyxgraphics.a
356 liblyxgraphics_a_SOURCES = \
357 graphics/epstools.h \
358 graphics/epstools.cpp \
359 graphics/GraphicsCache.h \
360 graphics/GraphicsCache.cpp \
361 graphics/GraphicsCacheItem.h \
362 graphics/GraphicsCacheItem.cpp \
363 graphics/GraphicsConverter.h \
364 graphics/GraphicsConverter.cpp \
365 graphics/GraphicsImage.h \
366 graphics/GraphicsLoader.h \
367 graphics/GraphicsLoader.cpp \
368 graphics/GraphicsParams.cpp \
369 graphics/GraphicsParams.h \
370 graphics/GraphicsTypes.h \
371 graphics/PreviewImage.h \
372 graphics/PreviewImage.cpp \
373 graphics/PreviewLoader.h \
374 graphics/PreviewLoader.cpp
377 ############################### Mathed ##############################
379 noinst_LIBRARIES += liblyxmathed.a
381 SOURCEFILESMATHED = \
382 mathed/InsetMathAMSArray.cpp \
383 mathed/InsetMathArray.cpp \
384 mathed/InsetMathBig.cpp \
385 mathed/InsetMathBoldSymbol.cpp \
386 mathed/InsetMathBox.cpp \
387 mathed/InsetMathBrace.cpp \
388 mathed/InsetMath.cpp \
389 mathed/InsetMathCancel.cpp \
390 mathed/InsetMathCancelto.cpp \
391 mathed/InsetMathCases.cpp \
392 mathed/InsetMathChar.cpp \
393 mathed/InsetMathClass.cpp \
394 mathed/InsetMathColor.cpp \
395 mathed/InsetMathCommand.cpp \
396 mathed/InsetMathComment.cpp \
397 mathed/InsetMathDecoration.cpp \
398 mathed/InsetMathDecoration.h \
399 mathed/InsetMathDelim.cpp \
400 mathed/InsetMathDiagram.cpp \
401 mathed/InsetMathDiff.cpp \
402 mathed/InsetMathDots.cpp \
403 mathed/InsetMathEnsureMath.cpp \
404 mathed/InsetMathEnv.cpp \
405 mathed/InsetMathExFunc.cpp \
406 mathed/InsetMathExInt.cpp \
407 mathed/InsetMathFont.cpp \
408 mathed/InsetMathFontOld.cpp \
409 mathed/InsetMathFrac.cpp \
410 mathed/InsetMathGrid.cpp \
411 mathed/InsetMathHull.cpp \
412 mathed/InsetMathKern.cpp \
413 mathed/InsetMathLefteqn.cpp \
414 mathed/InsetMathLim.cpp \
415 mathed/InsetMathMacro.cpp \
416 mathed/InsetMathMacroArgument.cpp \
417 mathed/InsetMathMacroTemplate.cpp \
418 mathed/InsetMathMatrix.cpp \
419 mathed/InsetMathNest.cpp \
420 mathed/InsetMathNumber.cpp \
421 mathed/InsetMathOverset.cpp \
422 mathed/InsetMathPar.cpp \
423 mathed/InsetMathPhantom.cpp \
424 mathed/InsetMathRef.cpp \
425 mathed/InsetMathRoot.cpp \
426 mathed/InsetMathScript.cpp \
427 mathed/InsetMathSideset.cpp \
428 mathed/InsetMathSize.cpp \
429 mathed/InsetMathSpace.cpp \
430 mathed/InsetMathSpecialChar.cpp \
431 mathed/InsetMathSplit.cpp \
432 mathed/InsetMathSqrt.cpp \
433 mathed/InsetMathStackrel.cpp \
434 mathed/InsetMathString.cpp \
435 mathed/InsetMathSubstack.cpp \
436 mathed/InsetMathSymbol.cpp \
437 mathed/InsetMathTabular.cpp \
438 mathed/InsetMathUnderset.cpp \
439 mathed/InsetMathUnknown.cpp \
440 mathed/InsetMathXArrow.cpp \
441 mathed/InsetMathXYMatrix.cpp \
442 mathed/MacroTable.cpp \
443 mathed/MathAtom.cpp \
444 mathed/MathAutoCorrect.cpp \
445 mathed/MathClass.cpp \
446 mathed/MathData.cpp \
447 mathed/MathExtern.cpp \
448 mathed/MathFactory.cpp \
449 mathed/MathParser.cpp \
451 mathed/MathStream.cpp \
452 mathed/MathSupport.cpp \
453 mathed/TextPainter.cpp
455 HEADERFILESMATHED = \
456 mathed/InsetMathAMSArray.h \
457 mathed/InsetMathArray.h \
458 mathed/InsetMathBig.h \
459 mathed/InsetMathBoldSymbol.h \
460 mathed/InsetMathBox.h \
461 mathed/InsetMathBrace.h \
462 mathed/InsetMathCancel.h \
463 mathed/InsetMathCancelto.h \
464 mathed/InsetMathCases.h \
465 mathed/InsetMathChar.h \
466 mathed/InsetMathClass.h \
467 mathed/InsetMathColor.h \
468 mathed/InsetMathCommand.h \
469 mathed/InsetMathComment.h \
470 mathed/InsetMathDelim.h \
471 mathed/InsetMathDiff.h \
472 mathed/InsetMathDots.h \
473 mathed/InsetMathEnsureMath.h \
474 mathed/InsetMathEnv.h \
475 mathed/InsetMathExFunc.h \
476 mathed/InsetMathExInt.h \
477 mathed/InsetMathFont.h \
478 mathed/InsetMathFontOld.h \
479 mathed/InsetMathFrac.h \
480 mathed/InsetMathGrid.h \
482 mathed/InsetMathHull.h \
483 mathed/InsetMathKern.h \
484 mathed/InsetMathLefteqn.h \
485 mathed/InsetMathLim.h \
486 mathed/InsetMathMacro.h \
487 mathed/InsetMathMacroArgument.h \
488 mathed/InsetMathMacroTemplate.h \
489 mathed/InsetMathMatrix.h \
490 mathed/InsetMathNest.h \
491 mathed/InsetMathNumber.h \
492 mathed/InsetMathOverset.h \
493 mathed/InsetMathPar.h \
494 mathed/InsetMathPhantom.h \
495 mathed/InsetMathRef.h \
496 mathed/InsetMathRoot.h \
497 mathed/InsetMathScript.h \
498 mathed/InsetMathSideset.h \
499 mathed/InsetMathSize.h \
500 mathed/InsetMathSpace.h \
501 mathed/InsetMathSpecialChar.h \
502 mathed/InsetMathSplit.h \
503 mathed/InsetMathSqrt.h \
504 mathed/InsetMathStackrel.h \
505 mathed/InsetMathString.h \
506 mathed/InsetMathSubstack.h \
507 mathed/InsetMathSymbol.h \
508 mathed/InsetMathTabular.h \
509 mathed/InsetMathUnderset.h \
510 mathed/InsetMathUnknown.h \
511 mathed/InsetMathXArrow.h \
512 mathed/InsetMathXYMatrix.h \
513 mathed/InsetMathDiagram.h \
515 mathed/MathAutoCorrect.h \
518 mathed/MathCompletionList.h \
519 mathed/MathExtern.h \
520 mathed/MathFactory.h \
521 mathed/MacroTable.h \
522 mathed/MathParser.h \
523 mathed/MathParser_flags.h \
525 mathed/ReplaceData.h \
526 mathed/MathStream.h \
527 mathed/MathSupport.h \
530 liblyxmathed_a_SOURCES = $(SOURCEFILESMATHED) $(HEADERFILESMATHED)
533 ############################### Insets ##############################
535 noinst_LIBRARIES += liblyxinsets.a
537 SOURCEFILESINSETS = \
538 insets/ExternalSupport.cpp \
539 insets/ExternalTemplate.cpp \
540 insets/ExternalTransforms.cpp \
541 insets/RenderButton.cpp \
542 insets/RenderGraphic.cpp \
543 insets/RenderPreview.cpp \
545 insets/InsetArgument.cpp \
546 insets/InsetBibitem.cpp \
547 insets/InsetBibtex.cpp \
548 insets/InsetBox.cpp \
549 insets/InsetBranch.cpp \
550 insets/InsetCaption.cpp \
551 insets/InsetCaptionable.cpp \
552 insets/InsetCitation.cpp \
553 insets/InsetCollapsible.cpp \
554 insets/InsetCommand.cpp \
555 insets/InsetCommandParams.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 \
617 insets/InsetExternal.h \
619 insets/InsetFloat.h \
621 insets/InsetFloatList.h \
622 insets/InsetFootlike.h \
623 insets/InsetGraphicsParams.h \
624 insets/InsetGraphics.h \
625 insets/InsetHyperlink.h \
626 insets/InsetInclude.h \
627 insets/InsetIndex.h \
630 insets/InsetIPAMacro.h \
631 insets/InsetPreview.h \
632 insets/InsetLabel.h \
633 insets/InsetLayout.h \
635 insets/InsetListings.h \
636 insets/InsetListingsParams.h \
637 insets/InsetMarginal.h \
638 insets/InsetNewline.h \
639 insets/InsetNewpage.h \
640 insets/InsetNomencl.h \
642 insets/InsetPhantom.h \
643 insets/InsetQuotes.h \
645 insets/InsetScript.h \
646 insets/InsetSeparator.h \
647 insets/InsetSpace.h \
648 insets/InsetSpecialChar.h \
649 insets/InsetTabular.h \
652 insets/InsetVSpace.h \
655 liblyxinsets_a_SOURCES = $(SOURCEFILESINSETS) $(HEADERFILESINSETS)
658 ############################## Tests ##################################
661 tests/test_ExternalTransforms \
662 tests/test_ListingsCaption \
665 tests/regfiles/ExternalTransforms \
666 tests/regfiles/Length \
667 tests/regfiles/ListingsCaption \
668 tests/dummy_functions.cpp \
671 TESTS = tests/test_ExternalTransforms tests/test_ListingsCaption \
672 tests/test_layout tests/test_Length
674 alltests: check alltests-recursive
676 alltests-recursive: check_layout
677 @srcdir=$(srcdir) $(srcdir)/tests/test_layout; \
678 if test $$? -eq 0; then \
679 echo -e "====================\nlayout tests passed.\n===================="; \
681 echo -e "====================\nlayout tests failed.\n===================="; \
683 cd tex2lyx; $(MAKE) alltests-recursive
686 cd tex2lyx; $(MAKE) updatetests
689 check_ExternalTransforms \
691 check_ListingsCaption \
695 ADD_FRAMEWORKS = -framework QtGui -framework QtCore -framework AppKit -framework ApplicationServices
698 TESTS_LIBS = support/liblyxsupport.a \
699 $(LIBICONV) $(BOOST_LIBS) @LIBS@ \
700 $(ICONV_LIBS) $(ZLIB_LIBS) $(QT_LIB) $(LIBSHLWAPI)
702 check_layout_CPPFLAGS = $(AM_CPPFLAGS)
703 check_layout_LDADD = $(check_layout_LYX_OBJS) $(TESTS_LIBS)
704 check_layout_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
705 check_layout_SOURCES = \
706 tests/check_layout.cpp
707 check_layout_LYX_OBJS = \
708 insets/InsetLayout.o \
721 tests/dummy_functions.o \
724 check_ExternalTransforms_CPPFLAGS = $(AM_CPPFLAGS)
725 check_ExternalTransforms_LDADD = $(check_ExternalTransforms_LYX_OBJS) $(TESTS_LIBS)
726 check_ExternalTransforms_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
727 check_ExternalTransforms_SOURCES = \
728 tests/check_ExternalTransforms.cpp
729 check_ExternalTransforms_LYX_OBJS = \
730 tests/dummy_functions.o \
732 graphics/GraphicsParams.o \
733 insets/ExternalTransforms.o \
737 check_Length_CPPFLAGS = $(AM_CPPFLAGS)
738 check_Length_LDADD = $(check_Length_LYX_OBJS) $(TESTS_LIBS)
739 check_Length_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
740 check_Length_SOURCES = \
741 tests/check_Length.cpp
742 check_Length_LYX_OBJS = \
743 tests/dummy_functions.o \
748 check_ListingsCaption_CPPFLAGS = $(AM_CPPFLAGS)
749 check_ListingsCaption_LDADD = $(check_ListingsCaption_LYX_OBJS) $(TESTS_LIBS)
750 check_ListingsCaption_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
751 check_ListingsCaption_SOURCES = \
752 tests/check_ListingsCaption.cpp
753 check_ListingsCaption_LYX_OBJS = \
754 tests/dummy_functions.o \
757 .PHONY: alltests alltests-recursive updatetests