aboutsummaryrefslogtreecommitdiff
path: root/src/metaflac/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'src/metaflac/Makefile.am')
-rw-r--r--src/metaflac/Makefile.am22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/metaflac/Makefile.am b/src/metaflac/Makefile.am
index 446a3c37..8c212ff4 100644
--- a/src/metaflac/Makefile.am
+++ b/src/metaflac/Makefile.am
@@ -1,6 +1,6 @@
# metaflac - Command-line FLAC metadata editor
# Copyright (C) 2000-2009 Josh Coalson
-# Copyright (C) 2011-2022 Xiph.Org Foundation
+# Copyright (C) 2011-2023 Xiph.Org Foundation
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -16,12 +16,21 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+if OS_IS_WINDOWS
+win_utf8_lib = $(top_builddir)/src/share/win_utf8_io/libwin_utf8_io.la
+if HAVE_WINDRES
+metaflac_DEPENDENCIES = version.o
+windows_resource_link = -Wl,version.o
+endif
+endif
+
bin_PROGRAMS = metaflac
AM_CFLAGS = @OGG_CFLAGS@
AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include
EXTRA_DIST = \
- CMakeLists.txt
+ CMakeLists.txt \
+ version.rc
metaflac_SOURCES = \
main.c \
@@ -39,11 +48,7 @@ metaflac_SOURCES = \
options.h \
usage.h \
utils.h
-metaflac_LDFLAGS = $(AM_LDFLAGS)
-
-if OS_IS_WINDOWS
-win_utf8_lib = $(top_builddir)/src/share/win_utf8_io/libwin_utf8_io.la
-endif
+metaflac_LDFLAGS = $(AM_LDFLAGS) $(windows_resource_link)
metaflac_LDADD = \
$(top_builddir)/src/share/grabbag/libgrabbag.la \
@@ -55,3 +60,6 @@ metaflac_LDADD = \
@LTLIBICONV@
CLEANFILES = metaflac.exe
+
+.rc.o:
+ $(RC) $(AM_CPPFLAGS) $< $@