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
30 lyx_LDFLAGS = $(AM_LDFLAGS) $(QT_LDFLAGS)
36 frontends/liblyxfrontends.a \
37 frontends/qt4/liblyxqt4.a \
39 support/liblyxsupport.a \
45 cp $(top_srcdir)/development/Win32/packaging/icons/lyx_*32x32.ico .
46 $(RC) -I$(top_builddir) --preprocessor "$(CPP) -xc-header -DRC_INVOKED" $< -o $@
50 lyx_LDFLAGS += -framework AppKit -framework ApplicationServices \
51 -Wl,-rpath,@loader_path/../Frameworks \
52 -Wl,-rpath,@executable_path/../Frameworks \
53 -Wl,-headerpad_max_install_names
57 APPLESPELL = AppleSpellChecker.cpp AppleSpellChecker.h
61 ASPELL = AspellChecker.cpp AspellChecker.h
62 PWL = PersonalWordList.cpp PersonalWordList.h
66 ENCHANT = EnchantChecker.cpp EnchantChecker.h
67 PWL = PersonalWordList.cpp PersonalWordList.h
71 HUNSPELL = HunspellChecker.cpp HunspellChecker.h
72 PWL = PersonalWordList.cpp PersonalWordList.h
98 lyx_SOURCES += lyxwinres.rc
113 CiteEnginesList.cpp \
126 BufferEncodings.cpp \
150 LayoutModuleList.cpp \
167 output_plaintext.cpp \
169 ParagraphMetrics.cpp \
170 ParagraphParameters.cpp \
276 ParagraphParameters.h \
308 .PHONY: update_commit_hash
310 LCH_V_CHK = $(lch__v_CHK_@AM_V@)
311 lch__v_CHK_ = $(lch__v_CHK_@AM_DEFAULT_V@)
312 lch__v_CHK_0 = @echo " CHK lyx_commit_hash.h";
316 $(LCH_V_CHK)rm -f hash-temp ; \
317 hash=`cd "$(top_srcdir)" && git log -1 --pretty=format:%H 2>/dev/null || echo none` ; \
318 sed s/@LYX_GIT_COMMIT_HASH@/$$hash/ "$(srcdir)"/lyx_commit_hash.h.in >hash-temp ; \
319 cmp -s lyx_commit_hash.h hash-temp || cp hash-temp lyx_commit_hash.h ; \
322 lyx_commit_hash.h: update_commit_hash
324 BUILT_SOURCES = lyx_commit_hash.h
325 CLEANFILES = lyx_commit_hash.h
327 liblyxcore_a_SOURCES = $(SOURCEFILESCORE) $(STANDALONEFILES) $(HEADERFILESCORE)
330 ######################### Qt stuff ##############################
332 MOCHEADER = Compare.h PreviewLoader.h
336 MOCHEADER += Server.h
341 MOCEDFILES = $(MOCHEADER:%.h=moc_%.cpp)
343 BUILT_SOURCES += $(MOCEDFILES)
344 CLEANFILES += $(MOCEDFILES)
346 moc_PreviewLoader.cpp: graphics/PreviewLoader.h
347 $(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
350 $(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
352 liblyxcore_a_DEPENDENCIES = $(MOCEDFILES)
354 ############################### Graphics ##############################
356 noinst_LIBRARIES += liblyxgraphics.a
358 liblyxgraphics_a_SOURCES = \
359 graphics/epstools.h \
360 graphics/epstools.cpp \
361 graphics/GraphicsCache.h \
362 graphics/GraphicsCache.cpp \
363 graphics/GraphicsCacheItem.h \
364 graphics/GraphicsCacheItem.cpp \
365 graphics/GraphicsConverter.h \
366 graphics/GraphicsConverter.cpp \
367 graphics/GraphicsImage.h \
368 graphics/GraphicsLoader.h \
369 graphics/GraphicsLoader.cpp \
370 graphics/GraphicsParams.cpp \
371 graphics/GraphicsParams.h \
372 graphics/GraphicsTypes.h \
373 graphics/PreviewImage.h \
374 graphics/PreviewImage.cpp \
375 graphics/PreviewLoader.h \
376 graphics/PreviewLoader.cpp
379 ############################### Mathed ##############################
381 noinst_LIBRARIES += liblyxmathed.a
383 SOURCEFILESMATHED = \
384 mathed/InsetMathAMSArray.cpp \
385 mathed/InsetMathArray.cpp \
386 mathed/InsetMathBig.cpp \
387 mathed/InsetMathBoldSymbol.cpp \
388 mathed/InsetMathBox.cpp \
389 mathed/InsetMathBrace.cpp \
390 mathed/InsetMath.cpp \
391 mathed/InsetMathCancel.cpp \
392 mathed/InsetMathCancelto.cpp \
393 mathed/InsetMathCases.cpp \
394 mathed/InsetMathChar.cpp \
395 mathed/InsetMathClass.cpp \
396 mathed/InsetMathColor.cpp \
397 mathed/InsetMathCommand.cpp \
398 mathed/InsetMathComment.cpp \
399 mathed/InsetMathDecoration.cpp \
400 mathed/InsetMathDecoration.h \
401 mathed/InsetMathDelim.cpp \
402 mathed/InsetMathDiagram.cpp \
403 mathed/InsetMathDiff.cpp \
404 mathed/InsetMathDots.cpp \
405 mathed/InsetMathEnsureMath.cpp \
406 mathed/InsetMathEnv.cpp \
407 mathed/InsetMathExFunc.cpp \
408 mathed/InsetMathExInt.cpp \
409 mathed/InsetMathFont.cpp \
410 mathed/InsetMathFontOld.cpp \
411 mathed/InsetMathFrac.cpp \
412 mathed/InsetMathGrid.cpp \
413 mathed/InsetMathHull.cpp \
414 mathed/InsetMathKern.cpp \
415 mathed/InsetMathLefteqn.cpp \
416 mathed/InsetMathLim.cpp \
417 mathed/InsetMathMacro.cpp \
418 mathed/InsetMathMacroArgument.cpp \
419 mathed/InsetMathMacroTemplate.cpp \
420 mathed/InsetMathMatrix.cpp \
421 mathed/InsetMathNest.cpp \
422 mathed/InsetMathNumber.cpp \
423 mathed/InsetMathOverset.cpp \
424 mathed/InsetMathPar.cpp \
425 mathed/InsetMathPhantom.cpp \
426 mathed/InsetMathRef.cpp \
427 mathed/InsetMathRoot.cpp \
428 mathed/InsetMathScript.cpp \
429 mathed/InsetMathSideset.cpp \
430 mathed/InsetMathSize.cpp \
431 mathed/InsetMathSpace.cpp \
432 mathed/InsetMathSpecialChar.cpp \
433 mathed/InsetMathSplit.cpp \
434 mathed/InsetMathSqrt.cpp \
435 mathed/InsetMathStackrel.cpp \
436 mathed/InsetMathString.cpp \
437 mathed/InsetMathSubstack.cpp \
438 mathed/InsetMathSymbol.cpp \
439 mathed/InsetMathTabular.cpp \
440 mathed/InsetMathUnderset.cpp \
441 mathed/InsetMathUnknown.cpp \
442 mathed/InsetMathXArrow.cpp \
443 mathed/InsetMathXYMatrix.cpp \
444 mathed/MacroTable.cpp \
445 mathed/MathAtom.cpp \
446 mathed/MathAutoCorrect.cpp \
447 mathed/MathClass.cpp \
448 mathed/MathData.cpp \
449 mathed/MathExtern.cpp \
450 mathed/MathFactory.cpp \
451 mathed/MathParser.cpp \
453 mathed/MathStream.cpp \
454 mathed/MathSupport.cpp \
455 mathed/TextPainter.cpp
457 HEADERFILESMATHED = \
458 mathed/InsetMathAMSArray.h \
459 mathed/InsetMathArray.h \
460 mathed/InsetMathBig.h \
461 mathed/InsetMathBoldSymbol.h \
462 mathed/InsetMathBox.h \
463 mathed/InsetMathBrace.h \
464 mathed/InsetMathCancel.h \
465 mathed/InsetMathCancelto.h \
466 mathed/InsetMathCases.h \
467 mathed/InsetMathChar.h \
468 mathed/InsetMathClass.h \
469 mathed/InsetMathColor.h \
470 mathed/InsetMathCommand.h \
471 mathed/InsetMathComment.h \
472 mathed/InsetMathDelim.h \
473 mathed/InsetMathDiff.h \
474 mathed/InsetMathDots.h \
475 mathed/InsetMathEnsureMath.h \
476 mathed/InsetMathEnv.h \
477 mathed/InsetMathExFunc.h \
478 mathed/InsetMathExInt.h \
479 mathed/InsetMathFont.h \
480 mathed/InsetMathFontOld.h \
481 mathed/InsetMathFrac.h \
482 mathed/InsetMathGrid.h \
484 mathed/InsetMathHull.h \
485 mathed/InsetMathKern.h \
486 mathed/InsetMathLefteqn.h \
487 mathed/InsetMathLim.h \
488 mathed/InsetMathMacro.h \
489 mathed/InsetMathMacroArgument.h \
490 mathed/InsetMathMacroTemplate.h \
491 mathed/InsetMathMatrix.h \
492 mathed/InsetMathNest.h \
493 mathed/InsetMathNumber.h \
494 mathed/InsetMathOverset.h \
495 mathed/InsetMathPar.h \
496 mathed/InsetMathPhantom.h \
497 mathed/InsetMathRef.h \
498 mathed/InsetMathRoot.h \
499 mathed/InsetMathScript.h \
500 mathed/InsetMathSideset.h \
501 mathed/InsetMathSize.h \
502 mathed/InsetMathSpace.h \
503 mathed/InsetMathSpecialChar.h \
504 mathed/InsetMathSplit.h \
505 mathed/InsetMathSqrt.h \
506 mathed/InsetMathStackrel.h \
507 mathed/InsetMathString.h \
508 mathed/InsetMathSubstack.h \
509 mathed/InsetMathSymbol.h \
510 mathed/InsetMathTabular.h \
511 mathed/InsetMathUnderset.h \
512 mathed/InsetMathUnknown.h \
513 mathed/InsetMathXArrow.h \
514 mathed/InsetMathXYMatrix.h \
515 mathed/InsetMathDiagram.h \
517 mathed/MathAutoCorrect.h \
520 mathed/MathCompletionList.h \
521 mathed/MathExtern.h \
522 mathed/MathFactory.h \
523 mathed/MacroTable.h \
524 mathed/MathParser.h \
525 mathed/MathParser_flags.h \
527 mathed/ReplaceData.h \
528 mathed/MathStream.h \
529 mathed/MathSupport.h \
532 liblyxmathed_a_SOURCES = $(SOURCEFILESMATHED) $(HEADERFILESMATHED)
535 ############################### Insets ##############################
537 noinst_LIBRARIES += liblyxinsets.a
539 SOURCEFILESINSETS = \
540 insets/ExternalSupport.cpp \
541 insets/ExternalTemplate.cpp \
542 insets/ExternalTransforms.cpp \
543 insets/RenderButton.cpp \
544 insets/RenderGraphic.cpp \
545 insets/RenderPreview.cpp \
547 insets/InsetArgument.cpp \
548 insets/InsetBibitem.cpp \
549 insets/InsetBibtex.cpp \
550 insets/InsetBox.cpp \
551 insets/InsetBranch.cpp \
552 insets/InsetCaption.cpp \
553 insets/InsetCaptionable.cpp \
554 insets/InsetCitation.cpp \
555 insets/InsetCollapsible.cpp \
556 insets/InsetCommand.cpp \
557 insets/InsetCommandParams.cpp \
558 insets/InsetERT.cpp \
559 insets/InsetExternal.cpp \
560 insets/InsetFlex.cpp \
561 insets/InsetFloat.cpp \
562 insets/InsetFloatList.cpp \
563 insets/InsetFoot.cpp \
564 insets/InsetFootlike.cpp \
565 insets/InsetGraphicsParams.cpp \
566 insets/InsetGraphics.cpp \
567 insets/InsetHyperlink.cpp \
568 insets/InsetInclude.cpp \
569 insets/InsetIndex.cpp \
570 insets/InsetInfo.cpp \
571 insets/InsetIPA.cpp \
572 insets/InsetIPAMacro.cpp \
573 insets/InsetLabel.cpp \
574 insets/InsetLayout.cpp \
575 insets/InsetLine.cpp \
576 insets/InsetListings.cpp \
577 insets/InsetListingsParams.cpp \
578 insets/InsetMarginal.cpp \
579 insets/InsetNewline.cpp \
580 insets/InsetNewpage.cpp \
581 insets/InsetNomencl.cpp \
582 insets/InsetNote.cpp \
583 insets/InsetPhantom.cpp \
584 insets/InsetPreview.cpp \
585 insets/InsetQuotes.cpp \
586 insets/InsetRef.cpp \
587 insets/InsetScript.cpp \
588 insets/InsetSeparator.cpp \
589 insets/InsetSpace.cpp \
590 insets/InsetSpecialChar.cpp \
591 insets/InsetTabular.cpp \
592 insets/InsetText.cpp \
593 insets/InsetTOC.cpp \
594 insets/InsetVSpace.cpp \
597 HEADERFILESINSETS = \
598 insets/ExternalSupport.h \
599 insets/ExternalTemplate.h \
600 insets/ExternalTransforms.h \
601 insets/RenderBase.h \
602 insets/RenderButton.h \
603 insets/RenderGraphic.h \
604 insets/RenderPreview.h \
606 insets/InsetArgument.h \
607 insets/InsetBibitem.h \
608 insets/InsetBibtex.h \
610 insets/InsetBranch.h \
611 insets/InsetCaption.h \
612 insets/InsetCaptionable.h \
613 insets/InsetCitation.h \
615 insets/InsetCollapsible.h \
616 insets/InsetCommand.h \
617 insets/InsetCommandParams.h \
619 insets/InsetExternal.h \
621 insets/InsetFloat.h \
623 insets/InsetFloatList.h \
624 insets/InsetFootlike.h \
625 insets/InsetGraphicsParams.h \
626 insets/InsetGraphics.h \
627 insets/InsetHyperlink.h \
628 insets/InsetInclude.h \
629 insets/InsetIndex.h \
632 insets/InsetIPAMacro.h \
633 insets/InsetPreview.h \
634 insets/InsetLabel.h \
635 insets/InsetLayout.h \
637 insets/InsetListings.h \
638 insets/InsetListingsParams.h \
639 insets/InsetMarginal.h \
640 insets/InsetNewline.h \
641 insets/InsetNewpage.h \
642 insets/InsetNomencl.h \
644 insets/InsetPhantom.h \
645 insets/InsetQuotes.h \
647 insets/InsetScript.h \
648 insets/InsetSeparator.h \
649 insets/InsetSpace.h \
650 insets/InsetSpecialChar.h \
651 insets/InsetTabular.h \
654 insets/InsetVSpace.h \
657 liblyxinsets_a_SOURCES = $(SOURCEFILESINSETS) $(HEADERFILESINSETS)
660 ############################## Tests ##################################
663 tests/test_ExternalTransforms \
664 tests/test_ListingsCaption \
667 tests/regfiles/ExternalTransforms \
668 tests/regfiles/Length \
669 tests/regfiles/ListingsCaption \
670 tests/dummy_functions.cpp \
673 TESTS = tests/test_ExternalTransforms tests/test_ListingsCaption \
674 tests/test_layout tests/test_Length
676 alltests: check alltests-recursive
678 alltests-recursive: check_layout
679 @srcdir=$(srcdir) $(srcdir)/tests/test_layout; \
680 if test $$? -eq 0; then \
681 echo -e "====================\nlayout tests passed.\n===================="; \
683 echo -e "====================\nlayout tests failed.\n===================="; \
685 cd tex2lyx; $(MAKE) alltests-recursive
688 cd tex2lyx; $(MAKE) updatetests
691 check_ExternalTransforms \
693 check_ListingsCaption \
697 ADD_FRAMEWORKS = -framework QtGui -framework QtCore -framework AppKit -framework ApplicationServices
700 TESTS_LIBS = support/liblyxsupport.a \
701 $(LIBICONV) $(BOOST_LIBS) @LIBS@ \
702 $(ICONV_LIBS) $(ZLIB_LIBS) $(QT_LIB) $(LIBSHLWAPI)
704 check_layout_CPPFLAGS = $(AM_CPPFLAGS)
705 check_layout_LDADD = $(check_layout_LYX_OBJS) $(TESTS_LIBS)
706 check_layout_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
707 check_layout_SOURCES = \
708 tests/check_layout.cpp
709 check_layout_LYX_OBJS = \
710 insets/InsetLayout.o \
723 tests/dummy_functions.o \
726 check_ExternalTransforms_CPPFLAGS = $(AM_CPPFLAGS)
727 check_ExternalTransforms_LDADD = $(check_ExternalTransforms_LYX_OBJS) $(TESTS_LIBS)
728 check_ExternalTransforms_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
729 check_ExternalTransforms_SOURCES = \
730 tests/check_ExternalTransforms.cpp
731 check_ExternalTransforms_LYX_OBJS = \
732 tests/dummy_functions.o \
734 graphics/GraphicsParams.o \
735 insets/ExternalTransforms.o \
739 check_Length_CPPFLAGS = $(AM_CPPFLAGS)
740 check_Length_LDADD = $(check_Length_LYX_OBJS) $(TESTS_LIBS)
741 check_Length_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
742 check_Length_SOURCES = \
743 tests/check_Length.cpp
744 check_Length_LYX_OBJS = \
745 tests/dummy_functions.o \
750 check_ListingsCaption_CPPFLAGS = $(AM_CPPFLAGS)
751 check_ListingsCaption_LDADD = $(check_ListingsCaption_LYX_OBJS) $(TESTS_LIBS)
752 check_ListingsCaption_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
753 check_ListingsCaption_SOURCES = \
754 tests/check_ListingsCaption.cpp
755 check_ListingsCaption_LYX_OBJS = \
756 tests/dummy_functions.o \
759 .PHONY: alltests alltests-recursive updatetests