[Commits] [SCM] claws branch, gtk3, updated. 4.0.0-98-g7d309cfc2

jonathan at claws-mail.org jonathan at claws-mail.org
Wed Sep 1 17:34:34 UTC 2021


The branch, gtk3 has been updated
       via  7d309cfc22c7b9c58ee593f72f2fd9d33bf495a3 (commit)
       via  8e57a6d6eb45d90fbc5340dfa786a03128b92c52 (commit)
       via  3099095d307714a1e420a6699073fec73056a022 (commit)
       via  23aec49cdd06f60b104083c4f0aa154b58917315 (commit)
      from  2c249a3b6990fd2ea69c08f490212c1ccf6e88dc (commit)

Summary of changes:
 .gitignore                                       |   2 +
 configure.ac                                     |  21 ++++
 src/Makefile.am                                  |  10 +-
 src/plugins/address_keeper/Makefile.am           |  66 +++++-------
 src/plugins/address_keeper/version.rc            |  36 -------
 src/plugins/address_keeper/version.rc.in         |  34 ++++++
 src/plugins/att_remover/Makefile.am              |  69 +++++--------
 src/plugins/att_remover/version.rc               |  36 -------
 src/plugins/att_remover/version.rc.in            |  34 ++++++
 src/plugins/attachwarner/Makefile.am             |  66 +++++-------
 src/plugins/attachwarner/version.rc              |  36 -------
 src/plugins/attachwarner/version.rc.in           |  34 ++++++
 src/plugins/bsfilter/Makefile.am                 |  66 +++++-------
 src/plugins/bsfilter/version.rc                  |  36 -------
 src/plugins/bsfilter/version.rc.in               |  34 ++++++
 src/plugins/fancy/Makefile.am                    |  75 ++++++--------
 src/plugins/fancy/version.rc                     |  36 -------
 src/plugins/fancy/version.rc.in                  |  34 ++++++
 src/plugins/fetchinfo/Makefile.am                |  79 ++++++--------
 src/plugins/fetchinfo/version.rc                 |  36 -------
 src/plugins/fetchinfo/version.rc.in              |  34 ++++++
 src/plugins/libravatar/Makefile.am               |  84 +++++++--------
 src/plugins/libravatar/version.rc                |  36 -------
 src/plugins/libravatar/version.rc.in             |  34 ++++++
 src/plugins/litehtml_viewer/Makefile.am          | 123 ++++++++++------------
 src/plugins/litehtml_viewer/claws.def            |   1 +
 src/plugins/litehtml_viewer/litehtml/Makefile.am |  10 +-
 src/plugins/litehtml_viewer/version.rc           |  36 -------
 src/plugins/litehtml_viewer/version.rc.in        |  34 ++++++
 src/plugins/mailmbox/Makefile.am                 | 107 +++++++++----------
 src/plugins/mailmbox/version.rc                  |  36 -------
 src/plugins/mailmbox/version.rc.in               |  34 ++++++
 src/plugins/managesieve/Makefile.am              |  76 ++++++--------
 src/plugins/managesieve/version.rc               |  36 -------
 src/plugins/managesieve/version.rc.in            |  34 ++++++
 src/plugins/notification/Makefile.am             | 101 +++++++++---------
 src/plugins/notification/version.rc              |  36 -------
 src/plugins/notification/version.rc.in           |  34 ++++++
 src/plugins/pdf_viewer/Makefile.am               |  63 +++++-------
 src/plugins/pdf_viewer/version.rc                |  36 -------
 src/plugins/pdf_viewer/version.rc.in             |  34 ++++++
 src/plugins/pgpcore/Makefile.am                  | 100 +++++++++---------
 src/plugins/pgpcore/version.rc                   |  36 -------
 src/plugins/pgpcore/version.rc.in                |  34 ++++++
 src/plugins/pgpinline/Makefile.am                |  72 ++++++-------
 src/plugins/pgpinline/version.rc                 |  36 -------
 src/plugins/pgpinline/version.rc.in              |  34 ++++++
 src/plugins/pgpmime/Makefile.am                  |  72 ++++++-------
 src/plugins/pgpmime/version.rc                   |  36 -------
 src/plugins/pgpmime/version.rc.in                |  34 ++++++
 src/plugins/rssyl/Makefile.am                    | 126 ++++++++++++-----------
 src/plugins/rssyl/version.rc                     |  36 -------
 src/plugins/rssyl/version.rc.in                  |  34 ++++++
 src/plugins/smime/Makefile.am                    |  72 ++++++-------
 src/plugins/smime/version.rc                     |  36 -------
 src/plugins/smime/version.rc.in                  |  34 ++++++
 src/plugins/spam_report/Makefile.am              |  75 ++++++--------
 src/plugins/spam_report/version.rc               |  36 -------
 src/plugins/spam_report/version.rc.in            |  34 ++++++
 src/plugins/tnef_parse/Makefile.am               |  84 +++++++--------
 src/plugins/tnef_parse/version.rc                |  36 -------
 src/plugins/tnef_parse/version.rc.in             |  34 ++++++
 src/plugins/vcalendar/Makefile.am                |  94 ++++++++---------
 src/plugins/vcalendar/version.rc                 |  36 -------
 src/plugins/vcalendar/version.rc.in              |  34 ++++++
 src/w32-resource.rc                              |   1 -
 src/w32-resource.rc.in                           |  36 +++++++
 67 files changed, 1495 insertions(+), 1656 deletions(-)
 delete mode 100644 src/plugins/address_keeper/version.rc
 create mode 100644 src/plugins/address_keeper/version.rc.in
 delete mode 100644 src/plugins/att_remover/version.rc
 create mode 100644 src/plugins/att_remover/version.rc.in
 delete mode 100644 src/plugins/attachwarner/version.rc
 create mode 100644 src/plugins/attachwarner/version.rc.in
 delete mode 100644 src/plugins/bsfilter/version.rc
 create mode 100644 src/plugins/bsfilter/version.rc.in
 delete mode 100644 src/plugins/fancy/version.rc
 create mode 100644 src/plugins/fancy/version.rc.in
 delete mode 100644 src/plugins/fetchinfo/version.rc
 create mode 100644 src/plugins/fetchinfo/version.rc.in
 delete mode 100644 src/plugins/libravatar/version.rc
 create mode 100644 src/plugins/libravatar/version.rc.in
 delete mode 100644 src/plugins/litehtml_viewer/version.rc
 create mode 100644 src/plugins/litehtml_viewer/version.rc.in
 delete mode 100644 src/plugins/mailmbox/version.rc
 create mode 100644 src/plugins/mailmbox/version.rc.in
 delete mode 100644 src/plugins/managesieve/version.rc
 create mode 100644 src/plugins/managesieve/version.rc.in
 delete mode 100644 src/plugins/notification/version.rc
 create mode 100644 src/plugins/notification/version.rc.in
 delete mode 100644 src/plugins/pdf_viewer/version.rc
 create mode 100644 src/plugins/pdf_viewer/version.rc.in
 delete mode 100644 src/plugins/pgpcore/version.rc
 create mode 100644 src/plugins/pgpcore/version.rc.in
 delete mode 100644 src/plugins/pgpinline/version.rc
 create mode 100644 src/plugins/pgpinline/version.rc.in
 delete mode 100644 src/plugins/pgpmime/version.rc
 create mode 100644 src/plugins/pgpmime/version.rc.in
 delete mode 100644 src/plugins/rssyl/version.rc
 create mode 100644 src/plugins/rssyl/version.rc.in
 delete mode 100644 src/plugins/smime/version.rc
 create mode 100644 src/plugins/smime/version.rc.in
 delete mode 100644 src/plugins/spam_report/version.rc
 create mode 100644 src/plugins/spam_report/version.rc.in
 delete mode 100644 src/plugins/tnef_parse/version.rc
 create mode 100644 src/plugins/tnef_parse/version.rc.in
 delete mode 100644 src/plugins/vcalendar/version.rc
 create mode 100644 src/plugins/vcalendar/version.rc.in
 delete mode 100644 src/w32-resource.rc
 create mode 100644 src/w32-resource.rc.in


- Log -----------------------------------------------------------------
commit 7d309cfc22c7b9c58ee593f72f2fd9d33bf495a3
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Wed Sep 1 09:52:27 2021 -0700

    Fix building litehtml viewer
    
    Fix undefined reference when building with -O0 optimization level

diff --git a/src/plugins/litehtml_viewer/claws.def b/src/plugins/litehtml_viewer/claws.def
index 3ca37594a..d55ea7ad1 100644
--- a/src/plugins/litehtml_viewer/claws.def
+++ b/src/plugins/litehtml_viewer/claws.def
@@ -1,6 +1,7 @@
 LIBRARY CLAWS-MAIL.EXE
 EXPORTS
 claws_ssl_get_cert_file
+conv_get_current_locale
 debug_print_real
 debug_srcname
 get_rc_dir

commit 8e57a6d6eb45d90fbc5340dfa786a03128b92c52
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Fri Aug 27 16:01:15 2021 -0700

    Update plugin makefiles for Windows

diff --git a/src/plugins/address_keeper/Makefile.am b/src/plugins/address_keeper/Makefile.am
index 180f9233c..1ec3d05a5 100644
--- a/src/plugins/address_keeper/Makefile.am
+++ b/src/plugins/address_keeper/Makefile.am
@@ -1,56 +1,41 @@
-# Copyright 1999-2014 the Claws Mail team.
+# Copyright 1999-2021 the Claws Mail team.
 # This file is part of Claws Mail package, and distributed under the
 # terms of the General Public License version 3 (or later).
 # See COPYING file for license details.
 
-EXTRA_DIST = claws.def plugin.def version.rc
+EXTRA_DIST = claws.def plugin.def
 
 IFLAGS = \
 	-I$(top_builddir)/src \
+	-I$(top_builddir)/src/common \
 	-I$(top_srcdir)/src \
 	-I$(top_srcdir)/src/common \
-	-I$(top_builddir)/src/common \
 	-I$(top_srcdir)/src/gtk
 
-if OS_WIN32
-
-LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
-     `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
-     sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
-
-%.lo : %.rc
-	$(LTRCCOMPILE) -i $< -o $@
-
-plugin_res = version.lo
-plugin_res_ldflag = -Wl,.libs/version.o
-
-export_symbols = -export-symbols $(srcdir)/plugin.def
+plugin_ldflags =
+plugin_extra_deps =
+plugin_libadd =
 
-plugin_deps = libclaws.a $(plugin_res) plugin.def
+if OS_WIN32
 
 libclaws.a: claws.def
 	$(DLLTOOL) --output-lib $@ --def $<
 
-plugin_ldadd = -L. -lclaws
+%.lo : %.rc
+	$(LIBTOOL) --mode=compile --tag=RC $(RC) -i $< -o $@
 
-else
-plugin_res =
-plugin_res_ldflag =
-export_symbols =
-plugin_deps =
-plugin_ldadd =
-endif
+plugin_ldflags += \
+	-Wl,.libs/version.o \
+	-no-undefined \
+	-export-symbols $(srcdir)/plugin.def
+plugin_extra_deps += libclaws.a version.lo plugin.def
+plugin_libadd += -L. -lclaws
 
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-else
-no_undefined =
 endif
 
 if CYGWIN
-cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
-else
-cygwin_export_lib = 
+plugin_ldflags += -no-undefined
+plugin_libadd += -L$(top_builddir)/src -lclaws-mail
 endif
 
 plugindir = $(pkglibdir)/plugins
@@ -60,13 +45,12 @@ plugin_LTLIBRARIES = address_keeper.la
 endif
 
 address_keeper_la_LDFLAGS = \
-	$(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
-	-avoid-version -module \
-	$(GTK_LIBS)
+	$(plugin_ldflags) \
+	-avoid-version -module
 
-address_keeper_la_DEPENDENCIES = $(plugin_deps)
+EXTRA_address_keeper_la_DEPENDENCIES = $(plugin_extra_deps)
 
-address_keeper_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \
+address_keeper_la_LIBADD = $(plugin_libadd) \
 	$(GTK_LIBS)
 
 address_keeper_la_CPPFLAGS = \
@@ -76,8 +60,12 @@ address_keeper_la_CPPFLAGS = \
 	$(ENCHANT_CFLAGS)
 
 address_keeper_la_SOURCES = \
-	address_keeper.c address_keeper.h \
-	address_keeper_prefs.c address_keeper_prefs.h
+	address_keeper.c \
+	address_keeper.h \
+	address_keeper_prefs.c \
+	address_keeper_prefs.h
 
+clean-local:
+	rm -f libclaws.a
 
 .PHONY: test
diff --git a/src/plugins/att_remover/Makefile.am b/src/plugins/att_remover/Makefile.am
index 4bf90a6c2..424a4fa4e 100644
--- a/src/plugins/att_remover/Makefile.am
+++ b/src/plugins/att_remover/Makefile.am
@@ -1,56 +1,41 @@
-# Copyright 1999-2014 the Claws Mail team.
+# Copyright 1999-2021 the Claws Mail team.
 # This file is part of Claws Mail package, and distributed under the
 # terms of the General Public License version 3 (or later).
 # See COPYING file for license details.
 
-EXTRA_DIST = claws.def plugin.def version.rc
+EXTRA_DIST = claws.def plugin.def
 
 IFLAGS = \
 	-I$(top_builddir)/src \
+	-I$(top_builddir)/src/common \
 	-I$(top_srcdir)/src \
 	-I$(top_srcdir)/src/common \
-	-I$(top_builddir)/src/common \
 	-I$(top_srcdir)/src/gtk
 
-if OS_WIN32
-
-LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
-     `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
-     sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
-
-%.lo : %.rc
-	$(LTRCCOMPILE) -i $< -o $@
+plugin_ldflags =
+plugin_extra_deps =
+plugin_libadd =
 
-plugin_res = version.lo
-plugin_res_ldflag = -Wl,.libs/version.o
-
-export_symbols = -export-symbols $(srcdir)/plugin.def
-
-plugin_deps = libclaws.a $(plugin_res) plugin.def
+if OS_WIN32
 
 libclaws.a: claws.def
 	$(DLLTOOL) --output-lib $@ --def $<
 
-plugin_ldadd = -L. -lclaws
+%.lo : %.rc
+	$(LIBTOOL) --mode=compile --tag=RC $(RC) -i $< -o $@
 
-else
-plugin_res =
-plugin_res_ldflag =
-export_symbols =
-plugin_deps =
-plugin_ldadd =
-endif
+plugin_ldflags += \
+	-Wl,.libs/version.o \
+	-no-undefined \
+	-export-symbols $(srcdir)/plugin.def
+plugin_extra_deps += libclaws.a version.lo plugin.def
+plugin_libadd += -L. -lclaws
 
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-else
-no_undefined =
 endif
 
 if CYGWIN
-cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
-else
-cygwin_export_lib = 
+plugin_ldflags += -no-undefined
+plugin_libadd += -L$(top_builddir)/src -lclaws-mail
 endif
 
 plugindir = $(pkglibdir)/plugins
@@ -59,18 +44,14 @@ if BUILD_ATT_REMOVER_PLUGIN
 plugin_LTLIBRARIES = att_remover.la
 endif
 
-att_remover_la_SOURCES = \
-	att_remover.c
-
 att_remover_la_LDFLAGS = \
-	$(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
-	-avoid-version -module \
-	$(GTK_LIBS)
+	$(plugin_ldflags) \
+	-avoid-version -module
 
-att_remover_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \
-	$(GTK_LIBS)
+EXTRA_att_remover_la_DEPENDENCIES = $(plugin_extra_deps)
 
-att_remover_la_DEPENDENCIES = $(plugin_deps)
+att_remover_la_LIBADD = $(plugin_libadd) \
+	$(GTK_LIBS)
 
 att_remover_la_CPPFLAGS = \
 	$(IFLAGS) \
@@ -78,4 +59,10 @@ att_remover_la_CPPFLAGS = \
 	$(GTK_CFLAGS) \
 	$(ENCHANT_CFLAGS)
 
+att_remover_la_SOURCES = \
+	att_remover.c
+
+clean-local:
+	rm -f libclaws.a
+
 .PHONY: test
diff --git a/src/plugins/attachwarner/Makefile.am b/src/plugins/attachwarner/Makefile.am
index 5f06df79e..b2b3f4211 100644
--- a/src/plugins/attachwarner/Makefile.am
+++ b/src/plugins/attachwarner/Makefile.am
@@ -1,56 +1,41 @@
-# Copyright 1999-2014 the Claws Mail team.
+# Copyright 1999-2021 the Claws Mail team.
 # This file is part of Claws Mail package, and distributed under the
 # terms of the General Public License version 3 (or later).
 # See COPYING file for license details.
 
-EXTRA_DIST = claws.def plugin.def version.rc
+EXTRA_DIST = claws.def plugin.def
 
 IFLAGS = \
 	-I$(top_builddir)/src \
+	-I$(top_builddir)/src/common \
 	-I$(top_srcdir)/src \
 	-I$(top_srcdir)/src/common \
-	-I$(top_builddir)/src/common \
 	-I$(top_srcdir)/src/gtk
 
-if OS_WIN32
-
-LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
-     `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
-     sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
-
-%.lo : %.rc
-	$(LTRCCOMPILE) -i $< -o $@
-
-plugin_res = version.lo
-plugin_res_ldflag = -Wl,.libs/version.o
-
-export_symbols = -export-symbols $(srcdir)/plugin.def
+plugin_ldflags =
+plugin_extra_deps =
+plugin_libadd =
 
-plugin_deps = libclaws.a $(plugin_res) plugin.def
+if OS_WIN32
 
 libclaws.a: claws.def
 	$(DLLTOOL) --output-lib $@ --def $<
 
-plugin_ldadd = -L. -lclaws
+%.lo : %.rc
+	$(LIBTOOL) --mode=compile --tag=RC $(RC) -i $< -o $@
 
-else
-plugin_res =
-plugin_res_ldflag =
-export_symbols =
-plugin_deps =
-plugin_ldadd =
-endif
+plugin_ldflags += \
+	-Wl,.libs/version.o \
+	-no-undefined \
+	-export-symbols $(srcdir)/plugin.def
+plugin_extra_deps += libclaws.a version.lo plugin.def
+plugin_libadd += -L. -lclaws
 
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-else
-no_undefined =
 endif
 
 if CYGWIN
-cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
-else
-cygwin_export_lib = 
+plugin_ldflags += -no-undefined
+plugin_libadd += -L$(top_builddir)/src -lclaws-mail
 endif
 
 plugindir = $(pkglibdir)/plugins
@@ -60,13 +45,12 @@ plugin_LTLIBRARIES = attachwarner.la
 endif
 
 attachwarner_la_LDFLAGS = \
-	$(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
-	-avoid-version -module \
-	$(GTK_LIBS)
+	$(plugin_ldflags) \
+	-avoid-version -module
 
-attachwarner_la_DEPENDENCIES = $(plugin_deps)
+EXTRA_attachwarner_la_DEPENDENCIES = $(plugin_extra_deps)
 
-attachwarner_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \
+attachwarner_la_LIBADD = $(plugin_libadd) \
 	$(GTK_LIBS)
 
 attachwarner_la_CPPFLAGS = \
@@ -76,8 +60,12 @@ attachwarner_la_CPPFLAGS = \
 	$(ENCHANT_CFLAGS)
 
 attachwarner_la_SOURCES = \
-	attachwarner.c attachwarner.h \
-	attachwarner_prefs.c attachwarner_prefs.h
+	attachwarner.c \
+	attachwarner.h \
+	attachwarner_prefs.c \
+	attachwarner_prefs.h
 
+clean-local:
+	rm -f libclaws.a
 
 .PHONY: test
diff --git a/src/plugins/bsfilter/Makefile.am b/src/plugins/bsfilter/Makefile.am
index 8b5d70b4f..1dddb45c2 100644
--- a/src/plugins/bsfilter/Makefile.am
+++ b/src/plugins/bsfilter/Makefile.am
@@ -1,55 +1,40 @@
-# Copyright 1999-2014 the Claws Mail team.
+# Copyright 1999-2021 the Claws Mail team.
 # This file is part of Claws Mail package, and distributed under the
 # terms of the General Public License version 3 (or later).
 # See COPYING file for license details.
 
-EXTRA_DIST = claws.def plugin.def version.rc
+EXTRA_DIST = claws.def plugin.def
 
 IFLAGS = \
+	-I$(top_builddir)/src \
 	-I$(top_srcdir)/src \
 	-I$(top_srcdir)/src/common \
-	-I$(top_builddir)/src \
 	-I$(top_srcdir)/src/gtk
 
-if OS_WIN32
-
-LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
-     `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
-     sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
-
-%.lo : %.rc
-	$(LTRCCOMPILE) -i $< -o $@
+plugin_ldflags =
+plugin_extra_deps =
+plugin_libadd =
 
-plugin_res = version.lo
-plugin_res_ldflag = -Wl,.libs/version.o
-
-export_symbols = -export-symbols $(srcdir)/plugin.def
-
-plugin_deps = libclaws.a $(plugin_res) plugin.def
+if OS_WIN32
 
 libclaws.a: claws.def
 	$(DLLTOOL) --output-lib $@ --def $<
 
-plugin_ldadd = -L. -lclaws
+%.lo : %.rc
+	$(LIBTOOL) --mode=compile --tag=RC $(RC) -i $< -o $@
 
-else
-plugin_res =
-plugin_res_ldflag =
-export_symbols =
-plugin_deps =
-plugin_ldadd =
-endif
+plugin_ldflags += \
+	-Wl,.libs/version.o \
+	-no-undefined \
+	-export-symbols $(srcdir)/plugin.def
+plugin_extra_deps += libclaws.a version.lo plugin.def
+plugin_libadd += -L. -lclaws
 
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-else
-no_undefined =
 endif
 
 if CYGWIN
-cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
-else
-cygwin_export_lib = 
+plugin_ldflags += -no-undefined
+plugin_libadd += -L$(top_builddir)/src -lclaws-mail
 endif
 
 plugindir = $(pkglibdir)/plugins
@@ -59,14 +44,14 @@ plugin_LTLIBRARIES = bsfilter.la
 endif
 
 bsfilter_la_LDFLAGS = \
-	$(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
-	-avoid-version -module \
-	$(GTK_LIBS) $(PTHREAD_LIBS) 
+	$(plugin_ldflags) \
+	-avoid-version -module
 
-bsfilter_la_DEPENDENCIES = $(plugin_deps)
+EXTRA_bsfilter_la_DEPENDENCIES = $(plugin_extra_deps)
 
-bsfilter_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \
-	$(GTK_LIBS) $(PTHREAD_LIBS) 
+bsfilter_la_LIBADD = $(plugin_libadd) \
+	$(GTK_LIBS) \
+	$(PTHREAD_LIBS)
 
 bsfilter_la_CPPFLAGS = \
 	$(IFLAGS) \
@@ -75,8 +60,11 @@ bsfilter_la_CPPFLAGS = \
 	$(ENCHANT_CFLAGS)
 
 bsfilter_la_SOURCES = \
-	bsfilter.c bsfilter.h \
+	bsfilter.c \
+	bsfilter.h \
 	bsfilter_gtk.c
 
+clean-local:
+	rm -f libclaws.a
 
 .PHONY: test
diff --git a/src/plugins/fancy/Makefile.am b/src/plugins/fancy/Makefile.am
index d4368615a..989a7440c 100644
--- a/src/plugins/fancy/Makefile.am
+++ b/src/plugins/fancy/Makefile.am
@@ -1,55 +1,40 @@
-# Copyright 1999-2014 the Claws Mail team.
+# Copyright 1999-2021 the Claws Mail team.
 # This file is part of Claws Mail package, and distributed under the
 # terms of the General Public License version 3 (or later).
 # See COPYING file for license details.
 
-EXTRA_DIST = claws.def plugin.def version.rc
+EXTRA_DIST = claws.def plugin.def
 
 IFLAGS = \
+	-I$(top_builddir)/src \
 	-I$(top_srcdir)/src \
 	-I$(top_srcdir)/src/common \
-	-I$(top_builddir)/src \
 	-I$(top_srcdir)/src/gtk
 
-if OS_WIN32
+plugin_ldflags =
+plugin_extra_deps =
+plugin_libadd =
 
-LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
-     `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
-     sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
-
-%.lo : %.rc
-	$(LTRCCOMPILE) -i $< -o $@
-
-plugin_res = version.lo
-plugin_res_ldflag = -Wl,.libs/version.o
-
-export_symbols = -export-symbols $(srcdir)/plugin.def
-
-plugin_deps = libclaws.a $(plugin_res) plugin.def
+if OS_WIN32
 
 libclaws.a: claws.def
 	$(DLLTOOL) --output-lib $@ --def $<
 
-plugin_ldadd = -L. -lclaws
+%.lo : %.rc
+	$(LIBTOOL) --mode=compile --tag=RC $(RC) -i $< -o $@
 
-else
-plugin_res =
-plugin_res_ldflag =
-export_symbols =
-plugin_deps =
-plugin_ldadd =
-endif
+plugin_ldflags += \
+	-Wl,.libs/version.o \
+	-no-undefined \
+	-export-symbols $(srcdir)/plugin.def
+plugin_extra_deps += libclaws.a version.lo plugin.def
+plugin_libadd += -L. -lclaws
 
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-else
-no_undefined =
 endif
 
 if CYGWIN
-cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
-else
-cygwin_export_lib = 
+plugin_ldflags += -no-undefined
+plugin_libadd += -L$(top_builddir)/src -lclaws-mail
 endif
 
 plugindir = $(pkglibdir)/plugins
@@ -58,20 +43,13 @@ if BUILD_FANCY_PLUGIN
 plugin_LTLIBRARIES = fancy.la
 endif
 
-fancy_la_DEPENDENCIES = $(plugin_deps)
-
-fancy_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \
-	$(GTK_LIBS)
+fancy_la_LDFLAGS = \
+	$(plugin_ldflags) \
+	-avoid-version -module
 
-fancy_la_SOURCES = \
-        fancy_viewer.c \
-        fancy_viewer.h \
-        fancy_prefs.c \
-        fancy_prefs.h
+EXTRA_fancy_la_DEPENDENCIES = $(plugin_extra_deps)
 
-fancy_la_LDFLAGS = \
-	$(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
-	-avoid-version -module \
+fancy_la_LIBADD = $(plugin_libadd) \
 	$(GTK_LIBS) \
 	$(WEBKIT_LIBS) \
 	$(LIBSOUP_GNOME_LIBS) \
@@ -86,4 +64,13 @@ fancy_la_CPPFLAGS = \
 	$(LIBSOUP_GNOME_CFLAGS) \
 	$(CURL_CFLAGS)
 
+fancy_la_SOURCES = \
+	fancy_prefs.c \
+	fancy_prefs.h \
+	fancy_viewer.c \
+	fancy_viewer.h
+
+clean-local:
+	rm -f libclaws.a
+
 .PHONY: test
diff --git a/src/plugins/fetchinfo/Makefile.am b/src/plugins/fetchinfo/Makefile.am
index 338fe0ae9..fd39d4a52 100644
--- a/src/plugins/fetchinfo/Makefile.am
+++ b/src/plugins/fetchinfo/Makefile.am
@@ -1,47 +1,41 @@
-# Copyright 1999-2014 the Claws Mail team.
+# Copyright 1999-2021 the Claws Mail team.
 # This file is part of Claws Mail package, and distributed under the
 # terms of the General Public License version 3 (or later).
 # See COPYING file for license details.
 
-if OS_WIN32
-
-LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
-     `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
-     sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
-
-%.lo : %.rc
-	$(LTRCCOMPILE) -i $< -o $@
+EXTRA_DIST = claws.def plugin.def
 
-plugin_res = version.lo
-plugin_res_ldflag = -Wl,.libs/version.o
+IFLAGS = \
+	-I$(top_builddir)/src \
+	-I$(top_builddir)/src/common \
+	-I$(top_srcdir)/src \
+	-I$(top_srcdir)/src/common \
+	-I$(top_srcdir)/src/gtk
 
-export_symbols = -export-symbols $(srcdir)/plugin.def
+plugin_ldflags =
+plugin_extra_deps =
+plugin_libadd =
 
-plugin_deps = libclaws.a $(plugin_res) plugin.def
+if OS_WIN32
 
 libclaws.a: claws.def
 	$(DLLTOOL) --output-lib $@ --def $<
 
-plugin_ldadd = -L. -lclaws
+%.lo : %.rc
+	$(LIBTOOL) --mode=compile --tag=RC $(RC) -i $< -o $@
 
-else
-plugin_res =
-plugin_res_ldflag =
-export_symbols =
-plugin_deps =
-plugin_ldadd =
-endif
+plugin_ldflags += \
+	-Wl,.libs/version.o \
+	-no-undefined \
+	-export-symbols $(srcdir)/plugin.def
+plugin_extra_deps += libclaws.a version.lo plugin.def
+plugin_libadd += -L. -lclaws
 
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-else
-no_undefined =
 endif
 
 if CYGWIN
-cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
-else
-cygwin_export_lib = 
+plugin_ldflags += -no-undefined
+plugin_libadd += -L$(top_builddir)/src -lclaws-mail
 endif
 
 plugindir = $(pkglibdir)/plugins
@@ -50,31 +44,26 @@ if BUILD_FETCHINFO_PLUGIN
 plugin_LTLIBRARIES = fetchinfo.la
 endif
 
-fetchinfo_la_SOURCES = \
-	fetchinfo_plugin.c fetchinfo_plugin.h \
-	fetchinfo_plugin_gtk.c
-
 fetchinfo_la_LDFLAGS = \
-	$(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
-	-avoid-version -module \
-	$(GTK_LIBS)
-
-fetchinfo_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \
-	$(GTK_LIBS)
+	$(plugin_ldflags) \
+	-avoid-version -module
 
-fetchinfo_la_DEPENDENCIES = $(plugin_deps)
+EXTRA_fetchinfo_la_DEPENDENCIES = $(plugin_extra_deps)
 
-IFLAGS = \
-	-I$(top_srcdir)/src \
-	-I$(top_srcdir)/src/common \
-	-I$(top_builddir)/src/common \
-	-I$(top_srcdir)/src/gtk
+fetchinfo_la_LIBADD = $(plugin_libadd) \
+	$(GTK_LIBS)
 
 fetchinfo_la_CPPFLAGS = \
 	$(IFLAGS) \
 	$(GLIB_CFLAGS) \
 	$(GTK_CFLAGS)
 
-EXTRA_DIST = claws.def plugin.def version.rc
+fetchinfo_la_SOURCES = \
+	fetchinfo_plugin.c \
+	fetchinfo_plugin.h \
+	fetchinfo_plugin_gtk.c
+
+clean-local:
+	rm -f libclaws.a
 
 .PHONY: test
diff --git a/src/plugins/libravatar/Makefile.am b/src/plugins/libravatar/Makefile.am
index 704fc9d29..4a3011aa7 100644
--- a/src/plugins/libravatar/Makefile.am
+++ b/src/plugins/libravatar/Makefile.am
@@ -1,56 +1,41 @@
-# Copyright 1999-2014 the Claws Mail team.
+# Copyright 1999-2021 the Claws Mail team.
 # This file is part of Claws Mail package, and distributed under the
 # terms of the General Public License version 3 (or later).
 # See COPYING file for license details.
 
-EXTRA_DIST = claws.def plugin.def version.rc
+EXTRA_DIST = claws.def plugin.def
 
 IFLAGS = \
 	-I$(top_builddir)/src \
+	-I$(top_builddir)/src/common \
 	-I$(top_srcdir)/src \
 	-I$(top_srcdir)/src/common \
-	-I$(top_builddir)/src/common \
 	-I$(top_srcdir)/src/gtk
 
-if OS_WIN32
-
-LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
-     `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
-     sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
-
-%.lo : %.rc
-	$(LTRCCOMPILE) -i $< -o $@
-
-plugin_res = version.lo
-plugin_res_ldflag = -Wl,.libs/version.o
-
-export_symbols = -export-symbols $(srcdir)/plugin.def
+plugin_ldflags =
+plugin_extra_deps =
+plugin_libadd =
 
-plugin_deps = libclaws.a $(plugin_res) plugin.def
+if OS_WIN32
 
 libclaws.a: claws.def
 	$(DLLTOOL) --output-lib $@ --def $<
 
-plugin_ldadd = -L. -lclaws
+%.lo : %.rc
+	$(LIBTOOL) --mode=compile --tag=RC $(RC) -i $< -o $@
 
-else
-plugin_res =
-plugin_res_ldflag =
-export_symbols =
-plugin_deps =
-plugin_ldadd =
-endif
+plugin_ldflags += \
+	-Wl,.libs/version.o \
+	-no-undefined \
+	-export-symbols $(srcdir)/plugin.def
+plugin_extra_deps += libclaws.a version.lo plugin.def
+plugin_libadd += -L. -lclaws
 
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-else
-no_undefined =
 endif
 
 if CYGWIN
-cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
-else
-cygwin_export_lib =
+plugin_ldflags += -no-undefined
+plugin_libadd += -L$(top_builddir)/src -lclaws-mail
 endif
 
 plugindir = $(pkglibdir)/plugins
@@ -60,15 +45,14 @@ plugin_LTLIBRARIES = libravatar.la
 endif
 
 libravatar_la_LDFLAGS = \
-	$(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
-	-avoid-version -module \
-	$(GTK_LIBS) \
-	$(CURL_LIBS)
+	$(plugin_ldflags) \
+	-avoid-version -module
 
-libravatar_la_DEPENDENCIES = $(plugin_deps)
+EXTRA_libravatar_la_DEPENDENCIES = $(plugin_extra_deps)
 
-libravatar_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \
-	$(GTK_LIBS)
+libravatar_la_LIBADD = $(plugin_libadd) \
+	$(GTK_LIBS) \
+	$(CURL_LIBS)
 
 libravatar_la_CPPFLAGS = \
 	$(IFLAGS) \
@@ -78,12 +62,20 @@ libravatar_la_CPPFLAGS = \
 	$(ENCHANT_CFLAGS)
 
 libravatar_la_SOURCES = \
-	libravatar.c libravatar.h \
-	libravatar_prefs.c libravatar_prefs.h \
-	libravatar_cache.c libravatar_cache.h \
-	libravatar_image.c libravatar_image.h \
-	libravatar_missing.c libravatar_missing.h \
-	libravatar_federation.c libravatar_federation.h
-
+	libravatar.c \
+	libravatar.h \
+	libravatar_cache.c \
+	libravatar_cache.h \
+	libravatar_federation.c \
+	libravatar_federation.h \
+	libravatar_image.c \
+	libravatar_image.h \
+	libravatar_missing.c \
+	libravatar_missing.h \
+	libravatar_prefs.c \
+	libravatar_prefs.h
+
+clean-local:
+	rm -f libclaws.a
 
 .PHONY: test
diff --git a/src/plugins/litehtml_viewer/Makefile.am b/src/plugins/litehtml_viewer/Makefile.am
index 643b907ea..2f3b634eb 100644
--- a/src/plugins/litehtml_viewer/Makefile.am
+++ b/src/plugins/litehtml_viewer/Makefile.am
@@ -1,57 +1,44 @@
-# Copyright 1999-2018 the Claws Mail team.
+# Copyright 1999-2021 the Claws Mail team.
 # This file is part of Claws Mail package, and distributed under the
 # terms of the General Public License version 3 (or later).
 # See COPYING file for license details.
 
 SUBDIRS = litehtml
-EXTRA_DIST = claws.def plugin.def version.rc css.inc
+EXTRA_DIST = claws.def plugin.def css.inc
 
 IFLAGS = \
-        -I$(top_srcdir)/src \
-        -I$(top_srcdir)/src/common \
-        -I$(top_builddir)/src \
-        -I$(top_srcdir)/src/gtk \
-        -I$(top_srcdir)/src/plugins/litehtml_viewer/litehtml
+	-I$(top_builddir)/src \
+	-I$(top_srcdir)/src \
+	-I$(top_srcdir)/src/common \
+	-I$(top_srcdir)/src/gtk \
+	-I$(top_srcdir)/src/plugins/litehtml_viewer/litehtml
 
-if OS_WIN32
-
-LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
-		`echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
-		sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
-
-%.lo: %.rc
-	$(LTRCCOMPILE) -i $< -o $@
+plugin_ldflags =
+plugin_extra_deps =
+plugin_libadd =
+plugin_cppflags =
 
-plugin_res = version.lo
-plugin_res_ldflag = -Wl,.libs/version.o
-export_symbols = -export-symbols $(srcdir)/plugin.def
-plugin_deps = libclaws.a $(plugin_res) plugin.def
-plugin_ldadd = -L. -lclaws
+if OS_WIN32
 
 libclaws.a: claws.def
 	$(DLLTOOL) --output-lib $@ --def $<
-else
-plugin_res =
-plugin_res_ldflag =
-export_symbols =
-plugin_deps =
-plugin_ldadd =
-endif
 
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-def_win32 = -DWIN32
-else
-no_undefined =
-def_win32 =
-endif
+%.lo : %.rc
+	$(LIBTOOL) --mode=compile --tag=RC $(RC) -i $< -o $@
 
-export def_win32
+plugin_ldflags += \
+	-Wl,.libs/version.o \
+	-no-undefined \
+	-export-symbols $(srcdir)/plugin.def
+plugin_extra_deps += libclaws.a version.lo plugin.def
+plugin_libadd += -L. -lclaws
+plugin_cppflags += -DWIN32 -DLITEHTML_UTF8
+
+endif
 
 if CYGWIN
-cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
-else
-cygwin_export_lib =
+plugin_ldflags += -no-undefined
+plugin_libadd += -L$(top_builddir)/src -lclaws-mail
 endif
 
 plugindir = $(pkglibdir)/plugins
@@ -60,42 +47,23 @@ if BUILD_LITEHTML_VIEWER_PLUGIN
 plugin_LTLIBRARIES = litehtml_viewer.la
 endif
 
-litehtml_viewer_la_DEPENDENCIES = $(plugin_deps) litehtml/liblitehtml.la
-
-litehtml_viewer_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \
-	$(top_builddir)/src/plugins/litehtml_viewer/litehtml/liblitehtml.la \
-        $(GTK_LIBS)
-
-litehtml_viewer_la_CXXFLAGS = -std=c++11
-litehtml_viewer_la_CFLAGS = -std=c99
+litehtml_viewer_la_LDFLAGS = \
+	$(plugin_ldflags) \
+	-avoid-version -module
 
-litehtml_viewer_la_SOURCES = \
-	container_linux.cpp \
-	container_linux_images.cpp \
-	plugin.c \
-	lh_prefs.c \
-	lh_viewer.c \
-	lh_widget.cpp \
-	lh_widget_text.cpp \
-	container_linux.h \
-	lh_prefs.h \
-	lh_viewer.h \
-	lh_widget.h \
-	lh_widget_wrapped.h \
-	http.h \
-	http.cpp
+EXTRA_litehtml_viewer_la_DEPENDENCIES = $(plugin_extra_deps) \
+	litehtml/liblitehtml.la
 
-litehtml_viewer_la_LDFLAGS = \
-	$(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
-	-avoid-version -module \
+litehtml_viewer_la_LIBADD = $(plugin_libadd) \
 	$(GTK_LIBS) \
 	$(FONTCONFIG_LIBS) \
 	$(CAIRO_LIBS) \
 	$(CURL_LIBS) \
-	$(LIBGUMBO_LIBS)
+	$(LIBGUMBO_LIBS) \
+	litehtml/liblitehtml.la
 
 litehtml_viewer_la_CPPFLAGS = \
-	$(def_win32) \
+	$(plugin_cppflags) \
 	$(IFLAGS) \
 	$(GLIB_CFLAGS) \
 	$(GTK_CFLAGS) \
@@ -105,5 +73,26 @@ litehtml_viewer_la_CPPFLAGS = \
 	$(CURL_CFLAGS) \
 	$(LIBGUMBO_CFLAGS)
 
-.PHONY: test
+litehtml_viewer_la_CXXFLAGS = -std=c++11
+litehtml_viewer_la_CFLAGS = -std=c99
 
+litehtml_viewer_la_SOURCES = \
+	container_linux.cpp \
+	container_linux.h \
+	container_linux_images.cpp \
+	http.cpp \
+	http.h \
+	lh_prefs.c \
+	lh_prefs.h \
+	lh_viewer.c \
+	lh_viewer.h \
+	lh_widget.cpp \
+	lh_widget.h \
+	lh_widget_text.cpp \
+	lh_widget_wrapped.h \
+	plugin.c
+
+clean-local:
+	rm -f libclaws.a
+
+.PHONY: test
diff --git a/src/plugins/litehtml_viewer/litehtml/Makefile.am b/src/plugins/litehtml_viewer/litehtml/Makefile.am
index 1ae5c258f..e88fef5e3 100644
--- a/src/plugins/litehtml_viewer/litehtml/Makefile.am
+++ b/src/plugins/litehtml_viewer/litehtml/Makefile.am
@@ -1,8 +1,14 @@
-# Copyright 1999-2018 the Claws Mail team.
+# Copyright 1999-2021 the Claws Mail team.
 # This file is part of Claws Mail package, and distributed under the
 # terms of the General Public License version 3 (or later).
 # See COPYING file for license details.
 
+if OS_WIN32
+lh_cppflags = -DWIN32 -DLITEHTML_UTF8
+else
+lh_cppflags =
+endif
+
 if BUILD_LITEHTML_VIEWER_PLUGIN
 noinst_LTLIBRARIES = liblitehtml.la
 endif
@@ -58,7 +64,7 @@ liblitehtml_la_LDFLAGS = \
         $(LIBGUMBO_LIBS)
 
 liblitehtml_la_CPPFLAGS = \
-        $(def_win32) \
+        $(lh_cppflags) \
         $(LIBGUMBO_CFLAGS)
 
 EXTRA_DIST = \
diff --git a/src/plugins/mailmbox/Makefile.am b/src/plugins/mailmbox/Makefile.am
index dffee3aa3..345fc047d 100644
--- a/src/plugins/mailmbox/Makefile.am
+++ b/src/plugins/mailmbox/Makefile.am
@@ -1,55 +1,40 @@
-# Copyright 1999-2014 the Claws Mail team.
+# Copyright 1999-2021 the Claws Mail team.
 # This file is part of Claws Mail package, and distributed under the
 # terms of the General Public License version 3 (or later).
 # See COPYING file for license details.
 
-EXTRA_DIST = claws.def plugin.def version.rc
+EXTRA_DIST = claws.def plugin.def
 
 IFLAGS = \
+	-I$(top_builddir)/src \
 	-I$(top_srcdir)/src \
 	-I$(top_srcdir)/src/common \
-	-I$(top_builddir)/src \
 	-I$(top_srcdir)/src/gtk
 
-if OS_WIN32
-
-LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
-     `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
-     sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
-
-%.lo : %.rc
-	$(LTRCCOMPILE) -i $< -o $@
-
-plugin_res = version.lo
-plugin_res_ldflag = -Wl,.libs/version.o
-
-export_symbols = -export-symbols $(srcdir)/plugin.def
+plugin_ldflags =
+plugin_extra_deps =
+plugin_libadd =
 
-plugin_deps = libclaws.a $(plugin_res) plugin.def
+if OS_WIN32
 
 libclaws.a: claws.def
 	$(DLLTOOL) --output-lib $@ --def $<
 
-plugin_ldadd = -L. -lclaws
+%.lo : %.rc
+	$(LIBTOOL) --mode=compile --tag=RC $(RC) -i $< -o $@
 
-else
-plugin_res =
-plugin_res_ldflag =
-export_symbols =
-plugin_deps =
-plugin_ldadd =
-endif
+plugin_ldflags += \
+	-Wl,.libs/version.o \
+	-no-undefined \
+	-export-symbols $(srcdir)/plugin.def
+plugin_extra_deps += libclaws.a version.lo plugin.def
+plugin_libadd += -L. -lclaws
 
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-else
-no_undefined =
 endif
 
 if CYGWIN
-cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
-else
-cygwin_export_lib = 
+plugin_ldflags += -no-undefined
+plugin_libadd += -L$(top_builddir)/src -lclaws-mail
 endif
 
 plugindir = $(pkglibdir)/plugins
@@ -58,29 +43,13 @@ if BUILD_MAILMBOX_PLUGIN
 plugin_LTLIBRARIES = mailmbox.la
 endif
 
-## Mailmbox folder plugin
-
-mailmbox_la_SOURCES = \
-	plugin.c plugin_gtk.c \
-	carray.c carray.h \
-	chash.c chash.h \
-	clist.c clist.h \
-	mailimf.c mailimf.h \
-	mailimf_types.c mailimf_types.h \
-	mailimf_types_helper.c mailimf_types_helper.h \
-	mailimf_write.c mailimf_write.h \
-	maillock.c maillock.h \
-	mailmbox.c mailmbox.h \
-	mailmbox_folder.c mailmbox_folder.h \
-	mailmbox_parse.c mailmbox_parse.h \
-	mailmbox_types.c mailmbox_types.h \
-	mmapstring.c mmapstring.h \
-	plugin_gtk.h
-
 mailmbox_la_LDFLAGS = \
+	$(plugin_ldflags) \
 	-avoid-version -module
 
-mailmbox_la_LIBADD = \
+EXTRA_mailmbox_la_DEPENDENCIES = $(plugin_extra_deps)
+
+mailmbox_la_LIBADD = $(plugin_libadd) \
 	$(GTK_LIBS)
 
 mailmbox_la_CPPFLAGS = \
@@ -89,4 +58,38 @@ mailmbox_la_CPPFLAGS = \
 	$(GTK_CFLAGS) \
 	$(ENCHANT_CFLAGS)
 
+mailmbox_la_SOURCES = \
+	carray.c \
+	carray.h \
+	chash.c \
+	chash.h \
+	clist.c \
+	clist.h \
+	mailimf.c \
+	mailimf.h \
+	mailimf_types.c \
+	mailimf_types.h \
+	mailimf_types_helper.c \
+	mailimf_types_helper.h \
+	mailimf_write.c \
+	mailimf_write.h \
+	maillock.c \
+	maillock.h \
+	mailmbox.c \
+	mailmbox.h \
+	mailmbox_folder.c \
+	mailmbox_folder.h \
+	mailmbox_parse.c \
+	mailmbox_parse.h \
+	mailmbox_types.c \
+	mailmbox_types.h \
+	mmapstring.c \
+	mmapstring.h \
+	plugin.c \
+	plugin_gtk.c \
+	plugin_gtk.h
+
+clean-local:
+	rm -f libclaws.a
+
 .PHONY: test
diff --git a/src/plugins/managesieve/Makefile.am b/src/plugins/managesieve/Makefile.am
index ad3f97626..6ebea879a 100644
--- a/src/plugins/managesieve/Makefile.am
+++ b/src/plugins/managesieve/Makefile.am
@@ -1,56 +1,41 @@
-# Copyright 1999-2014 the Claws Mail team.
+# Copyright 1999-2021 the Claws Mail team.
 # This file is part of Claws Mail package, and distributed under the
 # terms of the General Public License version 3 (or later).
 # See COPYING file for license details.
 
-EXTRA_DIST = claws.def plugin.def version.rc
+EXTRA_DIST = claws.def plugin.def
 
 IFLAGS = \
 	-I$(top_builddir)/src \
+	-I$(top_builddir)/src/common \
 	-I$(top_srcdir)/src \
 	-I$(top_srcdir)/src/common \
-	-I$(top_builddir)/src/common \
 	-I$(top_srcdir)/src/gtk
 
-if OS_WIN32
-
-LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
-     `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
-     sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
-
-%.lo : %.rc
-	$(LTRCCOMPILE) -i $< -o $@
-
-plugin_res = version.lo
-plugin_res_ldflag = -Wl,.libs/version.o
-
-export_symbols = -export-symbols $(srcdir)/plugin.def
+plugin_ldflags =
+plugin_extra_deps =
+plugin_libadd =
 
-plugin_deps = libclaws.a $(plugin_res) plugin.def
+if OS_WIN32
 
 libclaws.a: claws.def
 	$(DLLTOOL) --output-lib $@ --def $<
 
-plugin_ldadd = -L. -lclaws
+%.lo : %.rc
+	$(LIBTOOL) --mode=compile --tag=RC $(RC) -i $< -o $@
 
-else
-plugin_res =
-plugin_res_ldflag =
-export_symbols =
-plugin_deps =
-plugin_ldadd =
-endif
+plugin_ldflags += \
+	-Wl,.libs/version.o \
+	-no-undefined \
+	-export-symbols $(srcdir)/plugin.def
+plugin_extra_deps += libclaws.a version.lo plugin.def
+plugin_libadd += -L. -lclaws
 
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-else
-no_undefined =
 endif
 
 if CYGWIN
-cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
-else
-cygwin_export_lib =
+plugin_ldflags += -no-undefined
+plugin_libadd += -L$(top_builddir)/src -lclaws-mail
 endif
 
 plugindir = $(pkglibdir)/plugins
@@ -60,15 +45,14 @@ plugin_LTLIBRARIES = managesieve.la
 endif
 
 managesieve_la_LDFLAGS = \
-	$(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
-	-avoid-version -module \
-	$(GTK_LIBS) \
-	$(CURL_LIBS)
+	$(plugin_ldflags) \
+	-avoid-version -module
 
-managesieve_la_DEPENDENCIES = $(plugin_deps)
+EXTRA_managesieve_la_DEPENDENCIES = $(plugin_extra_deps)
 
-managesieve_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \
-	$(GTK_LIBS)
+managesieve_la_LIBADD = $(plugin_libadd) \
+	$(GTK_LIBS) \
+	$(CURL_LIBS)
 
 managesieve_la_CPPFLAGS = \
 	$(IFLAGS) \
@@ -78,11 +62,17 @@ managesieve_la_CPPFLAGS = \
 	$(CURL_CFLAGS)
 
 managesieve_la_SOURCES = \
-	managesieve.c managesieve.h \
+	managesieve.c \
+	managesieve.h \
+	sieve_editor.c \
+	sieve_editor.h \
+	sieve_manager.c \
+	sieve_manager.h \
 	sieve_plugin.c \
-	sieve_prefs.c sieve_prefs.h \
-	sieve_manager.c sieve_manager.h \
-	sieve_editor.c sieve_editor.h
+	sieve_prefs.c \
+	sieve_prefs.h
 
+clean-local:
+	rm -f libclaws.a
 
 .PHONY: test
diff --git a/src/plugins/notification/Makefile.am b/src/plugins/notification/Makefile.am
index e51e96125..0cf6573a9 100644
--- a/src/plugins/notification/Makefile.am
+++ b/src/plugins/notification/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 the Claws Mail team.
+# Copyright 1999-2021 the Claws Mail team.
 # This file is part of Claws Mail package, and distributed under the
 # terms of the General Public License version 3 (or later).
 # See COPYING file for license details.
@@ -12,55 +12,39 @@ hotkey_lib_path =
 endif
 
 SUBDIRS=gtkhotkey
-EXTRA_DIST = claws.def plugin.def version.rc
-CFLAGS += "-Wall"
+EXTRA_DIST = claws.def plugin.def
 
 IFLAGS = \
 	-I$(top_srcdir)/src/plugins/notification/gtkhotkey \
+	-I$(top_builddir)/src \
 	-I$(top_srcdir)/src \
 	-I$(top_srcdir)/src/common \
-	-I$(top_builddir)/src \
 	-I$(top_srcdir)/src/gtk
 
-if OS_WIN32
+plugin_ldflags =
+plugin_extra_deps =
+plugin_libadd =
 
-LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
-     `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
-     sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
-
-%.lo : %.rc
-	$(LTRCCOMPILE) -i $< -o $@
-
-plugin_res = version.lo
-plugin_res_ldflag = -Wl,.libs/version.o
-
-export_symbols = -export-symbols $(srcdir)/plugin.def
-
-plugin_deps = libclaws.a $(plugin_res) plugin.def $(hotkey_lib) 
+if OS_WIN32
 
 libclaws.a: claws.def
 	$(DLLTOOL) --output-lib $@ --def $<
 
-plugin_ldadd = -L. -lclaws
+%.lo : %.rc
+	$(LIBTOOL) --mode=compile --tag=RC $(RC) -i $< -o $@
 
-else
-plugin_res =
-plugin_res_ldflag =
-export_symbols =
-plugin_deps =
-plugin_ldadd =
-endif
+plugin_ldflags += \
+	-Wl,.libs/version.o \
+	-no-undefined \
+	-export-symbols $(srcdir)/plugin.def
+plugin_extra_deps += libclaws.a version.lo plugin.def $(hotkey_lib)
+plugin_libadd += -L. -lclaws
 
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-else
-no_undefined =
 endif
 
 if CYGWIN
-cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
-else
-cygwin_export_lib = 
+plugin_ldflags += -no-undefined
+plugin_libadd += -L$(top_builddir)/src -lclaws-mail
 endif
 
 plugindir = $(pkglibdir)/plugins
@@ -69,29 +53,15 @@ if BUILD_NOTIFICATION_PLUGIN
 plugin_LTLIBRARIES = notification.la
 endif
 
-notification_la_SOURCES = \
-	notification_plugin.c notification_plugin.h \
-	notification_core.c notification_core.h \
-	notification_popup.c notification_popup.h \
-	notification_banner.c notification_banner.h \
-	notification_command.c notification_command.h \
-	notification_lcdproc.c notification_lcdproc.h \
-	notification_trayicon.c notification_trayicon.h \
-	notification_indicator.c notification_indicator.h \
-	notification_hotkeys.c notification_hotkeys.h \
-	notification_prefs.c notification_prefs.h \
-	notification_foldercheck.c notification_foldercheck.h \
-	notification_pixbuf.c notification_pixbuf.h
-
 notification_la_LDFLAGS = \
-	$(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
+	$(plugin_ldflags) \
 	-avoid-version -module
 
-notification_la_DEPENDENCIES = $(plugin_deps) \
+EXTRA_notification_la_DEPENDENCIES = $(plugin_extra_deps) \
 	$(hotkey_lib_path)
 
-notification_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \
-        $(GTK_LIBS)  \
+notification_la_LIBADD = $(plugin_libadd) \
+	$(GTK_LIBS)  \
 	$(libnotify_LIBS) \
 	$(unity_LIBS) \
 	$(libcanberra_gtk3_LIBS) \
@@ -105,7 +75,34 @@ notification_la_CPPFLAGS = \
 	$(ENCHANT_CFLAGS) \
 	$(libnotify_CFLAGS) \
 	$(unity_CFLAGS) \
-	$(libcanberra_gtk3_CFLAGS)
+	$(libcanberra_gtk3_CFLAGS) \
+	-Wall
+
+notification_la_SOURCES = \
+	notification_banner.c \
+	notification_banner.h \
+	notification_command.c \
+	notification_command.h \
+	notification_core.c \
+	notification_core.h \
+	notification_foldercheck.c \
+	notification_foldercheck.h \
+	notification_hotkeys.c \
+	notification_hotkeys.h \
+	notification_indicator.c \
+	notification_indicator.h \
+	notification_lcdproc.c \
+	notification_lcdproc.h \
+	notification_pixbuf.c \
+	notification_pixbuf.h \
+	notification_plugin.c \
+	notification_plugin.h \
+	notification_popup.c \
+	notification_popup.h \
+	notification_prefs.c \
+	notification_prefs.h \
+	notification_trayicon.c \
+	notification_trayicon.h
 
 clean-local:
 	rm -f libclaws.a
diff --git a/src/plugins/pdf_viewer/Makefile.am b/src/plugins/pdf_viewer/Makefile.am
index 54688d849..a20918f28 100644
--- a/src/plugins/pdf_viewer/Makefile.am
+++ b/src/plugins/pdf_viewer/Makefile.am
@@ -3,51 +3,39 @@
 # terms of the General Public License version 3 (or later).
 # See COPYING file for license details.
 
-EXTRA_DIST = claws.def plugin.def version.rc
+EXTRA_DIST = claws.def plugin.def
 
 IFLAGS = \
 	-I$(top_builddir)/src \
+	-I$(top_builddir)/src/common \
 	-I$(top_srcdir)/src \
 	-I$(top_srcdir)/src/common \
-	-I$(top_builddir)/src/common \
 	-I$(top_srcdir)/src/gtk
 
-if OS_WIN32
-
-LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
-	`echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
-	sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
-
-%.lo: %.rc
-	$(LTRCCOMPILE) -i $< -o $@
+plugin_ldflags =
+plugin_extra_deps =
+plugin_libadd =
 
-plugin_res = version.lo
-plugin_res_ldflag = -Wl,.libs/version.o
-export_symbols = -export-symbols $(srcdir)/plugin.def
-plugin_deps = libclaws.a $(plugin_res) plugin.def
-plugin_ldadd = -L. -lclaws
+if OS_WIN32
 
 libclaws.a: claws.def
 	$(DLLTOOL) --output-lib $@ --def $<
 
-else
-plugin_res =
-plugin_res_ldflag =
-export_symbols =
-plugin_deps =
-plugin_ldadd =
-endif
+%.lo : %.rc
+	$(LIBTOOL) --mode=compile --tag=RC $(RC) -i $< -o $@
+
+plugin_ldflags += \
+	-Wl,.libs/version.o \
+	-no-undefined \
+	-export-symbols $(srcdir)/plugin.def
+plugin_extra_deps += libclaws.a version.lo plugin.def
+plugin_libadd += -L. -lclaws
 
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-else
-no_undefined =
 endif
 
 if CYGWIN
-cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
-else
-cygwin_export_lib =
+plugin_ldflags += -no-undefined
+plugin_libadd += -L$(top_builddir)/src -lclaws-mail
 endif
 
 plugindir = $(pkglibdir)/plugins
@@ -56,17 +44,13 @@ if BUILD_PDF_VIEWER_PLUGIN
 plugin_LTLIBRARIES = pdf_viewer.la
 endif
 
-pdf_viewer_la_SOURCES = \
-	poppler_viewer.c \
-	poppler_viewer.h
-
 pdf_viewer_la_LDFLAGS = \
-	$(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
+	$(plugin_ldflags) \
 	-avoid-version -module
 
-pdf_viewer_la_DEPENDENCIES = $(plugin_deps)
+EXTRA_pdf_viewer_la_DEPENDENCIES = $(plugin_extra_deps)
 
-pdf_viewer_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \
+pdf_viewer_la_LIBADD = $(plugin_libadd) \
 	$(GTK_LIBS) \
 	$(POPPLER_LIBS)
 
@@ -77,4 +61,11 @@ pdf_viewer_la_CPPFLAGS = \
 	$(ENCHANT_CFLAGS) \
 	$(POPPLER_CFLAGS)
 
+pdf_viewer_la_SOURCES = \
+	poppler_viewer.c \
+	poppler_viewer.h
+
+clean-local:
+	rm -f libclaws.a
+
 .PHONY: test
diff --git a/src/plugins/pgpcore/Makefile.am b/src/plugins/pgpcore/Makefile.am
index e1275023e..3a2524aa1 100644
--- a/src/plugins/pgpcore/Makefile.am
+++ b/src/plugins/pgpcore/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 the Claws Mail team.
+# Copyright 1999-2021 the Claws Mail team.
 # This file is part of Claws Mail package, and distributed under the
 # terms of the General Public License version 3 (or later).
 # See COPYING file for license details.
@@ -8,54 +8,39 @@ include $(top_srcdir)/tests.mk
 SUBDIRS = . tests
 endif
 
-EXTRA_DIST = version.rc plugin.def claws.def
+EXTRA_DIST = claws.def plugin.def
 
 IFLAGS = \
 	-I$(top_builddir)/src \
+	-I$(top_builddir)/src/common \
 	-I$(top_srcdir)/src \
 	-I$(top_srcdir)/src/common \
-	-I$(top_builddir)/src/common \
 	-I$(top_srcdir)/src/gtk
 
-if OS_WIN32
-
-LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
-     `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
-     sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
-
-%.lo : %.rc
-	$(LTRCCOMPILE) -i $< -o $@
-
-plugin_res = version.lo
-plugin_res_ldflag = -Wl,.libs/version.o
-
-export_symbols = -export-symbols $(srcdir)/plugin.def
+plugin_ldflags =
+plugin_extra_deps =
+plugin_libadd =
 
-plugin_deps = libclaws.a $(plugin_res) plugin.def
+if OS_WIN32
 
 libclaws.a: claws.def
 	$(DLLTOOL) --output-lib $@ --def $<
 
-plugin_ldadd = -L. -lclaws
+%.lo : %.rc
+	$(LIBTOOL) --mode=compile --tag=RC $(RC) -i $< -o $@
 
-else
-plugin_res =
-plugin_res_ldflag =
-export_symbols =
-plugin_deps =
-plugin_ldadd =
-endif
+plugin_ldflags += \
+	-Wl,.libs/version.o \
+	-no-undefined \
+	-export-symbols $(srcdir)/plugin.def
+plugin_extra_deps += libclaws.a version.lo plugin.def
+plugin_libadd += -L. -lclaws
 
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-else
-no_undefined =
 endif
 
 if CYGWIN
-cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
-else
-cygwin_export_lib =
+plugin_ldflags += -no-undefined
+plugin_libadd += -L$(top_builddir)/src -lclaws-mail
 endif
 
 plugindir = $(pkglibdir)/plugins
@@ -64,29 +49,14 @@ if BUILD_PGPCORE_PLUGIN
 plugin_LTLIBRARIES = pgpcore.la
 endif
 
-pgpcore_la_SOURCES = \
-	autocompletion.c autocompletion.h \
-	passphrase.c passphrase.h \
-	plugin.c \
-	prefs_gpg.c prefs_gpg.h \
-	select-keys.c select-keys.h \
-	sgpgme.c sgpgme.h \
-	pgp_utils.c pgp_utils.h \
-	pgp_viewer.c pgp_viewer.h
-
-pluginincludedir = $(pkgincludedir)/plugins/pgpcore
-plugininclude_HEADERS = \
-	passphrase.h \
-	prefs_gpg.h \
-	sgpgme.h \
-	pgp_utils.h
-
 pgpcore_la_LDFLAGS = \
-	$(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
+	$(plugin_ldflags) \
 	-avoid-version -module 
-pgpcore_la_DEPENDENCIES = $(plugin_deps)
-pgpcore_la_LIBADD = $(cygwin_export_lib) $(plugin_ldadd) \
-        $(GTK_LIBS) \
+
+EXTRA_pgpcore_la_DEPENDENCIES = $(plugin_extra_deps)
+
+pgpcore_la_LIBADD = $(plugin_libadd) \
+	$(GTK_LIBS) \
 	$(GPGME_LIBS) \
 	$(ENCHANT_LIBS)
 
@@ -98,5 +68,29 @@ pgpcore_la_CPPFLAGS = \
 	$(ENCHANT_CFLAGS) \
 	-Wno-deprecated-declarations
 
+pgpcore_la_SOURCES = \
+	autocompletion.c \
+	autocompletion.h \
+	passphrase.c \
+	passphrase.h \
+	pgp_utils.c \
+	pgp_utils.h \
+	pgp_viewer.c \
+	pgp_viewer.h \
+	plugin.c \
+	prefs_gpg.c \
+	prefs_gpg.h \
+	select-keys.c \
+	select-keys.h \
+	sgpgme.c \
+	sgpgme.h
+
+pluginincludedir = $(pkgincludedir)/plugins/pgpcore
+plugininclude_HEADERS = \
+	passphrase.h \
+	pgp_utils.h \
+	prefs_gpg.h \
+	sgpgme.h
+
 clean-local:
 	rm -f libclaws.a
diff --git a/src/plugins/pgpinline/Makefile.am b/src/plugins/pgpinline/Makefile.am
index 01931ea2e..ad4c67555 100644
--- a/src/plugins/pgpinline/Makefile.am
+++ b/src/plugins/pgpinline/Makefile.am
@@ -1,31 +1,21 @@
-# Copyright 1999-2014 the Claws Mail team.
+# Copyright 1999-2021 the Claws Mail team.
 # This file is part of Claws Mail package, and distributed under the
 # terms of the General Public License version 3 (or later).
 # See COPYING file for license details.
 
-EXTRA_DIST = version.rc plugin.def claws.def mypgpcore.def pgpinline.deps
+EXTRA_DIST = claws.def plugin.def mypgpcore.def pgpinline.deps
 
 IFLAGS = \
+	-I$(top_builddir)/src/common \
 	-I$(top_srcdir)/src \
 	-I$(top_srcdir)/src/common \
-	-I$(top_builddir)/src/common \
 	-I$(top_srcdir)/src/gtk
 
-if OS_WIN32
+plugin_ldflags =
+plugin_extra_deps =
+plugin_libadd =
 
-LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
-     `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
-     sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
-
-%.lo : %.rc
-	$(LTRCCOMPILE) -i $< -o $@
-
-plugin_res = version.lo
-plugin_res_ldflag = -Wl,.libs/version.o
-
-export_symbols = -export-symbols $(srcdir)/plugin.def
-
-plugin_deps = libclaws.a libmypgpcore.a $(plugin_res) plugin.def
+if OS_WIN32
 
 libclaws.a: claws.def
 	$(DLLTOOL) --output-lib $@ --def $<
@@ -33,28 +23,21 @@ libclaws.a: claws.def
 libmypgpcore.a: mypgpcore.def
 	$(DLLTOOL) --output-lib $@ --def $<
 
-plugin_ldadd = -L. -lclaws  -lmypgpcore
+%.lo : %.rc
+	$(LIBTOOL) --mode=compile --tag=RC $(RC) -i $< -o $@
 
-else
-plugin_res =
-plugin_res_ldflag =
-export_symbols =
-plugin_deps =
-plugin_ldadd =
-endif
+plugin_ldflags += \
+	-Wl,.libs/version.o \
+	-no-undefined \
+	-export-symbols $(srcdir)/plugin.def
+plugin_extra_deps += libclaws.a version.lo plugin.def libmypgpcore.a
+plugin_libadd += -L. -lclaws -lmypgpcore
 
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-else
-no_undefined =
 endif
 
 if CYGWIN
-cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
-pgpcore_lib = ../pgpcore/pgpcore.la
-else
-cygwin_export_lib = 
-pgpcore_lib = 
+plugin_ldflags += -no-undefined
+plugin_libadd += -L$(top_builddir)/src -lclaws-mail ../pgpcore/pgpcore.la
 endif
 
 plugindir = $(pkglibdir)/plugins
@@ -64,16 +47,14 @@ if BUILD_PGPINLINE_PLUGIN
 plugin_LTLIBRARIES = pgpinline.la
 endif
 
-pgpinline_la_SOURCES = \
-	plugin.c \
-	pgpinline.c pgpinline.h
-
 pgpinline_la_LDFLAGS = \
-	$(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
+	$(plugin_ldflags) \
 	-avoid-version -module 
-pgpinline_la_DEPENDENCIES = $(plugin_deps)
-pgpinline_la_LIBADD = $(plugin_ldadd) $(pgpcore_lib) $(cygwin_export_lib) \
-        $(GTK_LIBS)  \
+
+EXTRA_pgpinline_la_DEPENDENCIES = $(plugin_extra_deps)
+
+pgpinline_la_LIBADD = $(plugin_libadd) \
+	$(GTK_LIBS)  \
 	$(GPGME_LIBS)
 
 pgpinline_la_CPPFLAGS = \
@@ -83,7 +64,12 @@ pgpinline_la_CPPFLAGS = \
 	$(GPGME_CFLAGS) \
 	-Wno-deprecated-declarations
 
+pgpinline_la_SOURCES = \
+	pgpinline.c \
+	pgpinline.h \
+	plugin.c
+
 clean-local:
-	rm -f libclaws.a
+	rm -f libclaws.a libmypgpcore.a
 
 .PHONY: test
diff --git a/src/plugins/pgpmime/Makefile.am b/src/plugins/pgpmime/Makefile.am
index 67a87a9a1..01c07bcc2 100644
--- a/src/plugins/pgpmime/Makefile.am
+++ b/src/plugins/pgpmime/Makefile.am
@@ -1,32 +1,22 @@
-# Copyright 1999-2014 the Claws Mail team.
+# Copyright 1999-2021 the Claws Mail team.
 # This file is part of Claws Mail package, and distributed under the
 # terms of the General Public License version 3 (or later).
 # See COPYING file for license details.
 
-EXTRA_DIST = version.rc plugin.def claws.def mypgpcore.def pgpmime.deps
+EXTRA_DIST = claws.def plugin.def mypgpcore.def pgpmime.deps
 
 IFLAGS = \
 	-I$(top_builddir)/src \
+	-I$(top_builddir)/src/common \
 	-I$(top_srcdir)/src \
 	-I$(top_srcdir)/src/common \
-	-I$(top_builddir)/src/common \
 	-I$(top_srcdir)/src/gtk
 
-if OS_WIN32
+plugin_ldflags =
+plugin_extra_deps =
+plugin_libadd =
 
-LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
-     `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
-     sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
-
-%.lo : %.rc
-	$(LTRCCOMPILE) -i $< -o $@
-
-plugin_res = version.lo
-plugin_res_ldflag = -Wl,.libs/version.o
-
-export_symbols = -export-symbols $(srcdir)/plugin.def
-
-plugin_deps = libclaws.a libmypgpcore.a $(plugin_res) plugin.def
+if OS_WIN32
 
 libclaws.a: claws.def
 	$(DLLTOOL) --output-lib $@ --def $<
@@ -34,46 +24,39 @@ libclaws.a: claws.def
 libmypgpcore.a: mypgpcore.def
 	$(DLLTOOL) --output-lib $@ --def $<
 
-plugin_ldadd = -L. -lclaws -lmypgpcore
+%.lo : %.rc
+	$(LIBTOOL) --mode=compile --tag=RC $(RC) -i $< -o $@
 
-else
-plugin_res =
-plugin_res_ldflag =
-export_symbols =
-plugin_deps =
-plugin_ldadd =
-endif
+plugin_ldflags += \
+	-Wl,.libs/version.o \
+	-no-undefined \
+	-export-symbols $(srcdir)/plugin.def
+plugin_extra_deps += libclaws.a version.lo plugin.def libmypgpcore.a
+plugin_libadd += -L. -lclaws -lmypgpcore
 
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-else
-no_undefined =
 endif
 
 if CYGWIN
-cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
-pgpcore_lib = ../pgpcore/pgpcore.la
-else
-pgpcore_lib = 
+plugin_ldflags += -no-undefined
+plugin_libadd += -L$(top_builddir)/src -lclaws-mail ../pgpcore/pgpcore.la
 endif
 
 plugindir = $(pkglibdir)/plugins
+
 plugin_DATA=pgpmime.deps
 
 if BUILD_PGPMIME_PLUGIN
 plugin_LTLIBRARIES = pgpmime.la
 endif
 
-pgpmime_la_SOURCES = \
-	plugin.c \
-	pgpmime.c pgpmime.h
-
 pgpmime_la_LDFLAGS = \
-	$(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
+	$(plugin_ldflags) \
 	-avoid-version -module 
-pgpmime_la_DEPENDENCIES = $(plugin_deps)
-pgpmime_la_LIBADD = $(plugin_ldadd) $(pgpcore_lib) $(cygwin_export_lib) \
-        $(GTK_LIBS) \
+
+EXTRA_pgpmime_la_DEPENDENCIES = $(plugin_extra_deps)
+
+pgpmime_la_LIBADD = $(plugin_libadd) \
+	$(GTK_LIBS) \
 	$(GPGME_LIBS) \
 	$(ENCHANT_LIBS)
 
@@ -85,7 +68,12 @@ pgpmime_la_CPPFLAGS = \
 	$(ENCHANT_CFLAGS) \
 	-Wno-deprecated-declarations
 
+pgpmime_la_SOURCES = \
+	pgpmime.c \
+	pgpmime.h \
+	plugin.c
+
 clean-local:
-	rm -f libclaws.a
+	rm -f libclaws.a libmypgpcore.a
 
 .PHONY: test
diff --git a/src/plugins/rssyl/Makefile.am b/src/plugins/rssyl/Makefile.am
index 995624c09..17cd05e8f 100644
--- a/src/plugins/rssyl/Makefile.am
+++ b/src/plugins/rssyl/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 the Claws Mail team.
+# Copyright 1999-2021 the Claws Mail team.
 # This file is part of Claws Mail package, and distributed under the
 # terms of the General Public License version 3 (or later).
 # See COPYING file for license details.
@@ -9,53 +9,38 @@ include $(top_srcdir)/tests.mk
 SUBDIRS += . tests
 endif
 
-EXTRA_DIST = claws.def plugin.def version.rc
+EXTRA_DIST = claws.def plugin.def
 
 IFLAGS = \
+	-I$(top_builddir)/src \
 	-I$(top_srcdir)/src \
 	-I$(top_srcdir)/src/common \
-	-I$(top_builddir)/src \
 	-I$(top_srcdir)/src/gtk
 
-if OS_WIN32
-
-LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
-     `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
-     sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
-
-%.lo : %.rc
-	$(LTRCCOMPILE) -i $< -o $@
-
-plugin_res = version.lo
-plugin_res_ldflag = -Wl,.libs/version.o
-
-export_symbols = -export-symbols $(srcdir)/plugin.def
+plugin_ldflags =
+plugin_extra_deps =
+plugin_libadd =
 
-plugin_deps = libclaws.a $(plugin_res) plugin.def
+if OS_WIN32
 
 libclaws.a: claws.def
 	$(DLLTOOL) --output-lib $@ --def $<
 
-plugin_ldadd = -L. -lclaws
+%.lo : %.rc
+	$(LIBTOOL) --mode=compile --tag=RC $(RC) -i $< -o $@
 
-else
-plugin_res =
-plugin_res_ldflag =
-export_symbols =
-plugin_deps =
-plugin_ldadd =
-endif
+plugin_ldflags += \
+	-Wl,.libs/version.o \
+	-no-undefined \
+	-export-symbols $(srcdir)/plugin.def
+plugin_extra_deps += libclaws.a version.lo plugin.def
+plugin_libadd += -L. -lclaws
 
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-else
-no_undefined =
 endif
 
 if CYGWIN
-cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
-else
-cygwin_export_lib = 
+plugin_ldflags += -no-undefined
+plugin_libadd += -L$(top_builddir)/src -lclaws-mail
 endif
 
 plugindir = $(pkglibdir)/plugins
@@ -65,16 +50,17 @@ plugin_LTLIBRARIES = rssyl.la
 endif
 
 rssyl_la_LDFLAGS = \
-	$(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
-	-avoid-version -module \
-	$(EXPAT_LIBS) \
-	$(CURL_LIBS) \
-	$(GTK_LIBS)
+	$(plugin_ldflags) \
+	-avoid-version -module
 
-rssyl_la_DEPENDENCIES = $(plugin_deps) libfeed/libfeed.la
+EXTRA_rssyl_la_DEPENDENCIES = $(plugin_extra_deps) \
+	libfeed/libfeed.la
 
-rssyl_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \
-	$(GTK_LIBS) $(CURL_LIBS) libfeed/libfeed.la
+rssyl_la_LIBADD = $(plugin_libadd) \
+	$(GTK_LIBS) \
+	$(CURL_LIBS) \
+	$(EXPAT_LIBS) \
+	libfeed/libfeed.la
 
 rssyl_la_CPPFLAGS = \
 	$(IFLAGS) \
@@ -85,23 +71,45 @@ rssyl_la_CPPFLAGS = \
 	$(EXPAT_CFLAGS)
 
 rssyl_la_SOURCES = \
-	old_feeds.c old_feeds.h \
-	opml_export.c opml_export.h \
-	opml_import.c opml_import.h \
-	parse822.c parse822.h \
+	old_feeds.c \
+	old_feeds.h \
+	opml_export.c \
+	opml_export.h \
+	opml_import.c \
+	opml_import.h \
+	parse822.c \
+	parse822.h \
 	plugin.c \
-	rssyl.c rssyl.h \
-	rssyl_add_item.c rssyl_add_item.h \
-	rssyl_cb_menu.c rssyl_cb_menu.h \
-	rssyl_deleted.c rssyl_deleted.h \
-	rssyl_feed.c rssyl_feed.h \
-	rssyl_feed_props.c rssyl_feed_props.h \
-	rssyl_gtk.c rssyl_gtk.h \
-	rssyl_parse_feed.c rssyl_parse_feed.h \
-	rssyl_prefs.c rssyl_prefs.h \
-	rssyl_update_comments.c rssyl_update_comments.h \
-	rssyl_update_feed.c rssyl_update_feed.h \
-	rssyl_update_format.c rssyl_update_format.h \
-	rssyl_subscribe.c rssyl_subscribe.h \
-	rssyl_subscribe_gtk.c rssyl_subscribe_gtk.h \
-	strutils.c strutils.h
+	rssyl.c \
+	rssyl.h \
+	rssyl_add_item.c \
+	rssyl_add_item.h \
+	rssyl_cb_menu.c \
+	rssyl_cb_menu.h \
+	rssyl_deleted.c \
+	rssyl_deleted.h \
+	rssyl_feed.c \
+	rssyl_feed.h \
+	rssyl_feed_props.c \
+	rssyl_feed_props.h \
+	rssyl_gtk.c \
+	rssyl_gtk.h \
+	rssyl_parse_feed.c \
+	rssyl_parse_feed.h \
+	rssyl_prefs.c \
+	rssyl_prefs.h \
+	rssyl_subscribe.c \
+	rssyl_subscribe.h \
+	rssyl_subscribe_gtk.c \
+	rssyl_subscribe_gtk.h \
+	rssyl_update_comments.c \
+	rssyl_update_comments.h \
+	rssyl_update_feed.c \
+	rssyl_update_feed.h \
+	rssyl_update_format.c \
+	rssyl_update_format.h \
+	strutils.c \
+	strutils.h
+
+clean-local:
+	rm -f libclaws.a
diff --git a/src/plugins/smime/Makefile.am b/src/plugins/smime/Makefile.am
index 2d25f6e65..edb5ec166 100644
--- a/src/plugins/smime/Makefile.am
+++ b/src/plugins/smime/Makefile.am
@@ -1,32 +1,22 @@
-# Copyright 1999-2014 the Claws Mail team.
+# Copyright 1999-2021 the Claws Mail team.
 # This file is part of Claws Mail package, and distributed under the
 # terms of the General Public License version 3 (or later).
 # See COPYING file for license details.
 
-EXTRA_DIST = version.rc plugin.def claws.def mypgpcore.def smime.deps
+EXTRA_DIST = claws.def plugin.def mypgpcore.def smime.deps
 
 IFLAGS = \
 	-I$(top_builddir)/src \
+	-I$(top_builddir)/src/common \
 	-I$(top_srcdir)/src \
 	-I$(top_srcdir)/src/common \
-	-I$(top_builddir)/src/common \
 	-I$(top_srcdir)/src/gtk
 
-if OS_WIN32
-
-LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
-     `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
-     sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
-
-%.lo : %.rc
-	$(LTRCCOMPILE) -i $< -o $@
-
-plugin_res = version.lo
-plugin_res_ldflag = -Wl,.libs/version.o
-
-export_symbols = -export-symbols $(srcdir)/plugin.def
+plugin_ldflags =
+plugin_extra_deps =
+plugin_libadd =
 
-plugin_deps = libclaws.a libmypgpcore.a $(plugin_res) plugin.def
+if OS_WIN32
 
 libclaws.a: claws.def
 	$(DLLTOOL) --output-lib $@ --def $<
@@ -34,28 +24,21 @@ libclaws.a: claws.def
 libmypgpcore.a: mypgpcore.def
 	$(DLLTOOL) --output-lib $@ --def $<
 
-plugin_ldadd = -L. -lclaws  -lmypgpcore
+%.lo : %.rc
+	$(LIBTOOL) --mode=compile --tag=RC $(RC) -i $< -o $@
 
-else
-plugin_res =
-plugin_res_ldflag =
-export_symbols =
-plugin_deps =
-plugin_ldadd =
-endif
+plugin_ldflags += \
+	-Wl,.libs/version.o \
+	-no-undefined \
+	-export-symbols $(srcdir)/plugin.def
+plugin_extra_deps += libclaws.a version.lo plugin.def libmypgpcore.a
+plugin_libadd += -L. -lclaws -lmypgpcore
 
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-else
-no_undefined =
 endif
 
 if CYGWIN
-cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
-pgpcore_lib = ../pgpcore/pgpcore.la
-else
-cygwin_export_lib = 
-pgpcore_lib = 
+plugin_ldflags += -no-undefined
+plugin_libadd += -L$(top_builddir)/src -lclaws-mail ../pgpcore/pgpcore.la
 endif
 
 plugindir = $(pkglibdir)/plugins
@@ -65,16 +48,14 @@ if BUILD_SMIME_PLUGIN
 plugin_LTLIBRARIES = smime.la
 endif
 
-smime_la_SOURCES = \
-	plugin.c \
-	smime.c smime.h
-
 smime_la_LDFLAGS = \
-	$(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
+	$(plugin_ldflags) \
 	-avoid-version -module 
-smime_la_DEPENDENCIES = $(plugin_deps)
-smime_la_LIBADD = $(plugin_ldadd) $(pgpcore_lib) $(cygwin_export_lib) \
-        $(GTK_LIBS)  \
+
+EXTRA_smime_la_DEPENDENCIES = $(plugin_extra_deps)
+
+smime_la_LIBADD = $(plugin_libadd) \
+	$(GTK_LIBS)  \
 	$(GPGME_LIBS) \
 	$(ENCHANT_LIBS)
 
@@ -86,7 +67,12 @@ smime_la_CPPFLAGS = \
 	$(ENCHANT_CFLAGS) \
 	-Wno-deprecated-declarations
 
+smime_la_SOURCES = \
+	plugin.c \
+	smime.c \
+	smime.h
+
 clean-local:
-	rm -f libclaws.a
+	rm -f libclaws.a libmypgpcore.a
 
 .PHONY: test
diff --git a/src/plugins/spam_report/Makefile.am b/src/plugins/spam_report/Makefile.am
index e382b1f3d..8cdc58658 100644
--- a/src/plugins/spam_report/Makefile.am
+++ b/src/plugins/spam_report/Makefile.am
@@ -1,55 +1,40 @@
-# Copyright 1999-2014 the Claws Mail team.
+# Copyright 1999-2021 the Claws Mail team.
 # This file is part of Claws Mail package, and distributed under the
 # terms of the General Public License version 3 (or later).
 # See COPYING file for license details.
 
-EXTRA_DIST = claws.def plugin.def version.rc
+EXTRA_DIST = claws.def plugin.def
 
 IFLAGS = \
+	-I$(top_builddir)/src \
 	-I$(top_srcdir)/src \
 	-I$(top_srcdir)/src/common \
-	-I$(top_builddir)/src \
 	-I$(top_srcdir)/src/gtk
 
-if OS_WIN32
-
-LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
-     `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
-     sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
-
-%.lo : %.rc
-	$(LTRCCOMPILE) -i $< -o $@
-
-plugin_res = version.lo
-plugin_res_ldflag = -Wl,.libs/version.o
-
-export_symbols = -export-symbols $(srcdir)/plugin.def
+plugin_ldflags =
+plugin_extra_deps =
+plugin_libadd =
 
-plugin_deps = libclaws.a $(plugin_res) plugin.def
+if OS_WIN32
 
 libclaws.a: claws.def
 	$(DLLTOOL) --output-lib $@ --def $<
 
-plugin_ldadd = -L. -lclaws
+%.lo : %.rc
+	$(LIBTOOL) --mode=compile --tag=RC $(RC) -i $< -o $@
 
-else
-plugin_res =
-plugin_res_ldflag =
-export_symbols =
-plugin_deps =
-plugin_ldadd =
-endif
+plugin_ldflags += \
+	-Wl,.libs/version.o \
+	-no-undefined \
+	-export-symbols $(srcdir)/plugin.def
+plugin_extra_deps += libclaws.a version.lo plugin.def
+plugin_libadd += -L. -lclaws
 
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-else
-no_undefined =
 endif
 
 if CYGWIN
-cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
-else
-cygwin_export_lib = 
+plugin_ldflags += -no-undefined
+plugin_libadd += -L$(top_builddir)/src -lclaws-mail
 endif
 
 plugindir = $(pkglibdir)/plugins
@@ -58,21 +43,15 @@ if BUILD_SPAM_REPORT_PLUGIN
 plugin_LTLIBRARIES = spamreport.la
 endif
 
-spamreport_la_SOURCES = \
-         spam_report.c \
-	 spam_report_prefs.c \
-	 spam_report_prefs.h
-
 spamreport_la_LDFLAGS = \
-	$(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
-	-avoid-version -module \
-	$(GTK_LIBS)
+	$(plugin_ldflags) \
+	-avoid-version -module
 
-spamreport_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \
-	$(CURL_LIBS) \
-	$(GTK_LIBS)
+EXTRA_spamreport_la_DEPENDENCIES = $(plugin_extra_deps)
 
-spamreport_la_DEPENDENCIES = $(plugin_deps)
+spamreport_la_LIBADD = $(plugin_libadd) \
+	$(GTK_LIBS) \
+	$(CURL_LIBS)
 
 spamreport_la_CPPFLAGS = \
 	$(IFLAGS) \
@@ -81,4 +60,12 @@ spamreport_la_CPPFLAGS = \
 	$(GTK_CFLAGS) \
 	$(ENCHANT_CFLAGS)
 
+spamreport_la_SOURCES = \
+	spam_report.c \
+	spam_report_prefs.c \
+	spam_report_prefs.h
+
+clean-local:
+	rm -f libclaws.a
+
 .PHONY: test
diff --git a/src/plugins/tnef_parse/Makefile.am b/src/plugins/tnef_parse/Makefile.am
index 2ef53a893..c88e2bd56 100644
--- a/src/plugins/tnef_parse/Makefile.am
+++ b/src/plugins/tnef_parse/Makefile.am
@@ -1,49 +1,41 @@
-# Copyright 1999-2014 the Claws Mail team.
+# Copyright 1999-2021 the Claws Mail team.
 # This file is part of Claws Mail package, and distributed under the
 # terms of the General Public License version 3 (or later).
 # See COPYING file for license details.
 
-EXTRA_DIST = claws.def plugin.def version.rc
+EXTRA_DIST = claws.def plugin.def
 
-if OS_WIN32
-
-LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
-     `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
-     sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
-
-%.lo : %.rc
-	$(LTRCCOMPILE) -i $< -o $@
-
-plugin_res = version.lo
-plugin_res_ldflag = -Wl,.libs/version.o
+IFLAGS = \
+	-I$(top_builddir)/src \
+	-I$(top_builddir)/src/common \
+	-I$(top_srcdir)/src \
+	-I$(top_srcdir)/src/common \
+	-I$(top_srcdir)/src/gtk
 
-export_symbols = -export-symbols $(srcdir)/plugin.def
+plugin_ldflags =
+plugin_extra_deps =
+plugin_libadd =
 
-plugin_deps = libclaws.a $(plugin_res) plugin.def
+if OS_WIN32
 
 libclaws.a: claws.def
 	$(DLLTOOL) --output-lib $@ --def $<
 
-plugin_ldadd = -L. -lclaws
+%.lo : %.rc
+	$(LIBTOOL) --mode=compile --tag=RC $(RC) -i $< -o $@
 
-else
-plugin_res =
-plugin_res_ldflag =
-export_symbols =
-plugin_deps =
-plugin_ldadd =
-endif
+plugin_ldflags += \
+	-Wl,.libs/version.o \
+	-no-undefined \
+	-export-symbols $(srcdir)/plugin.def
+plugin_extra_deps += libclaws.a version.lo plugin.def
+plugin_libadd += -L. -lclaws
 
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-else
-no_undefined =
 endif
 
 if CYGWIN
-cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
-else
-cygwin_export_lib = 
+plugin_ldflags += -no-undefined
+plugin_libadd += -L$(top_builddir)/src -lclaws-mail
 endif
 
 plugindir = $(pkglibdir)/plugins
@@ -52,27 +44,15 @@ if BUILD_TNEF_PARSE_PLUGIN
 plugin_LTLIBRARIES = tnef_parse.la
 endif
 
-tnef_parse_la_SOURCES = \
-         tnef_parse.c \
-         tnef_dump.c \
-         tnef_dump.h
-
 tnef_parse_la_LDFLAGS = \
-	$(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
-	-avoid-version -module \
-	$(GTK_LIBS) \
-	$(YTNEF_LIBS)
-
-tnef_parse_la_DEPENDENCIES = $(plugin_deps)
+	$(plugin_ldflags) \
+	-avoid-version -module
 
-tnef_parse_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \
-	$(GTK_LIBS)
+EXTRA_tnef_parse_la_DEPENDENCIES = $(plugin_extra_deps)
 
-IFLAGS = \
-	-I$(top_srcdir)/src \
-	-I$(top_srcdir)/src/common \
-	-I$(top_builddir)/src \
-	-I$(top_srcdir)/src/gtk
+tnef_parse_la_LIBADD = $(plugin_libadd) \
+	$(GTK_LIBS) \
+	$(YTNEF_LIBS)
 
 tnef_parse_la_CPPFLAGS = \
 	$(IFLAGS) \
@@ -80,4 +60,12 @@ tnef_parse_la_CPPFLAGS = \
 	$(GTK_CFLAGS) \
 	$(YTNEF_CFLAGS)
 
+tnef_parse_la_SOURCES = \
+	tnef_dump.c \
+	tnef_dump.h \
+	tnef_parse.c
+
+clean-local:
+	rm -f libclaws.a
+
 .PHONY: test
diff --git a/src/plugins/vcalendar/Makefile.am b/src/plugins/vcalendar/Makefile.am
index cdd570ccf..74dc47cdf 100644
--- a/src/plugins/vcalendar/Makefile.am
+++ b/src/plugins/vcalendar/Makefile.am
@@ -1,56 +1,41 @@
-# Copyright 1999-2014 the Claws Mail team.
+# Copyright 1999-2021 the Claws Mail team.
 # This file is part of Claws Mail package, and distributed under the
 # terms of the General Public License version 3 (or later).
 # See COPYING file for license details.
 
-EXTRA_DIST = claws.def plugin.def version.rc
+EXTRA_DIST = claws.def plugin.def
 
 IFLAGS = \
 	-I$(top_builddir)/src \
+	-I$(top_builddir)/src/common \
 	-I$(top_srcdir)/src \
 	-I$(top_srcdir)/src/common \
-	-I$(top_builddir)/src/common \
 	-I$(top_srcdir)/src/gtk
 
-if OS_WIN32
-
-LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
-     `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
-     sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
-
-%.lo : %.rc
-	$(LTRCCOMPILE) -i $< -o $@
-
-plugin_res = version.lo
-plugin_res_ldflag = -Wl,.libs/version.o
-
-export_symbols = -export-symbols $(srcdir)/plugin.def
+plugin_ldflags =
+plugin_extra_deps =
+plugin_libadd =
 
-plugin_deps = libclaws.a $(plugin_res) plugin.def
+if OS_WIN32
 
 libclaws.a: claws.def
 	$(DLLTOOL) --output-lib $@ --def $<
 
-plugin_ldadd = -L. -lclaws
+%.lo : %.rc
+	$(LIBTOOL) --mode=compile --tag=RC $(RC) -i $< -o $@
 
-else
-plugin_res =
-plugin_res_ldflag =
-export_symbols =
-plugin_deps =
-plugin_ldadd =
-endif
+plugin_ldflags += \
+	-Wl,.libs/version.o \
+	-no-undefined \
+	-export-symbols $(srcdir)/plugin.def
+plugin_extra_deps += libclaws.a version.lo plugin.def
+plugin_libadd += -L. -lclaws
 
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-else
-no_undefined =
 endif
 
 if CYGWIN
-cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
-else
-cygwin_export_lib = 
+plugin_ldflags += -no-undefined
+plugin_libadd += -L$(top_builddir)/src -lclaws-mail
 endif
 
 plugindir = $(pkglibdir)/plugins
@@ -59,29 +44,16 @@ if BUILD_VCALENDAR_PLUGIN
 plugin_LTLIBRARIES = vcalendar.la
 endif
 
-vcalendar_la_SOURCES = \
-	plugin.c \
-	vcal_interface.h \
-	vcalendar.c vcalendar.h \
-	vcal_manager.c vcal_manager.h \
-	vcal_folder.c vcal_folder.h \
-	vcal_meeting_gtk.c vcal_meeting_gtk.h \
-	vcal_prefs.c vcal_prefs.h \
-	vcal_dbus.c vcal_dbus.h \
-	common-views.c common-views.h \
-	day-view.c month-view.c
-
 vcalendar_la_LDFLAGS = \
-	$(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
-	-avoid-version -module \
-	$(GTK_LIBS) $(LIBICAL_LIBS)
+	$(plugin_ldflags) \
+	-avoid-version -module
 
-vcalendar_la_DEPENDENCIES = $(plugin_deps)
+EXTRA_vcalendar_la_DEPENDENCIES = $(plugin_extra_deps)
 
-vcalendar_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \
+vcalendar_la_LIBADD = $(plugin_libadd) \
 	$(GTK_LIBS) \
 	$(CURL_LIBS) \
-  $(LIBICAL_LIBS)
+	$(LIBICAL_LIBS)
 
 vcalendar_la_CPPFLAGS = \
 	$(IFLAGS) \
@@ -89,7 +61,27 @@ vcalendar_la_CPPFLAGS = \
 	$(GTK_CFLAGS) \
 	$(ENCHANT_CFLAGS) \
 	$(CURL_CFLAGS) \
-  $(LIBICAL_CFLAGS)
+	$(LIBICAL_CFLAGS)
+
+vcalendar_la_SOURCES = \
+	common-views.c \
+	common-views.h \
+	day-view.c \
+	month-view.c \
+	plugin.c \
+	vcal_dbus.c \
+	vcal_dbus.h \
+	vcal_folder.c \
+	vcal_folder.h \
+	vcal_interface.h \
+	vcal_manager.c \
+	vcal_manager.h \
+	vcal_meeting_gtk.c \
+	vcal_meeting_gtk.h \
+	vcal_prefs.c \
+	vcal_prefs.h \
+	vcalendar.c \
+	vcalendar.h
 
 clean-local:
 	rm -f libclaws.a

commit 3099095d307714a1e420a6699073fec73056a022
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Fri Aug 27 12:30:40 2021 -0700

    Add Windows VERSIONINFO resource to executable

diff --git a/.gitignore b/.gitignore
index 6e7352709..ca76e4335 100644
--- a/.gitignore
+++ b/.gitignore
@@ -110,6 +110,7 @@ Makefile.in
 /src/quote_fmt_parse.h
 /src/tags
 /src/TAGS
+/src/w32-resource.rc
 /src/ylwrap
 /stamp-h
 /stamp-h1
diff --git a/configure.ac b/configure.ac
index 687b62ea7..57d7d4c0c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2117,6 +2117,7 @@ m4/Makefile
 po/Makefile.in
 src/common/version.h
 src/Makefile
+src/w32-resource.rc
 src/common/Makefile
 src/common/passcrypt.h
 src/common/tests/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index de7efd86f..c479bf122 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 the Claws Mail team.
+# Copyright 1999-2021 the Claws Mail team.
 # This file is part of Claws Mail package, and distributed under the
 # terms of the General Public License version 3 (or later).
 # See COPYING file for license details.
@@ -20,12 +20,8 @@ endif
 bin_PROGRAMS = claws-mail
 
 if PLATFORM_WIN32
-LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
-     `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
-     sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
-
 %.o : %.rc
-	$(LTRCCOMPILE) -i $< -o $@
+	$(LIBTOOL) --mode=compile --tag=RC $(RC) -I$(srcdir) -i $< -o $@
 
 claws_mail_res_ldflag = -Wl,w32-resource.o
 claws_mail_deps = w32-resource.o
@@ -378,7 +374,7 @@ CLEANFILES = \
 
 EXTRA_DIST = \
 	claws-contacts.xml \
-	w32-logo.ico w32-resource.rc \
+	w32-logo.ico \
 	pixmaps/addr_one.xpm \
 	pixmaps/addr_two.xpm \
 	pixmaps/address_book.xpm \
diff --git a/src/w32-resource.rc b/src/w32-resource.rc
deleted file mode 100644
index e8f424ee9..000000000
--- a/src/w32-resource.rc
+++ /dev/null
@@ -1 +0,0 @@
-1 ICON "w32-logo.ico"
diff --git a/src/w32-resource.rc.in b/src/w32-resource.rc.in
new file mode 100644
index 000000000..4f7794140
--- /dev/null
+++ b/src/w32-resource.rc.in
@@ -0,0 +1,36 @@
+#include <winver.h>
+
+1 ICON "w32-logo.ico"
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION        @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+PRODUCTVERSION     @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+FILEFLAGSMASK      VS_FFI_FILEFLAGSMASK
+FILEFLAGS          0x0L
+FILEOS             VOS_NT_WINDOWS32
+FILETYPE           VFT_APP
+FILESUBTYPE        0x0L
+BEGIN
+	BLOCK "StringFileInfo"
+	BEGIN
+		BLOCK "040904b0"
+		BEGIN
+//			VALUE "Comments", ""
+			VALUE "CompanyName", "The Claws Mail Team"
+			VALUE "FileDescription", "Claws Mail"
+			VALUE "FileVersion", "@VERSION@"
+			VALUE "InternalName", "claws-mail"
+			VALUE "LegalCopyright", "GPL-3.0-or-later / © 1999-2021 The Claws Mail Team & Hiroyuki Yamamoto"
+//			VALUE "LegalTrademarks", ""
+			VALUE "OriginalFilename", "claws-mail.exe"
+//			VALUE "PrivateBuild", ""
+			VALUE "ProductName", "Claws Mail"
+			VALUE "ProductVersion", "@GIT_VERSION@ for Windows"
+//			VALUE "SpecialBuild", ""
+		END
+	END
+	BLOCK "VarFileInfo"
+	BEGIN
+		VALUE "Translation", 0x0409, 1200
+	END
+END

commit 23aec49cdd06f60b104083c4f0aa154b58917315
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Thu Aug 26 12:00:00 2021 -0700

    Update Windows VERSIONINFO resource for plugins

diff --git a/.gitignore b/.gitignore
index 4c43aaab0..6e7352709 100644
--- a/.gitignore
+++ b/.gitignore
@@ -102,6 +102,7 @@ Makefile.in
 /src/matcher_parser_lex.c
 /src/matcher_parser_parse.c
 /src/matcher_parser_parse.h
+/src/plugins/**/version.rc
 /src/plugins/notification/gtkhotkey/x11/.dirstamp
 *_test
 /src/quote_fmt_lex.c
diff --git a/configure.ac b/configure.ac
index 69cdf4982..687b62ea7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2125,44 +2125,64 @@ src/etpan/Makefile
 src/plugins/Makefile
 src/plugins/acpi_notifier/Makefile
 src/plugins/address_keeper/Makefile
+src/plugins/address_keeper/version.rc
 src/plugins/archive/Makefile
 src/plugins/att_remover/Makefile
+src/plugins/att_remover/version.rc
 src/plugins/attachwarner/Makefile
+src/plugins/attachwarner/version.rc
 src/plugins/bogofilter/Makefile
 src/plugins/bsfilter/Makefile
+src/plugins/bsfilter/version.rc
 src/plugins/clamd/Makefile
 src/plugins/clamd/libclamd/Makefile
 src/plugins/demo/Makefile
 src/plugins/dillo/Makefile
 src/plugins/fancy/Makefile
+src/plugins/fancy/version.rc
 src/plugins/fetchinfo/Makefile
+src/plugins/fetchinfo/version.rc
 src/plugins/gdata/Makefile
 src/plugins/litehtml_viewer/Makefile
+src/plugins/litehtml_viewer/version.rc
 src/plugins/litehtml_viewer/litehtml/Makefile
 src/plugins/libravatar/Makefile
+src/plugins/libravatar/version.rc
 src/plugins/mailmbox/Makefile
+src/plugins/mailmbox/version.rc
 src/plugins/managesieve/Makefile
+src/plugins/managesieve/version.rc
 src/plugins/newmail/Makefile
 src/plugins/notification/Makefile
+src/plugins/notification/version.rc
 src/plugins/notification/gtkhotkey/Makefile
 src/plugins/pdf_viewer/Makefile
+src/plugins/pdf_viewer/version.rc
 src/plugins/perl/Makefile
 src/plugins/perl/tools/Makefile
 src/plugins/python/Makefile
 src/plugins/python/examples/Makefile
 src/plugins/pgpcore/Makefile
+src/plugins/pgpcore/version.rc
 src/plugins/pgpcore/tests/Makefile
 src/plugins/pgpmime/Makefile
+src/plugins/pgpmime/version.rc
 src/plugins/pgpinline/Makefile
+src/plugins/pgpinline/version.rc
 src/plugins/rssyl/Makefile
+src/plugins/rssyl/version.rc
 src/plugins/rssyl/tests/Makefile
 src/plugins/rssyl/libfeed/Makefile
 src/plugins/rssyl/libfeed/tests/Makefile
 src/plugins/smime/Makefile
+src/plugins/smime/version.rc
 src/plugins/spamassassin/Makefile
 src/plugins/spam_report/Makefile
+src/plugins/spam_report/version.rc
 src/plugins/tnef_parse/Makefile
+src/plugins/tnef_parse/version.rc
 src/plugins/vcalendar/Makefile
+src/plugins/vcalendar/version.rc
 src/tests/Makefile
 doc/Makefile
 doc/man/Makefile
diff --git a/src/plugins/address_keeper/version.rc b/src/plugins/address_keeper/version.rc
deleted file mode 100644
index 49edc6221..000000000
--- a/src/plugins/address_keeper/version.rc
+++ /dev/null
@@ -1,36 +0,0 @@
-1 VERSIONINFO
- FILEVERSION 0, 0, 0, 0
- PRODUCTVERSION 0, 0, 0, 0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "000004b0"
-        BEGIN
-            VALUE "FileDescription", "Claws Mail Address Keeper Plugin\0"
-            VALUE "FileVersion", "0.0.0.0\0"
-            VALUE "ProductVersion", "0.0.0.0 Win32\0"
-            VALUE "LegalCopyright", "GPL / © 1999-2017 Hiroyuki Yamamoto & The Claws Mail Team\0"
-            VALUE "CompanyName", "GNU / Free Software Foundation\0"
-            VALUE "ProductName", "Claws Mail\0"
-//            VALUE "Comments", "\0"
-//            VALUE "InternalName", "\0"
-//            VALUE "LegalTrademarks", "\0"
-//            VALUE "OriginalFilename", "\0"
-//            VALUE "PrivateBuild", "\0"
-//            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x0, 1200
-    END
-END
diff --git a/src/plugins/address_keeper/version.rc.in b/src/plugins/address_keeper/version.rc.in
new file mode 100644
index 000000000..79780e3df
--- /dev/null
+++ b/src/plugins/address_keeper/version.rc.in
@@ -0,0 +1,34 @@
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION        @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+PRODUCTVERSION     @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+FILEFLAGSMASK      VS_FFI_FILEFLAGSMASK
+FILEFLAGS          0x0L
+FILEOS             VOS_NT_WINDOWS32
+FILETYPE           VFT_DLL
+FILESUBTYPE        0x0L
+BEGIN
+	BLOCK "StringFileInfo"
+	BEGIN
+		BLOCK "040904b0"
+		BEGIN
+//			VALUE "Comments", ""
+			VALUE "CompanyName", "The Claws Mail Team"
+			VALUE "FileDescription", "Claws Mail Address Keeper Plugin"
+			VALUE "FileVersion", "@VERSION@"
+			VALUE "InternalName", "address_keeper"
+			VALUE "LegalCopyright", "GPL-3.0-or-later / © 1999-2021 The Claws Mail Team & Hiroyuki Yamamoto"
+//			VALUE "LegalTrademarks", ""
+			VALUE "OriginalFilename", "address_keeper.dll"
+//			VALUE "PrivateBuild", ""
+			VALUE "ProductName", "Claws Mail"
+			VALUE "ProductVersion", "@GIT_VERSION@ for Windows"
+//			VALUE "SpecialBuild", ""
+		END
+	END
+	BLOCK "VarFileInfo"
+	BEGIN
+		VALUE "Translation", 0x0409, 1200
+	END
+END
diff --git a/src/plugins/att_remover/version.rc b/src/plugins/att_remover/version.rc
deleted file mode 100644
index 3d9f4377c..000000000
--- a/src/plugins/att_remover/version.rc
+++ /dev/null
@@ -1,36 +0,0 @@
-1 VERSIONINFO
- FILEVERSION 0, 0, 0, 0
- PRODUCTVERSION 0, 0, 0, 0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "000004b0"
-        BEGIN
-            VALUE "FileDescription", "Claws Mail Attachment Remover Plugin\0"
-            VALUE "FileVersion", "0.0.0.0\0"
-            VALUE "ProductVersion", "0.0.0.0 Win32\0"
-            VALUE "LegalCopyright", "GPL / © 1999-2013 Hiroyuki Yamamoto & The Claws Mail Team\0"
-            VALUE "CompanyName", "GNU / Free Software Foundation\0"
-            VALUE "ProductName", "Claws Mail\0"
-//            VALUE "Comments", "\0"
-//            VALUE "InternalName", "\0"
-//            VALUE "LegalTrademarks", "\0"
-//            VALUE "OriginalFilename", "\0"
-//            VALUE "PrivateBuild", "\0"
-//            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x0, 1200
-    END
-END
diff --git a/src/plugins/att_remover/version.rc.in b/src/plugins/att_remover/version.rc.in
new file mode 100644
index 000000000..b7cf04602
--- /dev/null
+++ b/src/plugins/att_remover/version.rc.in
@@ -0,0 +1,34 @@
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION        @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+PRODUCTVERSION     @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+FILEFLAGSMASK      VS_FFI_FILEFLAGSMASK
+FILEFLAGS          0x0L
+FILEOS             VOS_NT_WINDOWS32
+FILETYPE           VFT_DLL
+FILESUBTYPE        0x0L
+BEGIN
+	BLOCK "StringFileInfo"
+	BEGIN
+		BLOCK "040904b0"
+		BEGIN
+//			VALUE "Comments", ""
+			VALUE "CompanyName", "The Claws Mail Team"
+			VALUE "FileDescription", "Claws Mail Attachment Remover Plugin"
+			VALUE "FileVersion", "@VERSION@"
+			VALUE "InternalName", "att_remover"
+			VALUE "LegalCopyright", "GPL-3.0-or-later / © 1999-2021 The Claws Mail Team & Hiroyuki Yamamoto"
+//			VALUE "LegalTrademarks", ""
+			VALUE "OriginalFilename", "att_remover.dll"
+//			VALUE "PrivateBuild", ""
+			VALUE "ProductName", "Claws Mail"
+			VALUE "ProductVersion", "@GIT_VERSION@ for Windows"
+//			VALUE "SpecialBuild", ""
+		END
+	END
+	BLOCK "VarFileInfo"
+	BEGIN
+		VALUE "Translation", 0x0409, 1200
+	END
+END
diff --git a/src/plugins/attachwarner/version.rc b/src/plugins/attachwarner/version.rc
deleted file mode 100644
index e162691e3..000000000
--- a/src/plugins/attachwarner/version.rc
+++ /dev/null
@@ -1,36 +0,0 @@
-1 VERSIONINFO
- FILEVERSION 0, 0, 0, 0
- PRODUCTVERSION 0, 0, 0, 0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "000004b0"
-        BEGIN
-            VALUE "FileDescription", "Claws Mail AttachWarner Plugin\0"
-            VALUE "FileVersion", "0.0.0.0\0"
-            VALUE "ProductVersion", "0.0.0.0 Win32\0"
-            VALUE "LegalCopyright", "GPL / © 1999-2017 Hiroyuki Yamamoto & The Claws Mail Team\0"
-            VALUE "CompanyName", "GNU / Free Software Foundation\0"
-            VALUE "ProductName", "Claws Mail\0"
-//            VALUE "Comments", "\0"
-//            VALUE "InternalName", "\0"
-//            VALUE "LegalTrademarks", "\0"
-//            VALUE "OriginalFilename", "\0"
-//            VALUE "PrivateBuild", "\0"
-//            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x0, 1200
-    END
-END
diff --git a/src/plugins/attachwarner/version.rc.in b/src/plugins/attachwarner/version.rc.in
new file mode 100644
index 000000000..c089cf7cb
--- /dev/null
+++ b/src/plugins/attachwarner/version.rc.in
@@ -0,0 +1,34 @@
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION        @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+PRODUCTVERSION     @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+FILEFLAGSMASK      VS_FFI_FILEFLAGSMASK
+FILEFLAGS          0x0L
+FILEOS             VOS_NT_WINDOWS32
+FILETYPE           VFT_DLL
+FILESUBTYPE        0x0L
+BEGIN
+	BLOCK "StringFileInfo"
+	BEGIN
+		BLOCK "040904b0"
+		BEGIN
+//			VALUE "Comments", ""
+			VALUE "CompanyName", "The Claws Mail Team"
+			VALUE "FileDescription", "Claws Mail AttachWarner Plugin"
+			VALUE "FileVersion", "@VERSION@"
+			VALUE "InternalName", "attachwarner"
+			VALUE "LegalCopyright", "GPL-3.0-or-later / © 1999-2021 The Claws Mail Team & Hiroyuki Yamamoto"
+//			VALUE "LegalTrademarks", ""
+			VALUE "OriginalFilename", "attachwarner.dll"
+//			VALUE "PrivateBuild", ""
+			VALUE "ProductName", "Claws Mail"
+			VALUE "ProductVersion", "@GIT_VERSION@ for Windows"
+//			VALUE "SpecialBuild", ""
+		END
+	END
+	BLOCK "VarFileInfo"
+	BEGIN
+		VALUE "Translation", 0x0409, 1200
+	END
+END
diff --git a/src/plugins/bsfilter/version.rc b/src/plugins/bsfilter/version.rc
deleted file mode 100644
index 14bc461a8..000000000
--- a/src/plugins/bsfilter/version.rc
+++ /dev/null
@@ -1,36 +0,0 @@
-1 VERSIONINFO
- FILEVERSION 0, 0, 0, 0
- PRODUCTVERSION 0, 0, 0, 0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "000004b0"
-        BEGIN
-            VALUE "FileDescription", "Claws Mail Bsfilter Plugin\0"
-            VALUE "FileVersion", "0.0.0.0\0"
-            VALUE "ProductVersion", "0.0.0.0 Win32\0"
-            VALUE "LegalCopyright", "GPL / © 1999-2017 Hiroyuki Yamamoto & The Claws Mail Team\0"
-            VALUE "CompanyName", "GNU / Free Software Foundation\0"
-            VALUE "ProductName", "Claws Mail\0"
-//            VALUE "Comments", "\0"
-//            VALUE "InternalName", "\0"
-//            VALUE "LegalTrademarks", "\0"
-//            VALUE "OriginalFilename", "\0"
-//            VALUE "PrivateBuild", "\0"
-//            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x0, 1200
-    END
-END
diff --git a/src/plugins/bsfilter/version.rc.in b/src/plugins/bsfilter/version.rc.in
new file mode 100644
index 000000000..97f365ac1
--- /dev/null
+++ b/src/plugins/bsfilter/version.rc.in
@@ -0,0 +1,34 @@
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION        @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+PRODUCTVERSION     @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+FILEFLAGSMASK      VS_FFI_FILEFLAGSMASK
+FILEFLAGS          0x0L
+FILEOS             VOS_NT_WINDOWS32
+FILETYPE           VFT_DLL
+FILESUBTYPE        0x0L
+BEGIN
+	BLOCK "StringFileInfo"
+	BEGIN
+		BLOCK "040904b0"
+		BEGIN
+//			VALUE "Comments", ""
+			VALUE "CompanyName", "The Claws Mail Team"
+			VALUE "FileDescription", "Claws Mail Bsfilter Plugin"
+			VALUE "FileVersion", "@VERSION@"
+			VALUE "InternalName", "bsfilter"
+			VALUE "LegalCopyright", "GPL-3.0-or-later / © 1999-2021 The Claws Mail Team & Hiroyuki Yamamoto"
+//			VALUE "LegalTrademarks", ""
+			VALUE "OriginalFilename", "bsfilter.dll"
+//			VALUE "PrivateBuild", ""
+			VALUE "ProductName", "Claws Mail"
+			VALUE "ProductVersion", "@GIT_VERSION@ for Windows"
+//			VALUE "SpecialBuild", ""
+		END
+	END
+	BLOCK "VarFileInfo"
+	BEGIN
+		VALUE "Translation", 0x0409, 1200
+	END
+END
diff --git a/src/plugins/fancy/version.rc b/src/plugins/fancy/version.rc
deleted file mode 100644
index e54fb108d..000000000
--- a/src/plugins/fancy/version.rc
+++ /dev/null
@@ -1,36 +0,0 @@
-1 VERSIONINFO
- FILEVERSION 0, 0, 0, 0
- PRODUCTVERSION 0, 0, 0, 0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "000004b0"
-        BEGIN
-            VALUE "FileDescription", "Claws Mail Fancy Plugin\0"
-            VALUE "FileVersion", "0.0.0.0\0"
-            VALUE "ProductVersion", "0.0.0.0 Win32\0"
-            VALUE "LegalCopyright", "GPL / © 1999-2017 Hiroyuki Yamamoto & The Claws Mail Team\0"
-            VALUE "CompanyName", "GNU / Free Software Foundation\0"
-            VALUE "ProductName", "Claws Mail\0"
-//            VALUE "Comments", "\0"
-//            VALUE "InternalName", "\0"
-//            VALUE "LegalTrademarks", "\0"
-//            VALUE "OriginalFilename", "\0"
-//            VALUE "PrivateBuild", "\0"
-//            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x0, 1200
-    END
-END
diff --git a/src/plugins/fancy/version.rc.in b/src/plugins/fancy/version.rc.in
new file mode 100644
index 000000000..7122fbead
--- /dev/null
+++ b/src/plugins/fancy/version.rc.in
@@ -0,0 +1,34 @@
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION        @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+PRODUCTVERSION     @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+FILEFLAGSMASK      VS_FFI_FILEFLAGSMASK
+FILEFLAGS          0x0L
+FILEOS             VOS_NT_WINDOWS32
+FILETYPE           VFT_DLL
+FILESUBTYPE        0x0L
+BEGIN
+	BLOCK "StringFileInfo"
+	BEGIN
+		BLOCK "040904b0"
+		BEGIN
+//			VALUE "Comments", ""
+			VALUE "CompanyName", "The Claws Mail Team"
+			VALUE "FileDescription", "Claws Mail Fancy Plugin"
+			VALUE "FileVersion", "@VERSION@"
+			VALUE "InternalName", "fancy"
+			VALUE "LegalCopyright", "GPL-3.0-or-later / © 1999-2021 The Claws Mail Team & Hiroyuki Yamamoto"
+//			VALUE "LegalTrademarks", ""
+			VALUE "OriginalFilename", "fancy.dll"
+//			VALUE "PrivateBuild", ""
+			VALUE "ProductName", "Claws Mail"
+			VALUE "ProductVersion", "@GIT_VERSION@ for Windows"
+//			VALUE "SpecialBuild", ""
+		END
+	END
+	BLOCK "VarFileInfo"
+	BEGIN
+		VALUE "Translation", 0x0409, 1200
+	END
+END
diff --git a/src/plugins/fetchinfo/version.rc b/src/plugins/fetchinfo/version.rc
deleted file mode 100644
index 6bac77128..000000000
--- a/src/plugins/fetchinfo/version.rc
+++ /dev/null
@@ -1,36 +0,0 @@
-1 VERSIONINFO
- FILEVERSION 0, 0, 0, 0
- PRODUCTVERSION 0, 0, 0, 0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "000004b0"
-        BEGIN
-            VALUE "FileDescription", "Claws Mail Fetchinfo Plugin\0"
-            VALUE "FileVersion", "0.0.0.0\0"
-            VALUE "ProductVersion", "0.0.0.0 Win32\0"
-            VALUE "LegalCopyright", "GPL / © 1999-2017 Hiroyuki Yamamoto & The Claws Mail Team\0"
-            VALUE "CompanyName", "GNU / Free Software Foundation\0"
-            VALUE "ProductName", "Claws Mail\0"
-//            VALUE "Comments", "\0"
-//            VALUE "InternalName", "\0"
-//            VALUE "LegalTrademarks", "\0"
-//            VALUE "OriginalFilename", "\0"
-//            VALUE "PrivateBuild", "\0"
-//            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x0, 1200
-    END
-END
diff --git a/src/plugins/fetchinfo/version.rc.in b/src/plugins/fetchinfo/version.rc.in
new file mode 100644
index 000000000..50729df07
--- /dev/null
+++ b/src/plugins/fetchinfo/version.rc.in
@@ -0,0 +1,34 @@
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION        @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+PRODUCTVERSION     @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+FILEFLAGSMASK      VS_FFI_FILEFLAGSMASK
+FILEFLAGS          0x0L
+FILEOS             VOS_NT_WINDOWS32
+FILETYPE           VFT_DLL
+FILESUBTYPE        0x0L
+BEGIN
+	BLOCK "StringFileInfo"
+	BEGIN
+		BLOCK "040904b0"
+		BEGIN
+//			VALUE "Comments", ""
+			VALUE "CompanyName", "The Claws Mail Team"
+			VALUE "FileDescription", "Claws Mail Fetchinfo Plugin"
+			VALUE "FileVersion", "@VERSION@"
+			VALUE "InternalName", "fetchinfo"
+			VALUE "LegalCopyright", "GPL-3.0-or-later / © 1999-2021 The Claws Mail Team & Hiroyuki Yamamoto"
+//			VALUE "LegalTrademarks", ""
+			VALUE "OriginalFilename", "fetchinfo.dll"
+//			VALUE "PrivateBuild", ""
+			VALUE "ProductName", "Claws Mail"
+			VALUE "ProductVersion", "@GIT_VERSION@ for Windows"
+//			VALUE "SpecialBuild", ""
+		END
+	END
+	BLOCK "VarFileInfo"
+	BEGIN
+		VALUE "Translation", 0x0409, 1200
+	END
+END
diff --git a/src/plugins/libravatar/version.rc b/src/plugins/libravatar/version.rc
deleted file mode 100644
index 6fe35f2b5..000000000
--- a/src/plugins/libravatar/version.rc
+++ /dev/null
@@ -1,36 +0,0 @@
-1 VERSIONINFO
- FILEVERSION 0, 0, 0, 0
- PRODUCTVERSION 0, 0, 0, 0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "000004b0"
-        BEGIN
-            VALUE "FileDescription", "Claws Mail Libravatar Plugin\0"
-            VALUE "FileVersion", "0.0.0.0\0"
-            VALUE "ProductVersion", "0.0.0.0 Win32\0"
-            VALUE "LegalCopyright", "GPL / © 1999-2017 Hiroyuki Yamamoto & The Claws Mail Team\0"
-            VALUE "CompanyName", "GNU / Free Software Foundation\0"
-            VALUE "ProductName", "Claws Mail\0"
-//            VALUE "Comments", "\0"
-//            VALUE "InternalName", "\0"
-//            VALUE "LegalTrademarks", "\0"
-//            VALUE "OriginalFilename", "\0"
-//            VALUE "PrivateBuild", "\0"
-//            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x0, 1200
-    END
-END
diff --git a/src/plugins/libravatar/version.rc.in b/src/plugins/libravatar/version.rc.in
new file mode 100644
index 000000000..b7a7417df
--- /dev/null
+++ b/src/plugins/libravatar/version.rc.in
@@ -0,0 +1,34 @@
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION        @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+PRODUCTVERSION     @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+FILEFLAGSMASK      VS_FFI_FILEFLAGSMASK
+FILEFLAGS          0x0L
+FILEOS             VOS_NT_WINDOWS32
+FILETYPE           VFT_DLL
+FILESUBTYPE        0x0L
+BEGIN
+	BLOCK "StringFileInfo"
+	BEGIN
+		BLOCK "040904b0"
+		BEGIN
+//			VALUE "Comments", ""
+			VALUE "CompanyName", "The Claws Mail Team"
+			VALUE "FileDescription", "Claws Mail Libravatar Plugin"
+			VALUE "FileVersion", "@VERSION@"
+			VALUE "InternalName", "libravatar"
+			VALUE "LegalCopyright", "GPL-3.0-or-later / © 1999-2021 The Claws Mail Team & Hiroyuki Yamamoto"
+//			VALUE "LegalTrademarks", ""
+			VALUE "OriginalFilename", "libravatar.dll"
+//			VALUE "PrivateBuild", ""
+			VALUE "ProductName", "Claws Mail"
+			VALUE "ProductVersion", "@GIT_VERSION@ for Windows"
+//			VALUE "SpecialBuild", ""
+		END
+	END
+	BLOCK "VarFileInfo"
+	BEGIN
+		VALUE "Translation", 0x0409, 1200
+	END
+END
diff --git a/src/plugins/litehtml_viewer/version.rc b/src/plugins/litehtml_viewer/version.rc
deleted file mode 100644
index 4914bef53..000000000
--- a/src/plugins/litehtml_viewer/version.rc
+++ /dev/null
@@ -1,36 +0,0 @@
-1 VERSIONINFO
- FILEVERSION 0, 0, 0, 0
- PRODUCTVERSION 0, 0, 0, 0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "000004b0"
-        BEGIN
-            VALUE "FileDescription", "Claws Mail LiteHTML Viewer Plugin\0"
-            VALUE "FileVersion", "0.0.0.0\0"
-            VALUE "ProductVersion", "0.0.0.0 Win32\0"
-            VALUE "LegalCopyright", "GPL / © 1999-2017 Hiroyuki Yamamoto & The Claws Mail Team\0"
-            VALUE "CompanyName", "GNU / Free Software Foundation\0"
-            VALUE "ProductName", "Claws Mail\0"
-//            VALUE "Comments", "\0"
-//            VALUE "InternalName", "\0"
-//            VALUE "LegalTrademarks", "\0"
-//            VALUE "OriginalFilename", "\0"
-//            VALUE "PrivateBuild", "\0"
-//            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x0, 1200
-    END
-END
diff --git a/src/plugins/litehtml_viewer/version.rc.in b/src/plugins/litehtml_viewer/version.rc.in
new file mode 100644
index 000000000..c0fa09802
--- /dev/null
+++ b/src/plugins/litehtml_viewer/version.rc.in
@@ -0,0 +1,34 @@
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION        @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+PRODUCTVERSION     @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+FILEFLAGSMASK      VS_FFI_FILEFLAGSMASK
+FILEFLAGS          0x0L
+FILEOS             VOS_NT_WINDOWS32
+FILETYPE           VFT_DLL
+FILESUBTYPE        0x0L
+BEGIN
+	BLOCK "StringFileInfo"
+	BEGIN
+		BLOCK "040904b0"
+		BEGIN
+//			VALUE "Comments", ""
+			VALUE "CompanyName", "The Claws Mail Team"
+			VALUE "FileDescription", "Claws Mail LiteHTML Viewer Plugin"
+			VALUE "FileVersion", "@VERSION@"
+			VALUE "InternalName", "litehtml_viewer"
+			VALUE "LegalCopyright", "GPL-3.0-or-later / © 1999-2021 The Claws Mail Team & Hiroyuki Yamamoto"
+//			VALUE "LegalTrademarks", ""
+			VALUE "OriginalFilename", "litehtml_viewer.dll"
+//			VALUE "PrivateBuild", ""
+			VALUE "ProductName", "Claws Mail"
+			VALUE "ProductVersion", "@GIT_VERSION@ for Windows"
+//			VALUE "SpecialBuild", ""
+		END
+	END
+	BLOCK "VarFileInfo"
+	BEGIN
+		VALUE "Translation", 0x0409, 1200
+	END
+END
diff --git a/src/plugins/mailmbox/version.rc b/src/plugins/mailmbox/version.rc
deleted file mode 100644
index a60f57915..000000000
--- a/src/plugins/mailmbox/version.rc
+++ /dev/null
@@ -1,36 +0,0 @@
-1 VERSIONINFO
- FILEVERSION 0, 0, 0, 0
- PRODUCTVERSION 0, 0, 0, 0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "000004b0"
-        BEGIN
-            VALUE "FileDescription", "Claws Mail MailMBOX Plugin\0"
-            VALUE "FileVersion", "0.0.0.0\0"
-            VALUE "ProductVersion", "0.0.0.0 Win32\0"
-            VALUE "LegalCopyright", "GPL / © 1999-2017 Hiroyuki Yamamoto & The Claws Mail Team\0"
-            VALUE "CompanyName", "GNU / Free Software Foundation\0"
-            VALUE "ProductName", "Claws Mail\0"
-//            VALUE "Comments", "\0"
-//            VALUE "InternalName", "\0"
-//            VALUE "LegalTrademarks", "\0"
-//            VALUE "OriginalFilename", "\0"
-//            VALUE "PrivateBuild", "\0"
-//            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x0, 1200
-    END
-END
diff --git a/src/plugins/mailmbox/version.rc.in b/src/plugins/mailmbox/version.rc.in
new file mode 100644
index 000000000..b28b5262a
--- /dev/null
+++ b/src/plugins/mailmbox/version.rc.in
@@ -0,0 +1,34 @@
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION        @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+PRODUCTVERSION     @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+FILEFLAGSMASK      VS_FFI_FILEFLAGSMASK
+FILEFLAGS          0x0L
+FILEOS             VOS_NT_WINDOWS32
+FILETYPE           VFT_DLL
+FILESUBTYPE        0x0L
+BEGIN
+	BLOCK "StringFileInfo"
+	BEGIN
+		BLOCK "040904b0"
+		BEGIN
+//			VALUE "Comments", ""
+			VALUE "CompanyName", "The Claws Mail Team"
+			VALUE "FileDescription", "Claws Mail MailMBOX Plugin"
+			VALUE "FileVersion", "@VERSION@"
+			VALUE "InternalName", "mailmbox"
+			VALUE "LegalCopyright", "GPL-3.0-or-later / © 1999-2021 The Claws Mail Team & Hiroyuki Yamamoto"
+//			VALUE "LegalTrademarks", ""
+			VALUE "OriginalFilename", "mailmbox.dll"
+//			VALUE "PrivateBuild", ""
+			VALUE "ProductName", "Claws Mail"
+			VALUE "ProductVersion", "@GIT_VERSION@ for Windows"
+//			VALUE "SpecialBuild", ""
+		END
+	END
+	BLOCK "VarFileInfo"
+	BEGIN
+		VALUE "Translation", 0x0409, 1200
+	END
+END
diff --git a/src/plugins/managesieve/version.rc b/src/plugins/managesieve/version.rc
deleted file mode 100644
index 0f4c1a773..000000000
--- a/src/plugins/managesieve/version.rc
+++ /dev/null
@@ -1,36 +0,0 @@
-1 VERSIONINFO
- FILEVERSION 0, 0, 0, 0
- PRODUCTVERSION 0, 0, 0, 0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "000004b0"
-        BEGIN
-            VALUE "FileDescription", "Claws Mail ManageSieve Plugin\0"
-            VALUE "FileVersion", "0.0.0.0\0"
-            VALUE "ProductVersion", "0.0.0.0 Win32\0"
-            VALUE "LegalCopyright", "GPL / © 1999-2017 Hiroyuki Yamamoto & The Claws Mail Team\0"
-            VALUE "CompanyName", "GNU / Free Software Foundation\0"
-            VALUE "ProductName", "Claws Mail\0"
-//            VALUE "Comments", "\0"
-//            VALUE "InternalName", "\0"
-//            VALUE "LegalTrademarks", "\0"
-//            VALUE "OriginalFilename", "\0"
-//            VALUE "PrivateBuild", "\0"
-//            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x0, 1200
-    END
-END
diff --git a/src/plugins/managesieve/version.rc.in b/src/plugins/managesieve/version.rc.in
new file mode 100644
index 000000000..6476eb532
--- /dev/null
+++ b/src/plugins/managesieve/version.rc.in
@@ -0,0 +1,34 @@
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION        @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+PRODUCTVERSION     @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+FILEFLAGSMASK      VS_FFI_FILEFLAGSMASK
+FILEFLAGS          0x0L
+FILEOS             VOS_NT_WINDOWS32
+FILETYPE           VFT_DLL
+FILESUBTYPE        0x0L
+BEGIN
+	BLOCK "StringFileInfo"
+	BEGIN
+		BLOCK "040904b0"
+		BEGIN
+//			VALUE "Comments", ""
+			VALUE "CompanyName", "The Claws Mail Team"
+			VALUE "FileDescription", "Claws Mail ManageSieve Plugin"
+			VALUE "FileVersion", "@VERSION@"
+			VALUE "InternalName", "managesieve"
+			VALUE "LegalCopyright", "GPL-3.0-or-later / © 1999-2021 The Claws Mail Team & Hiroyuki Yamamoto"
+//			VALUE "LegalTrademarks", ""
+			VALUE "OriginalFilename", "managesieve.dll"
+//			VALUE "PrivateBuild", ""
+			VALUE "ProductName", "Claws Mail"
+			VALUE "ProductVersion", "@GIT_VERSION@ for Windows"
+//			VALUE "SpecialBuild", ""
+		END
+	END
+	BLOCK "VarFileInfo"
+	BEGIN
+		VALUE "Translation", 0x0409, 1200
+	END
+END
diff --git a/src/plugins/notification/version.rc b/src/plugins/notification/version.rc
deleted file mode 100644
index e45c301ba..000000000
--- a/src/plugins/notification/version.rc
+++ /dev/null
@@ -1,36 +0,0 @@
-1 VERSIONINFO
- FILEVERSION 0, 0, 0, 0
- PRODUCTVERSION 0, 0, 0, 0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "000004b0"
-        BEGIN
-            VALUE "FileDescription", "Claws Mail Notification Plugin\0"
-            VALUE "FileVersion", "0.0.0.0\0"
-            VALUE "ProductVersion", "0.0.0.0 Win32\0"
-            VALUE "LegalCopyright", "GPL / © 1999-2017 Hiroyuki Yamamoto & The Claws Mail Team\0"
-            VALUE "CompanyName", "GNU / Free Software Foundation\0"
-            VALUE "ProductName", "Claws Mail\0"
-//            VALUE "Comments", "\0"
-//            VALUE "InternalName", "\0"
-//            VALUE "LegalTrademarks", "\0"
-//            VALUE "OriginalFilename", "\0"
-//            VALUE "PrivateBuild", "\0"
-//            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x0, 1200
-    END
-END
diff --git a/src/plugins/notification/version.rc.in b/src/plugins/notification/version.rc.in
new file mode 100644
index 000000000..e0868813b
--- /dev/null
+++ b/src/plugins/notification/version.rc.in
@@ -0,0 +1,34 @@
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION        @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+PRODUCTVERSION     @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+FILEFLAGSMASK      VS_FFI_FILEFLAGSMASK
+FILEFLAGS          0x0L
+FILEOS             VOS_NT_WINDOWS32
+FILETYPE           VFT_DLL
+FILESUBTYPE        0x0L
+BEGIN
+	BLOCK "StringFileInfo"
+	BEGIN
+		BLOCK "040904b0"
+		BEGIN
+//			VALUE "Comments", ""
+			VALUE "CompanyName", "The Claws Mail Team"
+			VALUE "FileDescription", "Claws Mail Notification Plugin"
+			VALUE "FileVersion", "@VERSION@"
+			VALUE "InternalName", "notification"
+			VALUE "LegalCopyright", "GPL-3.0-or-later / © 1999-2021 The Claws Mail Team & Hiroyuki Yamamoto"
+//			VALUE "LegalTrademarks", ""
+			VALUE "OriginalFilename", "notification.dll"
+//			VALUE "PrivateBuild", ""
+			VALUE "ProductName", "Claws Mail"
+			VALUE "ProductVersion", "@GIT_VERSION@ for Windows"
+//			VALUE "SpecialBuild", ""
+		END
+	END
+	BLOCK "VarFileInfo"
+	BEGIN
+		VALUE "Translation", 0x0409, 1200
+	END
+END
diff --git a/src/plugins/pdf_viewer/version.rc b/src/plugins/pdf_viewer/version.rc
deleted file mode 100644
index 907e22c28..000000000
--- a/src/plugins/pdf_viewer/version.rc
+++ /dev/null
@@ -1,36 +0,0 @@
-1 VERSIONINFO
- FILEVERSION 0, 0, 0, 0
- PRODUCTVERSION 0, 0, 0, 0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "000004b0"
-        BEGIN
-            VALUE "FileDescription", "Claws Mail PDF Viewer Plugin\0"
-            VALUE "FileVersion", "0.0.0.0\0"
-            VALUE "ProductVersion", "0.0.0.0 Win32\0"
-            VALUE "LegalCopyright", "GPL / © 1999-2021 Hiroyuki Yamamoto & The Claws Mail Team\0"
-            VALUE "CompanyName", "GNU / Free Software Foundation\0"
-            VALUE "ProductName", "Claws Mail\0"
-//            VALUE "Comments", "\0"
-//            VALUE "InternalName", "\0"
-//            VALUE "LegalTrademarks", "\0"
-//            VALUE "OriginalFilename", "\0"
-//            VALUE "PrivateBuild", "\0"
-//            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x0, 1200
-    END
-END
diff --git a/src/plugins/pdf_viewer/version.rc.in b/src/plugins/pdf_viewer/version.rc.in
new file mode 100644
index 000000000..a7631d986
--- /dev/null
+++ b/src/plugins/pdf_viewer/version.rc.in
@@ -0,0 +1,34 @@
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION        @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+PRODUCTVERSION     @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+FILEFLAGSMASK      VS_FFI_FILEFLAGSMASK
+FILEFLAGS          0x0L
+FILEOS             VOS_NT_WINDOWS32
+FILETYPE           VFT_DLL
+FILESUBTYPE        0x0L
+BEGIN
+	BLOCK "StringFileInfo"
+	BEGIN
+		BLOCK "040904b0"
+		BEGIN
+//			VALUE "Comments", ""
+			VALUE "CompanyName", "The Claws Mail Team"
+			VALUE "FileDescription", "Claws Mail PDF Viewer Plugin"
+			VALUE "FileVersion", "@VERSION@"
+			VALUE "InternalName", "pdf_viewer"
+			VALUE "LegalCopyright", "GPL-3.0-or-later / © 1999-2021 The Claws Mail Team & Hiroyuki Yamamoto"
+//			VALUE "LegalTrademarks", ""
+			VALUE "OriginalFilename", "pdf_viewer.dll"
+//			VALUE "PrivateBuild", ""
+			VALUE "ProductName", "Claws Mail"
+			VALUE "ProductVersion", "@GIT_VERSION@ for Windows"
+//			VALUE "SpecialBuild", ""
+		END
+	END
+	BLOCK "VarFileInfo"
+	BEGIN
+		VALUE "Translation", 0x0409, 1200
+	END
+END
diff --git a/src/plugins/pgpcore/version.rc b/src/plugins/pgpcore/version.rc
deleted file mode 100644
index 6879ab311..000000000
--- a/src/plugins/pgpcore/version.rc
+++ /dev/null
@@ -1,36 +0,0 @@
-1 VERSIONINFO
- FILEVERSION 0, 0, 0, 0
- PRODUCTVERSION 0, 0, 0, 0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "000004b0"
-        BEGIN
-            VALUE "FileDescription", "Claws Mail PGPCore Plugin\0"
-            VALUE "FileVersion", "0.0.0.0\0"
-            VALUE "ProductVersion", "0.0.0.0 Win32\0"
-            VALUE "LegalCopyright", "GPL / © 1999-2017 Hiroyuki Yamamoto & The Claws Mail Team\0"
-            VALUE "CompanyName", "GNU / Free Software Foundation\0"
-            VALUE "ProductName", "Claws Mail\0"
-//            VALUE "Comments", "\0"
-//            VALUE "InternalName", "\0"
-//            VALUE "LegalTrademarks", "\0"
-//            VALUE "OriginalFilename", "\0"
-//            VALUE "PrivateBuild", "\0"
-//            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x0, 1200
-    END
-END
diff --git a/src/plugins/pgpcore/version.rc.in b/src/plugins/pgpcore/version.rc.in
new file mode 100644
index 000000000..714164838
--- /dev/null
+++ b/src/plugins/pgpcore/version.rc.in
@@ -0,0 +1,34 @@
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION        @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+PRODUCTVERSION     @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+FILEFLAGSMASK      VS_FFI_FILEFLAGSMASK
+FILEFLAGS          0x0L
+FILEOS             VOS_NT_WINDOWS32
+FILETYPE           VFT_DLL
+FILESUBTYPE        0x0L
+BEGIN
+	BLOCK "StringFileInfo"
+	BEGIN
+		BLOCK "040904b0"
+		BEGIN
+//			VALUE "Comments", ""
+			VALUE "CompanyName", "The Claws Mail Team"
+			VALUE "FileDescription", "Claws Mail PGPCore Plugin"
+			VALUE "FileVersion", "@VERSION@"
+			VALUE "InternalName", "pgpcore"
+			VALUE "LegalCopyright", "GPL-3.0-or-later / © 1999-2021 The Claws Mail Team & Hiroyuki Yamamoto"
+//			VALUE "LegalTrademarks", ""
+			VALUE "OriginalFilename", "pgpcore.dll"
+//			VALUE "PrivateBuild", ""
+			VALUE "ProductName", "Claws Mail"
+			VALUE "ProductVersion", "@GIT_VERSION@ for Windows"
+//			VALUE "SpecialBuild", ""
+		END
+	END
+	BLOCK "VarFileInfo"
+	BEGIN
+		VALUE "Translation", 0x0409, 1200
+	END
+END
diff --git a/src/plugins/pgpinline/version.rc b/src/plugins/pgpinline/version.rc
deleted file mode 100644
index ebba06739..000000000
--- a/src/plugins/pgpinline/version.rc
+++ /dev/null
@@ -1,36 +0,0 @@
-1 VERSIONINFO
- FILEVERSION 0, 0, 0, 0
- PRODUCTVERSION 0, 0, 0, 0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "000004b0"
-        BEGIN
-            VALUE "FileDescription", "Claws Mail PGPInline Plugin\0"
-            VALUE "FileVersion", "0.0.0.0\0"
-            VALUE "ProductVersion", "0.0.0.0 Win32\0"
-            VALUE "LegalCopyright", "GPL / © 1999-2017 Hiroyuki Yamamoto & The Claws Mail Team\0"
-            VALUE "CompanyName", "GNU / Free Software Foundation\0"
-            VALUE "ProductName", "Claws Mail\0"
-//            VALUE "Comments", "\0"
-//            VALUE "InternalName", "\0"
-//            VALUE "LegalTrademarks", "\0"
-//            VALUE "OriginalFilename", "\0"
-//            VALUE "PrivateBuild", "\0"
-//            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x0, 1200
-    END
-END
diff --git a/src/plugins/pgpinline/version.rc.in b/src/plugins/pgpinline/version.rc.in
new file mode 100644
index 000000000..f113b6460
--- /dev/null
+++ b/src/plugins/pgpinline/version.rc.in
@@ -0,0 +1,34 @@
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION        @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+PRODUCTVERSION     @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+FILEFLAGSMASK      VS_FFI_FILEFLAGSMASK
+FILEFLAGS          0x0L
+FILEOS             VOS_NT_WINDOWS32
+FILETYPE           VFT_DLL
+FILESUBTYPE        0x0L
+BEGIN
+	BLOCK "StringFileInfo"
+	BEGIN
+		BLOCK "040904b0"
+		BEGIN
+//			VALUE "Comments", ""
+			VALUE "CompanyName", "The Claws Mail Team"
+			VALUE "FileDescription", "Claws Mail PGPInline Plugin"
+			VALUE "FileVersion", "@VERSION@"
+			VALUE "InternalName", "pgpinline"
+			VALUE "LegalCopyright", "GPL-3.0-or-later / © 1999-2021 The Claws Mail Team & Hiroyuki Yamamoto"
+//			VALUE "LegalTrademarks", ""
+			VALUE "OriginalFilename", "pgpinline.dll"
+//			VALUE "PrivateBuild", ""
+			VALUE "ProductName", "Claws Mail"
+			VALUE "ProductVersion", "@GIT_VERSION@ for Windows"
+//			VALUE "SpecialBuild", ""
+		END
+	END
+	BLOCK "VarFileInfo"
+	BEGIN
+		VALUE "Translation", 0x0409, 1200
+	END
+END
diff --git a/src/plugins/pgpmime/version.rc b/src/plugins/pgpmime/version.rc
deleted file mode 100644
index d7e52ef8b..000000000
--- a/src/plugins/pgpmime/version.rc
+++ /dev/null
@@ -1,36 +0,0 @@
-1 VERSIONINFO
- FILEVERSION 0, 0, 0, 0
- PRODUCTVERSION 0, 0, 0, 0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "000004b0"
-        BEGIN
-            VALUE "FileDescription", "Claws Mail PGPMime Plugin\0"
-            VALUE "FileVersion", "0.0.0.0\0"
-            VALUE "ProductVersion", "0.0.0.0 Win32\0"
-            VALUE "LegalCopyright", "GPL / © 1999-2017 Hiroyuki Yamamoto & The Claws Mail Team\0"
-            VALUE "CompanyName", "GNU / Free Software Foundation\0"
-            VALUE "ProductName", "Claws Mail\0"
-//            VALUE "Comments", "\0"
-//            VALUE "InternalName", "\0"
-//            VALUE "LegalTrademarks", "\0"
-//            VALUE "OriginalFilename", "\0"
-//            VALUE "PrivateBuild", "\0"
-//            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x0, 1200
-    END
-END
diff --git a/src/plugins/pgpmime/version.rc.in b/src/plugins/pgpmime/version.rc.in
new file mode 100644
index 000000000..71192f1b8
--- /dev/null
+++ b/src/plugins/pgpmime/version.rc.in
@@ -0,0 +1,34 @@
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION        @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+PRODUCTVERSION     @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+FILEFLAGSMASK      VS_FFI_FILEFLAGSMASK
+FILEFLAGS          0x0L
+FILEOS             VOS_NT_WINDOWS32
+FILETYPE           VFT_DLL
+FILESUBTYPE        0x0L
+BEGIN
+	BLOCK "StringFileInfo"
+	BEGIN
+		BLOCK "040904b0"
+		BEGIN
+//			VALUE "Comments", ""
+			VALUE "CompanyName", "The Claws Mail Team"
+			VALUE "FileDescription", "Claws Mail PGPMime Plugin"
+			VALUE "FileVersion", "@VERSION@"
+			VALUE "InternalName", "pgpmime"
+			VALUE "LegalCopyright", "GPL-3.0-or-later / © 1999-2021 The Claws Mail Team & Hiroyuki Yamamoto"
+//			VALUE "LegalTrademarks", ""
+			VALUE "OriginalFilename", "pgpmime.dll"
+//			VALUE "PrivateBuild", ""
+			VALUE "ProductName", "Claws Mail"
+			VALUE "ProductVersion", "@GIT_VERSION@ for Windows"
+//			VALUE "SpecialBuild", ""
+		END
+	END
+	BLOCK "VarFileInfo"
+	BEGIN
+		VALUE "Translation", 0x0409, 1200
+	END
+END
diff --git a/src/plugins/rssyl/version.rc b/src/plugins/rssyl/version.rc
deleted file mode 100644
index d46c7c55e..000000000
--- a/src/plugins/rssyl/version.rc
+++ /dev/null
@@ -1,36 +0,0 @@
-1 VERSIONINFO
- FILEVERSION 0, 0, 0, 0
- PRODUCTVERSION 0, 0, 0, 0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "000004b0"
-        BEGIN
-            VALUE "FileDescription", "Claws Mail RSSyl Plugin\0"
-            VALUE "FileVersion", "0.0.0.0\0"
-            VALUE "ProductVersion", "0.0.0.0 Win32\0"
-            VALUE "LegalCopyright", "GPL / © 1999-2017 Hiroyuki Yamamoto & The Claws Mail Team\0"
-            VALUE "CompanyName", "GNU / Free Software Foundation\0"
-            VALUE "ProductName", "Claws Mail\0"
-//            VALUE "Comments", "\0"
-//            VALUE "InternalName", "\0"
-//            VALUE "LegalTrademarks", "\0"
-//            VALUE "OriginalFilename", "\0"
-//            VALUE "PrivateBuild", "\0"
-//            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x0, 1200
-    END
-END
diff --git a/src/plugins/rssyl/version.rc.in b/src/plugins/rssyl/version.rc.in
new file mode 100644
index 000000000..6997873d1
--- /dev/null
+++ b/src/plugins/rssyl/version.rc.in
@@ -0,0 +1,34 @@
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION        @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+PRODUCTVERSION     @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+FILEFLAGSMASK      VS_FFI_FILEFLAGSMASK
+FILEFLAGS          0x0L
+FILEOS             VOS_NT_WINDOWS32
+FILETYPE           VFT_DLL
+FILESUBTYPE        0x0L
+BEGIN
+	BLOCK "StringFileInfo"
+	BEGIN
+		BLOCK "040904b0"
+		BEGIN
+//			VALUE "Comments", ""
+			VALUE "CompanyName", "The Claws Mail Team"
+			VALUE "FileDescription", "Claws Mail RSSyl Plugin"
+			VALUE "FileVersion", "@VERSION@"
+			VALUE "InternalName", "rssyl"
+			VALUE "LegalCopyright", "GPL-3.0-or-later / © 1999-2021 The Claws Mail Team & Hiroyuki Yamamoto"
+//			VALUE "LegalTrademarks", ""
+			VALUE "OriginalFilename", "rssyl.dll"
+//			VALUE "PrivateBuild", ""
+			VALUE "ProductName", "Claws Mail"
+			VALUE "ProductVersion", "@GIT_VERSION@ for Windows"
+//			VALUE "SpecialBuild", ""
+		END
+	END
+	BLOCK "VarFileInfo"
+	BEGIN
+		VALUE "Translation", 0x0409, 1200
+	END
+END
diff --git a/src/plugins/smime/version.rc b/src/plugins/smime/version.rc
deleted file mode 100644
index b6163b036..000000000
--- a/src/plugins/smime/version.rc
+++ /dev/null
@@ -1,36 +0,0 @@
-1 VERSIONINFO
- FILEVERSION 0, 0, 0, 0
- PRODUCTVERSION 0, 0, 0, 0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "000004b0"
-        BEGIN
-            VALUE "FileDescription", "Claws Mail S/Mime Plugin\0"
-            VALUE "FileVersion", "0.0.0.0\0"
-            VALUE "ProductVersion", "0.0.0.0 Win32\0"
-            VALUE "LegalCopyright", "GPL / © 1999-2017 Hiroyuki Yamamoto & The Claws Mail Team\0"
-            VALUE "CompanyName", "GNU / Free Software Foundation\0"
-            VALUE "ProductName", "Claws Mail\0"
-//            VALUE "Comments", "\0"
-//            VALUE "InternalName", "\0"
-//            VALUE "LegalTrademarks", "\0"
-//            VALUE "OriginalFilename", "\0"
-//            VALUE "PrivateBuild", "\0"
-//            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x0, 1200
-    END
-END
diff --git a/src/plugins/smime/version.rc.in b/src/plugins/smime/version.rc.in
new file mode 100644
index 000000000..558301a02
--- /dev/null
+++ b/src/plugins/smime/version.rc.in
@@ -0,0 +1,34 @@
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION        @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+PRODUCTVERSION     @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+FILEFLAGSMASK      VS_FFI_FILEFLAGSMASK
+FILEFLAGS          0x0L
+FILEOS             VOS_NT_WINDOWS32
+FILETYPE           VFT_DLL
+FILESUBTYPE        0x0L
+BEGIN
+	BLOCK "StringFileInfo"
+	BEGIN
+		BLOCK "040904b0"
+		BEGIN
+//			VALUE "Comments", ""
+			VALUE "CompanyName", "The Claws Mail Team"
+			VALUE "FileDescription", "Claws Mail S/Mime Plugin"
+			VALUE "FileVersion", "@VERSION@"
+			VALUE "InternalName", "smime"
+			VALUE "LegalCopyright", "GPL-3.0-or-later / © 1999-2021 The Claws Mail Team & Hiroyuki Yamamoto"
+//			VALUE "LegalTrademarks", ""
+			VALUE "OriginalFilename", "smime.dll"
+//			VALUE "PrivateBuild", ""
+			VALUE "ProductName", "Claws Mail"
+			VALUE "ProductVersion", "@GIT_VERSION@ for Windows"
+//			VALUE "SpecialBuild", ""
+		END
+	END
+	BLOCK "VarFileInfo"
+	BEGIN
+		VALUE "Translation", 0x0409, 1200
+	END
+END
diff --git a/src/plugins/spam_report/version.rc b/src/plugins/spam_report/version.rc
deleted file mode 100644
index b5fb17a87..000000000
--- a/src/plugins/spam_report/version.rc
+++ /dev/null
@@ -1,36 +0,0 @@
-1 VERSIONINFO
- FILEVERSION 0, 0, 0, 0
- PRODUCTVERSION 0, 0, 0, 0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "000004b0"
-        BEGIN
-            VALUE "FileDescription", "Claws Mail Spam Report Plugin\0"
-            VALUE "FileVersion", "0.0.0.0\0"
-            VALUE "ProductVersion", "0.0.0.0 Win32\0"
-            VALUE "LegalCopyright", "GPL / © 1999-2013 Hiroyuki Yamamoto & The Claws Mail Team\0"
-            VALUE "CompanyName", "GNU / Free Software Foundation\0"
-            VALUE "ProductName", "Claws Mail\0"
-//            VALUE "Comments", "\0"
-//            VALUE "InternalName", "\0"
-//            VALUE "LegalTrademarks", "\0"
-//            VALUE "OriginalFilename", "\0"
-//            VALUE "PrivateBuild", "\0"
-//            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x0, 1200
-    END
-END
diff --git a/src/plugins/spam_report/version.rc.in b/src/plugins/spam_report/version.rc.in
new file mode 100644
index 000000000..ed6b519ab
--- /dev/null
+++ b/src/plugins/spam_report/version.rc.in
@@ -0,0 +1,34 @@
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION        @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+PRODUCTVERSION     @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+FILEFLAGSMASK      VS_FFI_FILEFLAGSMASK
+FILEFLAGS          0x0L
+FILEOS             VOS_NT_WINDOWS32
+FILETYPE           VFT_DLL
+FILESUBTYPE        0x0L
+BEGIN
+	BLOCK "StringFileInfo"
+	BEGIN
+		BLOCK "040904b0"
+		BEGIN
+//			VALUE "Comments", ""
+			VALUE "CompanyName", "The Claws Mail Team"
+			VALUE "FileDescription", "Claws Mail Spam Report Plugin"
+			VALUE "FileVersion", "@VERSION@"
+			VALUE "InternalName", "spamreport"
+			VALUE "LegalCopyright", "GPL-3.0-or-later / © 1999-2021 The Claws Mail Team & Hiroyuki Yamamoto"
+//			VALUE "LegalTrademarks", ""
+			VALUE "OriginalFilename", "spamreport.dll"
+//			VALUE "PrivateBuild", ""
+			VALUE "ProductName", "Claws Mail"
+			VALUE "ProductVersion", "@GIT_VERSION@ for Windows"
+//			VALUE "SpecialBuild", ""
+		END
+	END
+	BLOCK "VarFileInfo"
+	BEGIN
+		VALUE "Translation", 0x0409, 1200
+	END
+END
diff --git a/src/plugins/tnef_parse/version.rc b/src/plugins/tnef_parse/version.rc
deleted file mode 100644
index c0c288658..000000000
--- a/src/plugins/tnef_parse/version.rc
+++ /dev/null
@@ -1,36 +0,0 @@
-1 VERSIONINFO
- FILEVERSION 0, 0, 0, 0
- PRODUCTVERSION 0, 0, 0, 0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "000004b0"
-        BEGIN
-            VALUE "FileDescription", "Claws Mail TNEF Parser Plugin\0"
-            VALUE "FileVersion", "0.0.0.0\0"
-            VALUE "ProductVersion", "0.0.0.0 Win32\0"
-            VALUE "LegalCopyright", "GPL / © 1999-2017 Hiroyuki Yamamoto & The Claws Mail Team\0"
-            VALUE "CompanyName", "GNU / Free Software Foundation\0"
-            VALUE "ProductName", "Claws Mail\0"
-//            VALUE "Comments", "\0"
-//            VALUE "InternalName", "\0"
-//            VALUE "LegalTrademarks", "\0"
-//            VALUE "OriginalFilename", "\0"
-//            VALUE "PrivateBuild", "\0"
-//            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x0, 1200
-    END
-END
diff --git a/src/plugins/tnef_parse/version.rc.in b/src/plugins/tnef_parse/version.rc.in
new file mode 100644
index 000000000..1aba183bc
--- /dev/null
+++ b/src/plugins/tnef_parse/version.rc.in
@@ -0,0 +1,34 @@
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION        @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+PRODUCTVERSION     @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+FILEFLAGSMASK      VS_FFI_FILEFLAGSMASK
+FILEFLAGS          0x0L
+FILEOS             VOS_NT_WINDOWS32
+FILETYPE           VFT_DLL
+FILESUBTYPE        0x0L
+BEGIN
+	BLOCK "StringFileInfo"
+	BEGIN
+		BLOCK "040904b0"
+		BEGIN
+//			VALUE "Comments", ""
+			VALUE "CompanyName", "The Claws Mail Team"
+			VALUE "FileDescription", "Claws Mail TNEF Parser Plugin"
+			VALUE "FileVersion", "@VERSION@"
+			VALUE "InternalName", "tnef_parse"
+			VALUE "LegalCopyright", "GPL-3.0-or-later / © 1999-2021 The Claws Mail Team & Hiroyuki Yamamoto"
+//			VALUE "LegalTrademarks", ""
+			VALUE "OriginalFilename", "tnef_parse.dll"
+//			VALUE "PrivateBuild", ""
+			VALUE "ProductName", "Claws Mail"
+			VALUE "ProductVersion", "@GIT_VERSION@ for Windows"
+//			VALUE "SpecialBuild", ""
+		END
+	END
+	BLOCK "VarFileInfo"
+	BEGIN
+		VALUE "Translation", 0x0409, 1200
+	END
+END
diff --git a/src/plugins/vcalendar/version.rc b/src/plugins/vcalendar/version.rc
deleted file mode 100644
index 465d53633..000000000
--- a/src/plugins/vcalendar/version.rc
+++ /dev/null
@@ -1,36 +0,0 @@
-1 VERSIONINFO
- FILEVERSION 0, 0, 0, 0
- PRODUCTVERSION 0, 0, 0, 0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "000004b0"
-        BEGIN
-            VALUE "FileDescription", "Claws Mail VCalendar Plugin\0"
-            VALUE "FileVersion", "0.0.0.0\0"
-            VALUE "ProductVersion", "0.0.0.0 Win32\0"
-            VALUE "LegalCopyright", "GPL / © 1999-2017 Hiroyuki Yamamoto & The Claws Mail Team\0"
-            VALUE "CompanyName", "GNU / Free Software Foundation\0"
-            VALUE "ProductName", "Claws Mail\0"
-//            VALUE "Comments", "\0"
-//            VALUE "InternalName", "\0"
-//            VALUE "LegalTrademarks", "\0"
-//            VALUE "OriginalFilename", "\0"
-//            VALUE "PrivateBuild", "\0"
-//            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x0, 1200
-    END
-END
diff --git a/src/plugins/vcalendar/version.rc.in b/src/plugins/vcalendar/version.rc.in
new file mode 100644
index 000000000..355b57aa4
--- /dev/null
+++ b/src/plugins/vcalendar/version.rc.in
@@ -0,0 +1,34 @@
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION        @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+PRODUCTVERSION     @MAJOR_VERSION@, at MINOR_VERSION@, at MICRO_VERSION@, at EXTRA_VERSION@
+FILEFLAGSMASK      VS_FFI_FILEFLAGSMASK
+FILEFLAGS          0x0L
+FILEOS             VOS_NT_WINDOWS32
+FILETYPE           VFT_DLL
+FILESUBTYPE        0x0L
+BEGIN
+	BLOCK "StringFileInfo"
+	BEGIN
+		BLOCK "040904b0"
+		BEGIN
+//			VALUE "Comments", ""
+			VALUE "CompanyName", "The Claws Mail Team"
+			VALUE "FileDescription", "Claws Mail VCalendar Plugin"
+			VALUE "FileVersion", "@VERSION@"
+			VALUE "InternalName", "vcalendar"
+			VALUE "LegalCopyright", "GPL-3.0-or-later / © 1999-2021 The Claws Mail Team & Hiroyuki Yamamoto"
+//			VALUE "LegalTrademarks", ""
+			VALUE "OriginalFilename", "vcalendar.dll"
+//			VALUE "PrivateBuild", ""
+			VALUE "ProductName", "Claws Mail"
+			VALUE "ProductVersion", "@GIT_VERSION@ for Windows"
+//			VALUE "SpecialBuild", ""
+		END
+	END
+	BLOCK "VarFileInfo"
+	BEGIN
+		VALUE "Translation", 0x0409, 1200
+	END
+END

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list