1include $(top_srcdir)/config/common.am
2
3############################### Core  ##############################
4
5AM_CPPFLAGS += -I$(top_srcdir)/src
6AM_CPPFLAGS += $(BOOST_INCLUDES) $(ICONV_INCLUDES) $(ZLIB_INCLUDES)
7AM_CPPFLAGS += $(ENCHANT_CFLAGS) $(HUNSPELL_CFLAGS) $(MYTHES_INCLUDES)
8AM_CPPFLAGS += $(QT_CPPFLAGS) $(QT_CORE_INCLUDES)
9
10if BUILD_CLIENT_SUBDIR
11CLIENT = client
12endif
13
14SUBDIRS = support frontends . $(CLIENT) tex2lyx convert
15
16EXTRA_DIST = lyx_commit_hash.h.in \
17	CMakeLists.txt \
18	graphics/CMakeLists.txt \
19	insets/CMakeLists.txt \
20	mathed/CMakeLists.txt \
21	tests/CMakeLists.txt
22
23OTHERLIBS = $(BOOST_LIBS) $(MYTHES_LIBS) $(ENCHANT_LIBS) $(HUNSPELL_LIBS) \
24            @LIBS@ $(ICONV_LIBS) $(ZLIB_LIBS) $(SOCKET_LIBS) \
25	    $(LIBSHLWAPI) $(LIBPSAPI)
26
27noinst_LIBRARIES = liblyxcore.a
28bin_PROGRAMS = lyx
29
30lyx_LDADD = \
31	liblyxcore.a \
32	liblyxmathed.a \
33	liblyxinsets.a \
34	frontends/liblyxfrontends.a \
35	frontends/qt4/liblyxqt4.a \
36	liblyxgraphics.a \
37	support/liblyxsupport.a \
38	$(OTHERLIBS) \
39	$(QT_LDFLAGS) \
40	$(QT_LIB)
41
42if LYX_WIN_RESOURCE
43.rc.o:
44	cp $(top_srcdir)/development/Win32/packaging/icons/lyx_*32x32.ico .
45	$(RC) -I$(top_builddir) --preprocessor "$(CPP) -xc-header -DRC_INVOKED" $< -o $@
46endif
47
48if INSTALL_MACOSX
49lyx_LDFLAGS = -framework AppKit -framework ApplicationServices \
50	-Wl,-rpath,@loader_path/../Frameworks \
51	-Wl,-rpath,@executable_path/../Frameworks \
52	-Wl,-headerpad_max_install_names
53endif
54
55if INSTALL_MACOSX
56APPLESPELL = AppleSpellChecker.cpp AppleSpellChecker.h
57endif
58
59if USE_ASPELL
60ASPELL = AspellChecker.cpp AspellChecker.h
61PWL = PersonalWordList.cpp PersonalWordList.h
62endif
63
64if USE_ENCHANT
65ENCHANT = EnchantChecker.cpp EnchantChecker.h
66PWL = PersonalWordList.cpp PersonalWordList.h
67endif
68
69if USE_HUNSPELL
70HUNSPELL = HunspellChecker.cpp HunspellChecker.h
71PWL = PersonalWordList.cpp PersonalWordList.h
72endif
73
74lyx_SOURCES = \
75	main.cpp \
76	$(APPLESPELL) \
77	$(ASPELL) \
78	BiblioInfo.h \
79	BiblioInfo.cpp \
80	Box.cpp \
81	Box.h \
82	Compare.cpp \
83	Compare.h \
84	Dimension.cpp \
85	Dimension.h \
86	$(ENCHANT) \
87	$(HUNSPELL) \
88	$(PWL) \
89	LaTeXFonts.cpp \
90	LaTeXFonts.h \
91	PrinterParams.cpp \
92	PrinterParams.h \
93	Thesaurus.cpp \
94	Thesaurus.h
95
96if LYX_WIN_RESOURCE
97lyx_SOURCES += lyxwinres.rc
98endif
99
100SOURCEFILESCORE = \
101	Author.cpp \
102	boost.cpp \
103	BranchList.cpp \
104	Buffer.cpp \
105	buffer_funcs.cpp \
106	BufferList.cpp \
107	BufferParams.cpp \
108	BufferView.cpp \
109	Bullet.cpp \
110	Changes.cpp \
111	Chktex.cpp \
112	CiteEnginesList.cpp \
113	CmdDef.cpp \
114	Color.cpp \
115	ConverterCache.cpp \
116	Converter.cpp \
117	CoordCache.cpp \
118	Counters.cpp \
119	Cursor.cpp \
120	CursorSlice.cpp \
121	CutAndPaste.cpp \
122	DepTable.cpp \
123	DocIterator.cpp \
124	Encoding.cpp \
125	BufferEncodings.cpp \
126	ErrorList.cpp \
127	Exporter.cpp \
128	factory.cpp \
129	Floating.cpp \
130	FloatList.cpp \
131	FontInfo.cpp \
132	FontList.cpp \
133	Font.cpp \
134	Format.cpp \
135	FuncRequest.cpp \
136	FuncStatus.cpp \
137	Graph.cpp \
138	IndicesList.cpp \
139	InsetIterator.cpp \
140	InsetList.cpp \
141	Intl.cpp \
142	KeyMap.cpp \
143	KeySequence.cpp \
144	Language.cpp \
145	LaTeX.cpp \
146	LaTeXFeatures.cpp \
147	LaTeXPackages.cpp \
148	LayoutFile.cpp \
149	LayoutModuleList.cpp \
150	Length.cpp \
151	lengthcommon.cpp \
152	Lexer.cpp \
153	LyX.cpp \
154	LyXAction.cpp \
155	lyxfind.cpp \
156	LyXRC.cpp \
157	LyXVC.cpp \
158	MetricsInfo.cpp \
159	ModuleList.cpp \
160	Mover.cpp \
161	output_docbook.cpp \
162	output.cpp \
163	output_latex.cpp \
164	output_xhtml.cpp \
165	OutputParams.cpp \
166	output_plaintext.cpp \
167	Paragraph.cpp \
168	ParagraphMetrics.cpp \
169	ParagraphParameters.cpp \
170	ParIterator.cpp \
171	PDFOptions.cpp \
172	Row.cpp \
173	RowPainter.cpp \
174	Server.cpp \
175	ServerSocket.cpp \
176	sgml.cpp \
177	Session.cpp \
178	Spacing.cpp \
179	TexRow.cpp \
180	texstream.cpp \
181	Text.cpp \
182	Text2.cpp \
183	Text3.cpp \
184	TextClass.cpp \
185	TextMetrics.cpp \
186	TocBackend.cpp \
187	TocBuilder.cpp \
188	Trans.cpp \
189	Undo.cpp \
190	VCBackend.cpp \
191	version.cpp \
192	VSpace.cpp \
193	WordList.cpp
194
195HEADERFILESCORE = \
196	Author.h \
197	BranchList.h \
198	buffer_funcs.h \
199	Buffer.h \
200	BufferEncodings.h \
201	BufferList.h \
202	BufferParams.h \
203	BufferView.h \
204	Bullet.h \
205	Citation.h \
206	CiteEnginesList.h \
207	Changes.h \
208	Chktex.h \
209	CmdDef.h \
210	ColorCode.h \
211	Color.h \
212	ColorSet.h \
213	CompletionList.h \
214	ConverterCache.h \
215	Converter.h \
216	CoordCache.h \
217	Counters.h \
218	Cursor.h \
219	CursorSlice.h \
220	CutAndPaste.h \
221	DepTable.h \
222	DispatchResult.h \
223	DocIterator.h \
224	DocumentClassPtr.h \
225	Encoding.h \
226	ErrorList.h \
227	Exporter.h \
228	factory.h \
229	Floating.h \
230	FloatList.h \
231	Font.h \
232	FontEnums.h \
233	FontInfo.h \
234	FontList.h \
235	Format.h \
236	FuncCode.h \
237	FuncRequest.h \
238	FuncStatus.h \
239	Graph.h \
240	IndicesList.h \
241	InsetIterator.h \
242	InsetList.h \
243	Intl.h \
244	KeyMap.h \
245	KeySequence.h \
246	Language.h \
247	LaTeXFeatures.h \
248	LaTeXPackages.h \
249	LaTeX.h \
250	Layout.h \
251	LayoutEnums.h \
252	LayoutFile.h \
253	LayoutModuleList.h \
254	Length.h \
255	Lexer.h \
256	LyXAction.h \
257	lyxfind.h \
258	LyX.h \
259	LyXRC.h \
260	LyXVC.h \
261	MetricsInfo.h \
262	ModuleList.h \
263	Mover.h \
264	output_docbook.h \
265	output.h \
266	OutputEnums.h \
267	output_latex.h \
268	output_xhtml.h \
269	OutputParams.h \
270	output_plaintext.h \
271	paper.h \
272	Paragraph.h \
273	ParagraphList.h \
274	ParagraphMetrics.h \
275	ParagraphParameters.h \
276	ParIterator.h \
277	PDFOptions.h \
278	Row.h \
279	RowPainter.h \
280	Server.h \
281	ServerSocket.h \
282	Session.h \
283	sgml.h \
284	Spacing.h \
285	SpellChecker.h \
286	TexRow.h \
287	texstream.h \
288	Text.h \
289	TextClass.h \
290	TextMetrics.h \
291	Toc.h \
292	TocBackend.h \
293	TocBuilder.h \
294	Trans.h \
295	Undo.h \
296	update_flags.h \
297	VCBackend.h \
298	version.h \
299	VSpace.h \
300	WordLangTuple.h \
301	WordList.h
302
303STANDALONEFILES = \
304	Layout.cpp
305
306
307.PHONY: update_commit_hash
308
309LCH_V_CHK = $(lch__v_CHK_@AM_V@)
310lch__v_CHK_ = $(lch__v_CHK_@AM_DEFAULT_V@)
311lch__v_CHK_0 = @echo "  CHK      lyx_commit_hash.h";
312lch__v_CHK_1 =
313
314update_commit_hash:
315	$(LCH_V_CHK)rm -f hash-temp ; \
316	hash=`cd "$(top_srcdir)" && git log -1 --pretty=format:%H 2>/dev/null || echo none` ; \
317	sed s/@LYX_GIT_COMMIT_HASH@/$$hash/ "$(srcdir)"/lyx_commit_hash.h.in >hash-temp ; \
318	cmp -s lyx_commit_hash.h hash-temp || cp hash-temp lyx_commit_hash.h ; \
319	rm -f hash-temp
320
321lyx_commit_hash.h: update_commit_hash
322
323BUILT_SOURCES = lyx_commit_hash.h
324CLEANFILES = lyx_commit_hash.h
325
326lyxcore.cpp:
327	$(AM_V_GEN)for file in $(SOURCEFILESCORE) ; do echo '#include "'$${file}'"' ; done >$@
328
329if MONOLITHIC_CORE
330
331BUILT_SOURCES += lyxcore.cpp $(STANDALONEFILES)
332CLEANFILES += lyxcore.cpp
333
334nodist_liblyxcore_a_SOURCES = lyxcore.cpp
335liblyxcore_a_SOURCES = $(STANDALONEFILES) $(HEADERFILESCORE)
336
337else
338
339liblyxcore_a_SOURCES = $(SOURCEFILESCORE) $(STANDALONEFILES) $(HEADERFILESCORE)
340
341endif
342
343#########################  Qt stuff  ##############################
344
345MOCHEADER = Compare.h PreviewLoader.h
346
347if INSTALL_WINDOWS
348
349MOCHEADER += Server.h
350MOCFLAG = -D_WIN32
351
352endif
353
354MOCEDFILES = $(MOCHEADER:%.h=moc_%.cpp)
355
356BUILT_SOURCES += $(MOCEDFILES)
357CLEANFILES += $(MOCEDFILES)
358
359moc_PreviewLoader.cpp: graphics/PreviewLoader.h
360	$(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
361
362moc_%.cpp: %.h
363	$(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
364
365liblyxcore_a_DEPENDENCIES = $(MOCEDFILES)
366
367############################### Graphics ##############################
368
369noinst_LIBRARIES += liblyxgraphics.a
370
371liblyxgraphics_a_SOURCES = \
372	graphics/epstools.h \
373	graphics/epstools.cpp \
374	graphics/GraphicsCache.h \
375	graphics/GraphicsCache.cpp \
376	graphics/GraphicsCacheItem.h \
377	graphics/GraphicsCacheItem.cpp \
378	graphics/GraphicsConverter.h \
379	graphics/GraphicsConverter.cpp \
380	graphics/GraphicsImage.h \
381	graphics/GraphicsLoader.h \
382	graphics/GraphicsLoader.cpp \
383	graphics/GraphicsParams.cpp \
384	graphics/GraphicsParams.h \
385	graphics/GraphicsTypes.h \
386	graphics/PreviewImage.h \
387	graphics/PreviewImage.cpp \
388	graphics/PreviewLoader.h \
389	graphics/PreviewLoader.cpp
390
391
392############################### Mathed  ##############################
393
394noinst_LIBRARIES += liblyxmathed.a
395
396SOURCEFILESMATHED = \
397	mathed/InsetMathAMSArray.cpp \
398	mathed/InsetMathArray.cpp \
399	mathed/InsetMathBig.cpp \
400	mathed/InsetMathBoldSymbol.cpp \
401	mathed/InsetMathBox.cpp \
402	mathed/InsetMathBrace.cpp \
403	mathed/InsetMath.cpp \
404	mathed/InsetMathCancel.cpp \
405	mathed/InsetMathCancelto.cpp \
406	mathed/InsetMathCases.cpp \
407	mathed/InsetMathChar.cpp \
408	mathed/InsetMathClass.cpp \
409	mathed/InsetMathColor.cpp \
410	mathed/InsetMathCommand.cpp \
411	mathed/InsetMathComment.cpp \
412	mathed/InsetMathDecoration.cpp \
413	mathed/InsetMathDecoration.h \
414	mathed/InsetMathDelim.cpp \
415	mathed/InsetMathDiagram.cpp \
416	mathed/InsetMathDiff.cpp \
417	mathed/InsetMathDots.cpp \
418	mathed/InsetMathEnsureMath.cpp \
419	mathed/InsetMathEnv.cpp \
420	mathed/InsetMathExFunc.cpp \
421	mathed/InsetMathExInt.cpp \
422	mathed/InsetMathFont.cpp \
423	mathed/InsetMathFontOld.cpp \
424	mathed/InsetMathFrac.cpp \
425	mathed/InsetMathGrid.cpp \
426	mathed/InsetMathHull.cpp \
427	mathed/InsetMathKern.cpp \
428	mathed/InsetMathLefteqn.cpp \
429	mathed/InsetMathLim.cpp \
430	mathed/InsetMathMacro.cpp \
431	mathed/InsetMathMacroArgument.cpp \
432	mathed/InsetMathMacroTemplate.cpp \
433	mathed/InsetMathMatrix.cpp \
434	mathed/InsetMathNest.cpp \
435	mathed/InsetMathNumber.cpp \
436	mathed/InsetMathOverset.cpp \
437	mathed/InsetMathPar.cpp \
438	mathed/InsetMathPhantom.cpp \
439	mathed/InsetMathRef.cpp \
440	mathed/InsetMathRoot.cpp \
441	mathed/InsetMathScript.cpp \
442	mathed/InsetMathSideset.cpp \
443	mathed/InsetMathSize.cpp \
444	mathed/InsetMathSpace.cpp \
445	mathed/InsetMathSpecialChar.cpp \
446	mathed/InsetMathSplit.cpp \
447	mathed/InsetMathSqrt.cpp \
448	mathed/InsetMathStackrel.cpp \
449	mathed/InsetMathString.cpp \
450	mathed/InsetMathSubstack.cpp \
451	mathed/InsetMathSymbol.cpp \
452	mathed/InsetMathTabular.cpp \
453	mathed/InsetMathUnderset.cpp \
454	mathed/InsetMathUnknown.cpp \
455	mathed/InsetMathXArrow.cpp \
456	mathed/InsetMathXYMatrix.cpp \
457	mathed/MacroTable.cpp \
458	mathed/MathAtom.cpp \
459	mathed/MathAutoCorrect.cpp \
460	mathed/MathClass.cpp \
461	mathed/MathData.cpp \
462	mathed/MathExtern.cpp \
463	mathed/MathFactory.cpp \
464	mathed/MathParser.cpp \
465	mathed/MathRow.cpp \
466	mathed/MathStream.cpp \
467	mathed/MathSupport.cpp \
468	mathed/TextPainter.cpp
469
470HEADERFILESMATHED = \
471	mathed/InsetMathAMSArray.h \
472	mathed/InsetMathArray.h \
473	mathed/InsetMathBig.h \
474	mathed/InsetMathBoldSymbol.h \
475	mathed/InsetMathBox.h \
476	mathed/InsetMathBrace.h \
477	mathed/InsetMathCancel.h \
478	mathed/InsetMathCancelto.h \
479	mathed/InsetMathCases.h \
480	mathed/InsetMathChar.h \
481	mathed/InsetMathClass.h \
482	mathed/InsetMathColor.h \
483	mathed/InsetMathCommand.h \
484	mathed/InsetMathComment.h \
485	mathed/InsetMathDelim.h \
486	mathed/InsetMathDiff.h \
487	mathed/InsetMathDots.h \
488	mathed/InsetMathEnsureMath.h \
489	mathed/InsetMathEnv.h \
490	mathed/InsetMathExFunc.h \
491	mathed/InsetMathExInt.h \
492	mathed/InsetMathFont.h \
493	mathed/InsetMathFontOld.h \
494	mathed/InsetMathFrac.h \
495	mathed/InsetMathGrid.h \
496	mathed/InsetMath.h \
497	mathed/InsetMathHull.h \
498	mathed/InsetMathKern.h \
499	mathed/InsetMathLefteqn.h \
500	mathed/InsetMathLim.h \
501	mathed/InsetMathMacro.h \
502	mathed/InsetMathMacroArgument.h \
503	mathed/InsetMathMacroTemplate.h \
504	mathed/InsetMathMatrix.h \
505	mathed/InsetMathNest.h \
506	mathed/InsetMathNumber.h \
507	mathed/InsetMathOverset.h \
508	mathed/InsetMathPar.h \
509	mathed/InsetMathPhantom.h \
510	mathed/InsetMathRef.h \
511	mathed/InsetMathRoot.h \
512	mathed/InsetMathScript.h \
513	mathed/InsetMathSideset.h \
514	mathed/InsetMathSize.h \
515	mathed/InsetMathSpace.h \
516	mathed/InsetMathSpecialChar.h \
517	mathed/InsetMathSplit.h \
518	mathed/InsetMathSqrt.h \
519	mathed/InsetMathStackrel.h \
520	mathed/InsetMathString.h \
521	mathed/InsetMathSubstack.h \
522	mathed/InsetMathSymbol.h \
523	mathed/InsetMathTabular.h \
524	mathed/InsetMathUnderset.h \
525	mathed/InsetMathUnknown.h \
526	mathed/InsetMathXArrow.h \
527	mathed/InsetMathXYMatrix.h \
528	mathed/InsetMathDiagram.h \
529	mathed/MathAtom.h \
530	mathed/MathAutoCorrect.h \
531	mathed/MathClass.h \
532	mathed/MathData.h \
533	mathed/MathCompletionList.h \
534	mathed/MathExtern.h \
535	mathed/MathFactory.h \
536	mathed/MacroTable.h \
537	mathed/MathParser.h \
538	mathed/MathParser_flags.h \
539	mathed/MathRow.h \
540	mathed/ReplaceData.h \
541	mathed/MathStream.h \
542	mathed/MathSupport.h \
543	mathed/TextPainter.h
544
545lyxmathed.cpp:
546	$(AM_V_GEN)for file in $(SOURCEFILESMATHED) ; do echo '#include "'$${file}'"' ; done >$@
547
548if MONOLITHIC_MATHED
549
550BUILT_SOURCES += lyxmathed.cpp
551CLEANFILES += lyxmathed.cpp
552
553nodist_liblyxmathed_a_SOURCES = lyxmathed.cpp
554liblyxmathed_a_SOURCES = $(HEADERFILESMATHED)
555
556else
557
558liblyxmathed_a_SOURCES = $(SOURCEFILESMATHED) $(HEADERFILESMATHED)
559
560endif
561
562############################### Insets  ##############################
563
564noinst_LIBRARIES += liblyxinsets.a
565
566SOURCEFILESINSETS = \
567	insets/ExternalSupport.cpp \
568	insets/ExternalTemplate.cpp \
569	insets/ExternalTransforms.cpp \
570	insets/RenderButton.cpp \
571	insets/RenderGraphic.cpp \
572	insets/RenderPreview.cpp \
573	insets/Inset.cpp \
574	insets/InsetArgument.cpp \
575	insets/InsetBibitem.cpp \
576	insets/InsetBibtex.cpp \
577	insets/InsetBox.cpp \
578	insets/InsetBranch.cpp \
579	insets/InsetCaption.cpp \
580	insets/InsetCaptionable.cpp \
581	insets/InsetCitation.cpp \
582	insets/InsetCollapsible.cpp \
583	insets/InsetCommand.cpp \
584	insets/InsetCommandParams.cpp \
585	insets/InsetERT.cpp \
586	insets/InsetExternal.cpp \
587	insets/InsetFlex.cpp \
588	insets/InsetFloat.cpp \
589	insets/InsetFloatList.cpp \
590	insets/InsetFoot.cpp \
591	insets/InsetFootlike.cpp \
592	insets/InsetGraphicsParams.cpp \
593	insets/InsetGraphics.cpp \
594	insets/InsetHyperlink.cpp \
595	insets/InsetInclude.cpp \
596	insets/InsetIndex.cpp \
597	insets/InsetInfo.cpp \
598	insets/InsetIPA.cpp \
599	insets/InsetIPAMacro.cpp \
600	insets/InsetLabel.cpp \
601	insets/InsetLayout.cpp \
602	insets/InsetLine.cpp \
603	insets/InsetListings.cpp \
604	insets/InsetListingsParams.cpp \
605	insets/InsetMarginal.cpp \
606	insets/InsetNewline.cpp \
607	insets/InsetNewpage.cpp \
608	insets/InsetNomencl.cpp \
609	insets/InsetNote.cpp \
610	insets/InsetPhantom.cpp \
611	insets/InsetPreview.cpp \
612	insets/InsetQuotes.cpp \
613	insets/InsetRef.cpp \
614	insets/InsetScript.cpp \
615	insets/InsetSeparator.cpp \
616	insets/InsetSpace.cpp \
617	insets/InsetSpecialChar.cpp \
618	insets/InsetTabular.cpp \
619	insets/InsetText.cpp \
620	insets/InsetTOC.cpp \
621	insets/InsetVSpace.cpp \
622	insets/InsetWrap.cpp
623
624HEADERFILESINSETS = \
625	insets/ExternalSupport.h \
626	insets/ExternalTemplate.h \
627	insets/ExternalTransforms.h \
628	insets/RenderBase.h \
629	insets/RenderButton.h \
630	insets/RenderGraphic.h \
631	insets/RenderPreview.h \
632	insets/Inset.h \
633	insets/InsetArgument.h \
634	insets/InsetBibitem.h \
635	insets/InsetBibtex.h \
636	insets/InsetBox.h \
637	insets/InsetBranch.h \
638	insets/InsetCaption.h \
639	insets/InsetCaptionable.h \
640	insets/InsetCitation.h \
641	insets/InsetCode.h \
642	insets/InsetCollapsible.h \
643	insets/InsetCommand.h \
644	insets/InsetCommandParams.h \
645	insets/InsetERT.h \
646	insets/InsetExternal.h \
647	insets/InsetFlex.h \
648	insets/InsetFloat.h \
649	insets/InsetFoot.h \
650	insets/InsetFloatList.h \
651	insets/InsetFootlike.h \
652	insets/InsetGraphicsParams.h \
653	insets/InsetGraphics.h \
654	insets/InsetHyperlink.h \
655	insets/InsetInclude.h \
656	insets/InsetIndex.h \
657	insets/InsetInfo.h \
658	insets/InsetIPA.h \
659	insets/InsetIPAMacro.h \
660	insets/InsetPreview.h \
661	insets/InsetLabel.h \
662	insets/InsetLayout.h \
663	insets/InsetLine.h \
664	insets/InsetListings.h \
665	insets/InsetListingsParams.h \
666	insets/InsetMarginal.h \
667	insets/InsetNewline.h \
668	insets/InsetNewpage.h \
669	insets/InsetNomencl.h \
670	insets/InsetNote.h \
671	insets/InsetPhantom.h \
672	insets/InsetQuotes.h \
673	insets/InsetRef.h \
674	insets/InsetScript.h \
675	insets/InsetSeparator.h \
676	insets/InsetSpace.h \
677	insets/InsetSpecialChar.h \
678	insets/InsetTabular.h \
679	insets/InsetText.h \
680	insets/InsetTOC.h \
681	insets/InsetVSpace.h \
682	insets/InsetWrap.h
683
684lyxinsets.cpp:
685	$(AM_V_GEN)for file in $(SOURCEFILESINSETS) ; do echo '#include "'$${file}'"' ; done >$@
686
687if MONOLITHIC_INSETS
688
689BUILT_SOURCES += lyxinsets.cpp
690CLEANFILES += lyxinsets.cpp
691
692nodist_liblyxinsets_a_SOURCES = lyxinsets.cpp
693liblyxinsets_a_SOURCES = $(HEADERFILESINSETS)
694
695else
696
697liblyxinsets_a_SOURCES = $(SOURCEFILESINSETS) $(HEADERFILESINSETS)
698
699endif
700
701
702############################## Tests ##################################
703
704EXTRA_DIST += \
705	tests/test_ExternalTransforms \
706	tests/test_ListingsCaption \
707	tests/test_layout \
708	tests/test_Length \
709	tests/regfiles/ExternalTransforms \
710	tests/regfiles/Length \
711	tests/regfiles/ListingsCaption \
712	tests/dummy_functions.cpp \
713	tests/boost.cpp
714
715TESTS = tests/test_ExternalTransforms tests/test_ListingsCaption \
716	tests/test_layout tests/test_Length
717
718alltests: check alltests-recursive
719
720alltests-recursive: check_layout
721	@srcdir=$(srcdir) $(srcdir)/tests/test_layout; \
722	if test $$? -eq 0; then \
723		echo -e "====================\nlayout tests passed.\n===================="; \
724	else \
725		echo -e "====================\nlayout tests failed.\n===================="; \
726	fi
727	cd tex2lyx; $(MAKE) alltests-recursive
728
729updatetests:
730	cd tex2lyx; $(MAKE) updatetests
731
732check_PROGRAMS = \
733	check_ExternalTransforms \
734	check_Length \
735	check_ListingsCaption \
736	check_layout
737
738if INSTALL_MACOSX
739ADD_FRAMEWORKS = -framework QtGui -framework QtCore -framework AppKit -framework ApplicationServices
740endif
741
742TESTS_LIBS = support/liblyxsupport.a \
743	$(LIBICONV) $(BOOST_LIBS) @LIBS@ \
744	$(ICONV_LIBS) $(ZLIB_LIBS) $(QT_LIB) $(LIBSHLWAPI)
745
746check_layout_CPPFLAGS = $(AM_CPPFLAGS)
747check_layout_LDADD = $(check_layout_LYX_OBJS) $(TESTS_LIBS)
748check_layout_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
749check_layout_SOURCES = \
750	tests/check_layout.cpp
751check_layout_LYX_OBJS = \
752	insets/InsetLayout.o \
753	CiteEnginesList.o \
754	Color.o \
755	Counters.o \
756	Floating.o \
757	FloatList.o \
758	FontInfo.o \
759	Layout.o \
760	LayoutFile.o \
761	Lexer.o \
762	ModuleList.o \
763	Spacing.o \
764	TextClass.o \
765	tests/dummy_functions.o \
766	tests/boost.o
767
768check_ExternalTransforms_CPPFLAGS = $(AM_CPPFLAGS)
769check_ExternalTransforms_LDADD = $(check_ExternalTransforms_LYX_OBJS) $(TESTS_LIBS)
770check_ExternalTransforms_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
771check_ExternalTransforms_SOURCES = \
772	tests/check_ExternalTransforms.cpp
773check_ExternalTransforms_LYX_OBJS = \
774	tests/dummy_functions.o \
775	tests/boost.o \
776	graphics/GraphicsParams.o \
777	insets/ExternalTransforms.o \
778	Length.o \
779	lengthcommon.o
780
781check_Length_CPPFLAGS = $(AM_CPPFLAGS)
782check_Length_LDADD = $(check_Length_LYX_OBJS) $(TESTS_LIBS)
783check_Length_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
784check_Length_SOURCES = \
785	tests/check_Length.cpp
786check_Length_LYX_OBJS = \
787	tests/dummy_functions.o \
788	tests/boost.o \
789	Length.o \
790	lengthcommon.o
791
792check_ListingsCaption_CPPFLAGS = $(AM_CPPFLAGS)
793check_ListingsCaption_LDADD = $(check_ListingsCaption_LYX_OBJS) $(TESTS_LIBS)
794check_ListingsCaption_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
795check_ListingsCaption_SOURCES = \
796	tests/check_ListingsCaption.cpp
797check_ListingsCaption_LYX_OBJS = \
798	tests/dummy_functions.o \
799	tests/boost.o
800
801.PHONY: alltests alltests-recursive updatetests
802