From e517dbe783e65fdd1c80f5c917f8f924e2adfe8d Mon Sep 17 00:00:00 2001 From: cbdev Date: Tue, 10 Dec 2019 23:28:02 +0100 Subject: Implement rudimentary argument parsing --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8dab638..5183fa5 100644 --- a/Makefile +++ b/Makefile @@ -5,13 +5,19 @@ PREFIX ?= /usr PLUGIN_INSTALL = $(PREFIX)/lib/midimonster EXAMPLES ?= $(PREFIX)/share/midimonster SYSTEM := $(shell uname -s) +GITVERSION = $(shell git describe) +# Default compilation CFLAGS CFLAGS ?= -g -Wall -Wpedantic +#CFLAGS += -DDEBUG # Hide all non-API symbols for export CFLAGS += -fvisibility=hidden -#CFLAGS += -DDEBUG midimonster: LDLIBS = -ldl +# Replace version string with current git-describe if possible +ifneq "$(GITVERSION)" "" +midimonster: CFLAGS += "-DMIDIMONSTER_VERSION=\"$(GITVERSION)\"" +endif # Work around strange linker passing convention differences in Linux and OSX ifeq ($(SYSTEM),Linux) -- cgit v1.2.3 From ec01135171e4a57450e0250cf08cd4d60a8ad9ee Mon Sep 17 00:00:00 2001 From: cbdev Date: Wed, 11 Dec 2019 22:38:46 +0100 Subject: Fix makefile indentation --- Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5183fa5..1f6f212 100644 --- a/Makefile +++ b/Makefile @@ -71,14 +71,14 @@ run: valgrind --leak-check=full --show-leak-kinds=all ./midimonster install: - install -d "$(DESTDIR)$(PREFIX)/bin" - install -m 0755 midimonster "$(DESTDIR)$(PREFIX)/bin" - install -d "$(DESTDIR)$(PLUGIN_INSTALL)" - install -m 0755 backends/*.so "$(DESTDIR)$(PLUGIN_INSTALL)" - install -d "$(DESTDIR)$(EXAMPLES)" - install -m 0644 configs/* "$(DESTDIR)$(EXAMPLES)" + install -d "$(DESTDIR)$(PREFIX)/bin" + install -m 0755 midimonster "$(DESTDIR)$(PREFIX)/bin" + install -d "$(DESTDIR)$(PLUGIN_INSTALL)" + install -m 0755 backends/*.so "$(DESTDIR)$(PLUGIN_INSTALL)" + install -d "$(DESTDIR)$(EXAMPLES)" + install -m 0644 configs/* "$(DESTDIR)$(EXAMPLES)" ifdef DEFAULT_CFG - install -Dm 0644 monster.cfg "$(DESTDIR)$(DEFAULT_CFG)" + install -Dm 0644 monster.cfg "$(DESTDIR)$(DEFAULT_CFG)" endif sanitize: export CC = clang -- cgit v1.2.3 From e60eff52920cf063e7625344764521a791c8be3e Mon Sep 17 00:00:00 2001 From: cbdev Date: Wed, 11 Dec 2019 22:41:43 +0100 Subject: Remove unnecessary quotes --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 1f6f212..75c9d0d 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ CFLAGS += -fvisibility=hidden midimonster: LDLIBS = -ldl # Replace version string with current git-describe if possible ifneq "$(GITVERSION)" "" -midimonster: CFLAGS += "-DMIDIMONSTER_VERSION=\"$(GITVERSION)\"" +midimonster: CFLAGS += -DMIDIMONSTER_VERSION=\"$(GITVERSION)\" endif # Work around strange linker passing convention differences in Linux and OSX -- cgit v1.2.3