Distribute .in files too
[claws.git] / src / plugins / pgpmime / Makefile.am
1 # Makefile.am for "src/plugins/pgpmime" directory
2 # This file is part of Claws Mail package.
3 # See COPYING file for license details.
4
5 appdata_in_files = claws-mail-pgpmime.metainfo.xml.in
6 appdatadir=$(datadir)/appdata
7 appdata_DATA = $(appdata_in_files:.xml.in=.xml)
8
9 @INTLTOOL_XML_RULE@
10
11 EXTRA_DIST = version.rc plugin.def claws.def mypgpcore.def pgpmime.deps \
12         $(appdata_DATA) $(appdata_in_files)
13
14 IFLAGS = \
15         -I$(top_srcdir)/src \
16         -I$(top_srcdir)/src/common \
17         -I$(top_builddir)/src/common \
18         -I$(top_srcdir)/src/gtk
19
20 if OS_WIN32
21
22 LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
23      `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
24      sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
25
26 %.lo : %.rc
27         $(LTRCCOMPILE) -i $< -o $@
28
29 plugin_res = version.lo
30 plugin_res_ldflag = -Wl,.libs/version.o
31
32 export_symbols = -export-symbols $(srcdir)/plugin.def
33
34 plugin_deps = libclaws.a libmypgpcore.a $(plugin_res) plugin.def
35
36 libclaws.a: claws.def
37         $(DLLTOOL) --output-lib $@ --def $<
38
39 libmypgpcore.a: mypgpcore.def
40         $(DLLTOOL) --output-lib $@ --def $<
41
42 plugin_ldadd = -L. -lclaws -lmypgpcore
43
44 else
45 plugin_res =
46 plugin_res_ldflag =
47 export_symbols =
48 plugin_deps =
49 plugin_ldadd =
50 endif
51
52 if PLATFORM_WIN32
53 no_undefined = -no-undefined
54 else
55 no_undefined =
56 endif
57
58 if CYGWIN
59 cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
60 pgpcore_lib = ../pgpcore/pgpcore.la
61 else
62 pgpcore_lib = 
63 endif
64
65 plugindir = $(pkglibdir)/plugins
66 plugin_DATA=pgpmime.deps
67
68 if BUILD_PGPMIME_PLUGIN
69 plugin_LTLIBRARIES = pgpmime.la
70 endif
71
72 pgpmime_la_SOURCES = \
73         plugin.c \
74         pgpmime.c
75
76 pluginincludedir = $(pkgincludedir)/plugins/pgpmime
77 plugininclude_HEADERS = \
78         pgpmime.h 
79
80 pgpmime_la_LDFLAGS = \
81         $(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
82         -avoid-version -module 
83 pgpmime_la_DEPENDENCIES = $(plugin_deps)
84 pgpmime_la_LIBADD = $(plugin_ldadd) $(pgpcore_lib) $(cygwin_export_lib) \
85         $(GTK_LIBS) \
86         $(GPGME_LIBS) \
87         $(ENCHANT_LIBS)
88
89 pgpmime_la_CPPFLAGS = \
90         $(IFLAGS) \
91         $(GLIB_CFLAGS) \
92         $(GTK_CFLAGS) \
93         $(GPGME_CFLAGS) \
94         $(ENCHANT_CFLAGS) \
95         -Wno-deprecated-declarations
96
97 clean-local:
98         rm -f libclaws.a