aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2019-12-10 23:28:02 +0100
committercbdev <cb@cbcdn.com>2019-12-10 23:28:02 +0100
commite517dbe783e65fdd1c80f5c917f8f924e2adfe8d (patch)
tree74bf446148b4e17a542fb8e728a8beb7ed87b3f2 /Makefile
parent31cc72f660513b033cc0621782586562bafab08e (diff)
downloadmidimonster-e517dbe783e65fdd1c80f5c917f8f924e2adfe8d.tar.gz
midimonster-e517dbe783e65fdd1c80f5c917f8f924e2adfe8d.tar.bz2
midimonster-e517dbe783e65fdd1c80f5c917f8f924e2adfe8d.zip
Implement rudimentary argument parsing
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
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)