diff options
author | cbdev <cb@cbcdn.com> | 2019-12-31 10:58:34 +0100 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2019-12-31 10:58:34 +0100 |
commit | 3b4a2f9f3bbe97c5b77eb74ba9c0163b52d33206 (patch) | |
tree | 1defeeb5b081b8c951d920298fa10858191d6beb /Makefile | |
parent | 7360766777a7969b76fa306f7381d2d51efa1ebe (diff) | |
parent | 87fe68ef7d929b2f79e695df649b374fe0e2c572 (diff) | |
download | midimonster-3b4a2f9f3bbe97c5b77eb74ba9c0163b52d33206.tar.gz midimonster-3b4a2f9f3bbe97c5b77eb74ba9c0163b52d33206.tar.bz2 midimonster-3b4a2f9f3bbe97c5b77eb74ba9c0163b52d33206.zip |
Merge branch 'master' into debian/master
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 24 |
1 files changed, 16 insertions, 8 deletions
@@ -3,14 +3,22 @@ OBJS = config.o backend.o plugin.o 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)\" +midimonster.exe: CFLAGS += -DMIDIMONSTER_VERSION=\"$(GITVERSION)\" +endif # Work around strange linker passing convention differences in Linux and OSX ifeq ($(SYSTEM),Linux) @@ -64,14 +72,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)$(PREFIX)/share/midimonster" - install -m 0644 configs/* "$(DESTDIR)$(PREFIX)/share/midimonster" + 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 |