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 \
308 .PHONY: lyx_commit_hash.h
311 $(AM_V_GEN)hash=`cd "$(top_srcdir)" && git log -1 --pretty=format:%H 2>/dev/null || echo none` ; \
312 sed s/@LYX_GIT_COMMIT_HASH@/$$hash/ "$(srcdir)"/lyx_commit_hash.h.in >$@
313 BUILT_SOURCES += lyx_commit_hash.h
314 CLEANFILES += lyx_commit_hash.h
317 @echo -e '$(SOURCEFILESCORE:%=\n#include "%")\n' > $@
321 BUILT_SOURCES += lyxcore.cpp $(STANDALONEFILES)
322 CLEANFILES += lyxcore.cpp
324 liblyxcore_a_SOURCES = lyxcore.cpp $(STANDALONEFILES) $(HEADERFILESCORE)
328 liblyxcore_a_SOURCES = $(SOURCEFILESCORE) $(STANDALONEFILES) $(HEADERFILESCORE)
332 ######################### Qt stuff ##############################
334 MOCHEADER = Compare.h
338 MOCHEADER += Server.h
343 MOCEDFILES = $(MOCHEADER:%.h=moc_%.cpp)
345 BUILT_SOURCES += $(MOCEDFILES)
346 CLEANFILES += $(MOCEDFILES)
349 $(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
351 liblyxcore_a_DEPENDENCIES = $(MOCEDFILES)
353 ############################### Graphics ##############################
355 noinst_LIBRARIES += liblyxgraphics.a
357 liblyxgraphics_a_SOURCES = \
358 graphics/epstools.h \
359 graphics/epstools.cpp \
360 graphics/GraphicsCache.h \
361 graphics/GraphicsCache.cpp \
362 graphics/GraphicsCacheItem.h \
363 graphics/GraphicsCacheItem.cpp \
364 graphics/GraphicsConverter.h \
365 graphics/GraphicsConverter.cpp \
366 graphics/GraphicsImage.h \
367 graphics/GraphicsLoader.h \
368 graphics/GraphicsLoader.cpp \
369 graphics/GraphicsParams.cpp \
370 graphics/GraphicsParams.h \
371 graphics/GraphicsTypes.h \
372 graphics/PreviewImage.h \
373 graphics/PreviewImage.cpp \
374 graphics/PreviewLoader.h \
375 graphics/PreviewLoader.cpp
378 ############################### Mathed ##############################
380 noinst_LIBRARIES += liblyxmathed.a
382 SOURCEFILESMATHED = \
383 mathed/CommandInset.cpp \
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/InsetMathCases.cpp \
392 mathed/InsetMathChar.cpp \
393 mathed/InsetMathColor.cpp \
394 mathed/InsetMathComment.cpp \
395 mathed/InsetMathDecoration.cpp \
396 mathed/InsetMathDecoration.h \
397 mathed/InsetMathDelim.cpp \
398 mathed/InsetMathDiff.cpp \
399 mathed/InsetMathDots.cpp \
400 mathed/InsetMathEnsureMath.cpp \
401 mathed/InsetMathEnv.cpp \
402 mathed/InsetMathExFunc.cpp \
403 mathed/InsetMathExInt.cpp \
404 mathed/InsetMathFont.cpp \
405 mathed/InsetMathFontOld.cpp \
406 mathed/InsetMathFrac.cpp \
407 mathed/InsetMathGrid.cpp \
408 mathed/InsetMathHull.cpp \
409 mathed/InsetMathKern.cpp \
410 mathed/InsetMathLefteqn.cpp \
411 mathed/InsetMathLim.cpp \
412 mathed/InsetMathCancel.cpp \
413 mathed/InsetMathCancelto.cpp \
414 mathed/InsetMathMatrix.cpp \
415 mathed/InsetMathNest.cpp \
416 mathed/InsetMathNumber.cpp \
417 mathed/InsetMathOverset.cpp \
418 mathed/InsetMathPar.cpp \
419 mathed/InsetMathPhantom.cpp \
420 mathed/InsetMathRef.cpp \
421 mathed/InsetMathRoot.cpp \
422 mathed/InsetMathScript.cpp \
423 mathed/InsetMathSideset.cpp \
424 mathed/InsetMathSize.cpp \
425 mathed/InsetMathSpace.cpp \
426 mathed/InsetMathSpecialChar.cpp \
427 mathed/InsetMathSplit.cpp \
428 mathed/InsetMathSqrt.cpp \
429 mathed/InsetMathStackrel.cpp \
430 mathed/InsetMathString.cpp \
431 mathed/InsetMathSubstack.cpp \
432 mathed/InsetMathSymbol.cpp \
433 mathed/InsetMathTabular.cpp \
434 mathed/InsetMathUnderset.cpp \
435 mathed/InsetMathUnknown.cpp \
436 mathed/InsetMathXArrow.cpp \
437 mathed/InsetMathXYMatrix.cpp \
438 mathed/InsetMathDiagram.cpp \
439 mathed/MathAtom.cpp \
440 mathed/MathAutoCorrect.cpp \
441 mathed/MathData.cpp \
442 mathed/MathExtern.cpp \
443 mathed/MathFactory.cpp \
444 mathed/MathMacro.cpp \
445 mathed/MathMacroArgument.cpp \
446 mathed/MacroTable.cpp \
447 mathed/MathMacroTemplate.cpp \
448 mathed/MathParser.cpp \
449 mathed/MathStream.cpp \
450 mathed/MathSupport.cpp \
451 mathed/TextPainter.cpp
453 HEADERFILESMATHED = \
454 mathed/CommandInset.h \
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/InsetMathColor.h \
466 mathed/InsetMathComment.h \
467 mathed/InsetMathDelim.h \
468 mathed/InsetMathDiff.h \
469 mathed/InsetMathDots.h \
470 mathed/InsetMathEnsureMath.h \
471 mathed/InsetMathEnv.h \
472 mathed/InsetMathExFunc.h \
473 mathed/InsetMathExInt.h \
474 mathed/InsetMathFont.h \
475 mathed/InsetMathFontOld.h \
476 mathed/InsetMathFrac.h \
477 mathed/InsetMathGrid.h \
479 mathed/InsetMathHull.h \
480 mathed/InsetMathKern.h \
481 mathed/InsetMathLefteqn.h \
482 mathed/InsetMathLim.h \
483 mathed/InsetMathMatrix.h \
484 mathed/InsetMathNest.h \
485 mathed/InsetMathNumber.h \
486 mathed/InsetMathOverset.h \
487 mathed/InsetMathPar.h \
488 mathed/InsetMathPhantom.h \
489 mathed/InsetMathRef.h \
490 mathed/InsetMathRoot.h \
491 mathed/InsetMathScript.h \
492 mathed/InsetMathSideset.h \
493 mathed/InsetMathSize.h \
494 mathed/InsetMathSpace.h \
495 mathed/InsetMathSpecialChar.h \
496 mathed/InsetMathSplit.h \
497 mathed/InsetMathSqrt.h \
498 mathed/InsetMathStackrel.h \
499 mathed/InsetMathString.h \
500 mathed/InsetMathSubstack.h \
501 mathed/InsetMathSymbol.h \
502 mathed/InsetMathTabular.h \
503 mathed/InsetMathUnderset.h \
504 mathed/InsetMathUnknown.h \
505 mathed/InsetMathXArrow.h \
506 mathed/InsetMathXYMatrix.h \
507 mathed/InsetMathDiagram.h \
509 mathed/MathAutoCorrect.h \
511 mathed/MathCompletionList.h \
512 mathed/MathExtern.h \
513 mathed/MathFactory.h \
515 mathed/MathMacroArgument.h \
516 mathed/MacroTable.h \
517 mathed/MathMacroTemplate.h \
518 mathed/MathParser.h \
519 mathed/MathParser_flags.h \
520 mathed/ReplaceData.h \
521 mathed/MathStream.h \
522 mathed/MathSupport.h \
526 @echo -e '$(SOURCEFILESMATHED:%=\n#include "%")\n' > $@
530 BUILT_SOURCES += lyxmathed.cpp
531 CLEANFILES += lyxmathed.cpp
533 liblyxmathed_a_SOURCES = lyxmathed.cpp $(HEADERFILESMATHED)
537 liblyxmathed_a_SOURCES = $(SOURCEFILESMATHED) $(HEADERFILESMATHED)
541 ############################### Insets ##############################
543 noinst_LIBRARIES += liblyxinsets.a
545 SOURCEFILESINSETS = \
546 insets/ExternalSupport.cpp \
547 insets/ExternalTemplate.cpp \
548 insets/ExternalTransforms.cpp \
549 insets/RenderButton.cpp \
550 insets/RenderGraphic.cpp \
551 insets/RenderPreview.cpp \
553 insets/InsetArgument.cpp \
554 insets/InsetBibitem.cpp \
555 insets/InsetBibtex.cpp \
556 insets/InsetBox.cpp \
557 insets/InsetBranch.cpp \
558 insets/InsetCaption.cpp \
559 insets/InsetCitation.cpp \
560 insets/InsetCollapsable.cpp \
561 insets/InsetCommand.cpp \
562 insets/InsetCommandParams.cpp \
563 insets/InsetERT.cpp \
564 insets/InsetExternal.cpp \
565 insets/InsetFlex.cpp \
566 insets/InsetFloat.cpp \
567 insets/InsetFloatList.cpp \
568 insets/InsetFoot.cpp \
569 insets/InsetFootlike.cpp \
570 insets/InsetGraphicsParams.cpp \
571 insets/InsetGraphics.cpp \
572 insets/InsetHyperlink.cpp \
573 insets/InsetInclude.cpp \
574 insets/InsetIndex.cpp \
575 insets/InsetInfo.cpp \
576 insets/InsetIPA.cpp \
577 insets/InsetIPAMacro.cpp \
578 insets/InsetLabel.cpp \
579 insets/InsetLayout.cpp \
580 insets/InsetLine.cpp \
581 insets/InsetListings.cpp \
582 insets/InsetListingsParams.cpp \
583 insets/InsetMarginal.cpp \
584 insets/InsetNewline.cpp \
585 insets/InsetNewpage.cpp \
586 insets/InsetNomencl.cpp \
587 insets/InsetNote.cpp \
588 insets/InsetPhantom.cpp \
589 insets/InsetPreview.cpp \
590 insets/InsetQuotes.cpp \
591 insets/InsetRef.cpp \
592 insets/InsetScript.cpp \
593 insets/InsetSeparator.cpp \
594 insets/InsetSpace.cpp \
595 insets/InsetSpecialChar.cpp \
596 insets/InsetTabular.cpp \
597 insets/InsetText.cpp \
598 insets/InsetTOC.cpp \
599 insets/InsetVSpace.cpp \
602 HEADERFILESINSETS = \
603 insets/ExternalSupport.h \
604 insets/ExternalTemplate.h \
605 insets/ExternalTransforms.h \
606 insets/RenderBase.h \
607 insets/RenderButton.h \
608 insets/RenderGraphic.h \
609 insets/RenderPreview.h \
611 insets/InsetArgument.h \
612 insets/InsetBibitem.h \
613 insets/InsetBibtex.h \
615 insets/InsetBranch.h \
616 insets/InsetCaption.h \
617 insets/InsetCitation.h \
619 insets/InsetCollapsable.h \
620 insets/InsetCommand.h \
621 insets/InsetCommandParams.h \
623 insets/InsetExternal.h \
625 insets/InsetFloat.h \
627 insets/InsetFloatList.h \
628 insets/InsetFootlike.h \
629 insets/InsetGraphicsParams.h \
630 insets/InsetGraphics.h \
631 insets/InsetHyperlink.h \
632 insets/InsetInclude.h \
633 insets/InsetIndex.h \
636 insets/InsetIPAMacro.h \
637 insets/InsetPreview.h \
638 insets/InsetLabel.h \
639 insets/InsetLayout.h \
641 insets/InsetListings.h \
642 insets/InsetListingsParams.h \
643 insets/InsetMarginal.h \
644 insets/InsetNewline.h \
645 insets/InsetNewpage.h \
646 insets/InsetNomencl.h \
648 insets/InsetPhantom.h \
649 insets/InsetQuotes.h \
651 insets/InsetScript.h \
652 insets/InsetSeparator.h \
653 insets/InsetSpace.h \
654 insets/InsetSpecialChar.h \
655 insets/InsetTabular.h \
658 insets/InsetVSpace.h \
661 # insets/InsetList.cpp \
662 # insets/InsetList.h \
663 # insets/InsetSection.h \
664 # insets/InsetSection.cpp
667 @echo -e '$(SOURCEFILESINSETS:%=\n#include "%")\n' > $@
671 BUILT_SOURCES += lyxinsets.cpp
672 CLEANFILES += lyxinsets.cpp
674 liblyxinsets_a_SOURCES = lyxinsets.cpp $(HEADERFILESINSETS)
678 liblyxinsets_a_SOURCES = $(SOURCEFILESINSETS) $(HEADERFILESINSETS)
683 ############################## Tests ##################################
686 tests/test_ExternalTransforms \
687 tests/regfiles/ExternalTransforms \
690 TESTS = tests/test_ExternalTransforms
692 alltests: check alltests-recursive
694 alltests-recursive: check_layout
695 @srcdir=$(srcdir) $(srcdir)/tests/test_layout; \
696 if test $$? -eq 0; then \
697 echo -e "====================\nlayout tests passed.\n===================="; \
699 echo -e "====================\nlayout tests failed.\n===================="; \
701 cd tex2lyx; $(MAKE) alltests-recursive
704 cd tex2lyx; $(MAKE) updatetests
707 check_ExternalTransforms \
711 ADD_FRAMEWORKS = -framework QtGui -framework QtCore -framework AppKit -framework ApplicationServices
714 check_layout_CPPFLAGS = $(AM_CPPFLAGS)
715 check_layout_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ $(QT_CORE_LIBS) $(LIBSHLWAPI)
716 check_layout_LDFLAGS = $(QT_CORE_LDFLAGS) $(ADD_FRAMEWORKS)
717 check_layout_SOURCES = \
718 insets/InsetLayout.cpp \
730 tests/check_layout.cpp \
732 tests/dummy_functions.cpp
734 check_ExternalTransforms_CPPFLAGS = $(AM_CPPFLAGS)
735 check_ExternalTransforms_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ $(QT_CORE_LIBS) $(LIBSHLWAPI)
736 check_ExternalTransforms_LDFLAGS = $(QT_CORE_LDFLAGS) $(ADD_FRAMEWORKS)
737 check_ExternalTransforms_SOURCES = \
738 graphics/GraphicsParams.cpp \
739 insets/ExternalTransforms.cpp \
742 tests/check_ExternalTransforms.cpp \
744 tests/dummy_functions.cpp
746 .PHONY: alltests alltests-recursive updatetests