From 00403d8413157e08eeaba7a1932f17c3c7b0758e Mon Sep 17 00:00:00 2001 From: Louie S Date: Sat, 4 Mar 2023 13:43:45 -0800 Subject: Configure flag for disabling icon embed for windows executable --- src/Makefile.am | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'src/Makefile.am') diff --git a/src/Makefile.am b/src/Makefile.am index 09eb6bd..9e670c6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,13 +1,26 @@ AUTOMAKE_OPTIONS = subdir-objects -EXTRA_DIST = include unix windows +EXTRA_DIST = include unix windows + +bin_PROGRAMS = terminal-media-launcher +terminal_media_launcher_SOURCES = cache.c draw.c read_cfg.c group.c entry.c $(PLATFORM)/cache.c $(PLATFORM)/draw.c $(PLATFORM)/read_cfg.c +terminal_media_launcher_LDADD = @CURSES_LIBS@ +terminal_media_launcher_CPPFLAGS = @CURSES_CFLAGS@ if WINDOWS PLATFORM=windows + +# Embed icon +if EMBED_ICON + +terminal_media_launcher_SOURCES += icon/$(PACKAGE_NAME).rc icon/$(PACKAGE_NAME).ico +terminal_media_launcher_LDADD += icon/$(PACKAGE_NAME).res +BUILT_SOURCES = icon/$(PACKAGE_NAME).res +CLEANFILES = icon/$(PACKAGE_NAME).res + +icon/$(PACKAGE_NAME).res: icon/$(PACKAGE_NAME).ico icon/$(PACKAGE_NAME).rc + windres icon/$(PACKAGE_NAME).rc -O coff -o $@ + +endif else PLATFORM=unix endif - -bin_PROGRAMS = terminal-media-launcher -terminal_media_launcher_SOURCES = cache.c draw.c read_cfg.c group.c entry.c $(PLATFORM)/cache.c $(PLATFORM)/draw.c $(PLATFORM)/read_cfg.c -terminal_media_launcher_LDADD = @CURSES_LIBS@ -terminal_media_launcher_CPPFLAGS = @CURSES_CFLAGS@ -- cgit