aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 6a835ac..bda7bb1 100644
--- a/Makefile
+++ b/Makefile
@@ -55,10 +55,14 @@ backends-full:
midimonster: midimonster.c portability.h $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) $< $(OBJS) $(LDLIBS) -o $@
-resource.o: midimonster.rc
- x86_64-w64-mingw32-windres $(RCCFLAGS) $< -o $@ --output-format=coff
+resource.o: midimonster.rc midimonster.ico
+ $(RCC) $(RCCFLAGS) $< -o $@ --output-format=coff
+
+midimonster.ico: MIDIMonster.svg
+ convert -density 384 $< -define icon:auto-resize $@
midimonster.exe: export CC = x86_64-w64-mingw32-gcc
+midimonster.exe: RCC ?= x86_64-w64-mingw32-windres
midimonster.exe: CFLAGS += -Wno-format
midimonster.exe: LDLIBS = -lws2_32
midimonster.exe: LDFLAGS += -Wl,--out-implib,libmmapi.a
@@ -84,6 +88,7 @@ install:
install -d "$(DESTDIR)$(EXAMPLES)"
install -m 0644 configs/* "$(DESTDIR)$(EXAMPLES)"
ifdef DEFAULT_CFG
+# Only install the default configuration if it is not already present to avoid overwriting it
ifeq (,$(wildcard $(DEFAULT_CFG)))
install -Dm 0644 monster.cfg "$(DESTDIR)$(DEFAULT_CFG)"
endif