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