From 921ce069a4770fbadad7bb4e806361e857469409 Mon Sep 17 00:00:00 2001 From: cbdev Date: Mon, 21 Jun 2021 22:03:17 +0200 Subject: Repository cleanup --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index bda7bb1..9b95f1b 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ .PHONY: all clean run sanitize backends windows full backends-full install -OBJS = config.o backend.o plugin.o +OBJS = core/config.o core/backend.o core/plugin.o PREFIX ?= /usr PLUGIN_INSTALL = $(PREFIX)/lib/midimonster @@ -11,7 +11,7 @@ GITVERSION = $(shell git describe) CFLAGS ?= -g -Wall -Wpedantic #CFLAGS += -DDEBUG # Hide all non-API symbols for export -CFLAGS += -fvisibility=hidden +CFLAGS += -fvisibility=hidden -I./ midimonster: LDLIBS = -ldl # Replace version string with current git-describe if possible -- cgit v1.2.3 From a743153aafffb38a6d8765d1f1c634dde51d5558 Mon Sep 17 00:00:00 2001 From: cbdev Date: Mon, 21 Jun 2021 22:15:15 +0200 Subject: Repository cleanup, part 2 --- Makefile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 9b95f1b..50fc73e 100644 --- a/Makefile +++ b/Makefile @@ -11,14 +11,18 @@ GITVERSION = $(shell git describe) CFLAGS ?= -g -Wall -Wpedantic #CFLAGS += -DDEBUG # Hide all non-API symbols for export -CFLAGS += -fvisibility=hidden -I./ +CFLAGS += -fvisibility=hidden + +# Subdirectory objects need the include path +RCCFLAGS += -I./ +CFLAGS += -I./ midimonster: LDLIBS = -ldl # Replace version string with current git-describe if possible ifneq "$(GITVERSION)" "" midimonster: CFLAGS += -DMIDIMONSTER_VERSION=\"$(GITVERSION)\" midimonster.exe: CFLAGS += -DMIDIMONSTER_VERSION=\"$(GITVERSION)\" -resource.o: RCCFLAGS += -DMIDIMONSTER_VERSION=\\\"$(GITVERSION)\\\" +assets/resource.o: RCCFLAGS += -DMIDIMONSTER_VERSION=\\\"$(GITVERSION)\\\" endif # Work around strange linker passing convention differences in Linux and OSX @@ -55,10 +59,10 @@ backends-full: midimonster: midimonster.c portability.h $(OBJS) $(CC) $(CFLAGS) $(LDFLAGS) $< $(OBJS) $(LDLIBS) -o $@ -resource.o: midimonster.rc midimonster.ico +assets/resource.o: assets/midimonster.rc assets/midimonster.ico $(RCC) $(RCCFLAGS) $< -o $@ --output-format=coff -midimonster.ico: MIDIMonster.svg +assets/midimonster.ico: assets/MIDIMonster.svg convert -density 384 $< -define icon:auto-resize $@ midimonster.exe: export CC = x86_64-w64-mingw32-gcc @@ -66,14 +70,14 @@ 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 -midimonster.exe: midimonster.c portability.h $(OBJS) resource.o - $(CC) $(CFLAGS) $(LDFLAGS) $< $(OBJS) resource.o $(LDLIBS) -o $@ +midimonster.exe: midimonster.c portability.h $(OBJS) assets/resource.o + $(CC) $(CFLAGS) $(LDFLAGS) $< $(OBJS) assets/resource.o $(LDLIBS) -o $@ clean: $(RM) midimonster $(RM) midimonster.exe $(RM) libmmapi.a - $(RM) resource.o + $(RM) assets/resource.o $(RM) $(OBJS) $(MAKE) -C backends clean -- cgit v1.2.3 From 653c41a208ac004a412e4529f494b8b07baa2172 Mon Sep 17 00:00:00 2001 From: cbdev Date: Wed, 23 Jun 2021 01:27:35 +0200 Subject: Fix sanitize build circular include --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 50fc73e..de9b24e 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ CFLAGS += -fvisibility=hidden # Subdirectory objects need the include path RCCFLAGS += -I./ -CFLAGS += -I./ +core/%: CFLAGS += -I./ midimonster: LDLIBS = -ldl # Replace version string with current git-describe if possible -- cgit v1.2.3