aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2020-01-17 19:43:08 +0100
committercbdev <cb@cbcdn.com>2020-01-17 19:43:08 +0100
commitfa738ea4a3d78046c100fd953f33bbc902821d67 (patch)
treee095cf18b8323364902842d83c73502815b9b8de /Makefile
parent8c32598449895e506b4d0eab71be0abf219a62da (diff)
downloadmidimonster-fa738ea4a3d78046c100fd953f33bbc902821d67.tar.gz
midimonster-fa738ea4a3d78046c100fd953f33bbc902821d67.tar.bz2
midimonster-fa738ea4a3d78046c100fd953f33bbc902821d67.zip
Add project logo and initial Windows resource data
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 27f7994..6a835ac 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,7 @@ midimonster: LDLIBS = -ldl
ifneq "$(GITVERSION)" ""
midimonster: CFLAGS += -DMIDIMONSTER_VERSION=\"$(GITVERSION)\"
midimonster.exe: CFLAGS += -DMIDIMONSTER_VERSION=\"$(GITVERSION)\"
+resource.o: RCCFLAGS += -DMIDIMONSTER_VERSION=\\\"$(GITVERSION)\\\"
endif
# Work around strange linker passing convention differences in Linux and OSX
@@ -54,17 +55,21 @@ 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
+
midimonster.exe: export CC = x86_64-w64-mingw32-gcc
midimonster.exe: CFLAGS += -Wno-format
midimonster.exe: LDLIBS = -lws2_32
midimonster.exe: LDFLAGS += -Wl,--out-implib,libmmapi.a
-midimonster.exe: midimonster.c portability.h $(OBJS)
- $(CC) $(CFLAGS) $(LDFLAGS) $< $(OBJS) $(LDLIBS) -o $@
+midimonster.exe: midimonster.c portability.h $(OBJS) resource.o
+ $(CC) $(CFLAGS) $(LDFLAGS) $< $(OBJS) resource.o $(LDLIBS) -o $@
clean:
$(RM) midimonster
$(RM) midimonster.exe
$(RM) libmmapi.a
+ $(RM) resource.o
$(RM) $(OBJS)
$(MAKE) -C backends clean