1# Copyright 1999-2018 the Claws Mail team.
2# This file is part of Claws Mail package, and distributed under the
3# terms of the General Public License version 3 (or later).
4# See COPYING file for license details.
5
6SUBDIRS = litehtml
7EXTRA_DIST = claws.def plugin.def version.rc css.inc
8
9IFLAGS = \
10        -I$(top_srcdir)/src \
11        -I$(top_srcdir)/src/common \
12        -I$(top_builddir)/src \
13        -I$(top_srcdir)/src/gtk \
14        -I$(top_srcdir)/src/plugins/litehtml_viewer/litehtml
15
16if OS_WIN32
17
18LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
19		`echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
20		sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
21
22%.lo: %.rc
23	$(LTRCCOMPILE) -i $< -o $@
24
25plugin_res = version.lo
26plugin_res_ldflag = -Wl,.libs/version.o
27export_symbols = -export-symbols $(srcdir)/plugin.def
28plugin_deps = libclaws.a $(plugin_res) plugin.def
29plugin_ldadd = -L. -lclaws
30
31libclaws.a: claws.def
32	$(DLLTOOL) --output-lib $@ --def $<
33else
34plugin_res =
35plugin_res_ldflag =
36export_symbols =
37plugin_deps =
38plugin_ldadd =
39endif
40
41if PLATFORM_WIN32
42no_undefined = -no-undefined
43else
44no_undefined =
45endif
46
47if CYGWIN
48cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
49else
50cygwin_export_lib =
51endif
52
53plugindir = $(pkglibdir)/plugins
54
55if BUILD_LITEHTML_VIEWER_PLUGIN
56plugin_LTLIBRARIES = litehtml_viewer.la
57endif
58
59litehtml_viewer_la_DEPENDENCIES = $(plugin_deps) litehtml/liblitehtml.la
60
61litehtml_viewer_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \
62	$(top_builddir)/src/plugins/litehtml_viewer/litehtml/liblitehtml.la \
63        $(GTK_LIBS)
64
65litehtml_viewer_la_CXXFLAGS = -std=c++11
66litehtml_viewer_la_CFLAGS = -std=c99
67
68litehtml_viewer_la_SOURCES = \
69	container_linux.cpp \
70	container_linux_images.cpp \
71	plugin.c \
72	lh_prefs.c \
73	lh_viewer.c \
74	lh_widget.cpp \
75	lh_widget_text.cpp \
76	container_linux.h \
77	lh_prefs.h \
78	lh_viewer.h \
79	lh_widget.h \
80	lh_widget_wrapped.h \
81	http.h \
82	http.cpp
83
84litehtml_viewer_la_LDFLAGS = \
85	$(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
86	-avoid-version -module \
87	$(GTK_LIBS) \
88	$(FONTCONFIG_LIBS) \
89	$(CAIRO_LIBS) \
90	$(CURL_LIBS) \
91	$(LIBGUMBO_LIBS)
92
93litehtml_viewer_la_CPPFLAGS = \
94	$(IFLAGS) \
95	$(GLIB_CFLAGS) \
96	$(GTK_CFLAGS) \
97	$(ENCHANT_CFLAGS) \
98	$(FONTCONFIG_CFLAGS) \
99	$(CAIRO_CFLAGS) \
100	$(CURL_CFLAGS) \
101	$(LIBGUMBO_CFLAGS)
102
103.PHONY: test
104
105