# BlinkenLib # Copyright 2004-2014 Stefan Schuermans # Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html # a blinkenarea.org project INSTALL:=install include ../version.mk include ../config/config.mk ifeq ($(BLINKENLIB_CFG_OSX),1) SHLIBEXT:=dylib else SHLIBEXT:=so endif ENV_PREFIX:=$(shell echo $$PREFIX) STOW_DIR:=/usr/local/stow STOW_PREFIX:=$(STOW_DIR)/BlinkenLib-$(VERSION) DEF_PREFIX:=/usr/local ifneq ($(ENV_PREFIX),) PREFIX:=$(ENV_PREFIX) else ifeq ($(shell if [ -d $(STOW_DIR) ]; then echo stow; fi),stow) PREFIX:=$(STOW_PREFIX) else PREFIX:=$(DEF_PREFIX) endif endif HEADERS:=BlinkenLib.h BlinkenMovie.h BlinkenFrame.h BlinkenColorizer.h \ BlinkenProto.h config.h LIBS:=libBlinkenLib.a libBlinkenLib.$(SHLIBEXT).$(VERSION) EXECS:=BlinkenConv BlinkenSend BlinkenRecv BlinkenOutput .phony: install uninstall install: $(INSTALL) -d $(PREFIX)/include/BlinkenLib $(INSTALL) $(addprefix ../BlinkenLib/, $(HEADERS)) $(PREFIX)/include/BlinkenLib $(INSTALL) -d $(PREFIX)/lib $(INSTALL) $(addprefix ../BlinkenLib/, $(LIBS)) $(PREFIX)/lib ln -sf libBlinkenLib.$(SHLIBEXT).$(VERSION) $(PREFIX)/lib/libBlinkenLib.$(SHLIBEXT).$(VERSION_MAJOR) ln -sf libBlinkenLib.$(SHLIBEXT).$(VERSION_MAJOR) $(PREFIX)/lib/libBlinkenLib.$(SHLIBEXT) $(INSTALL) -d $(PREFIX)/bin $(INSTALL) $(addprefix ../BlinkenLib/, $(EXECS)) $(PREFIX)/bin uninstall: rm -f $(addprefix $(PREFIX)/bin/, $(EXECS)) rm -f $(PREFIX)/lib/libBlinkenLib.$(SHLIBEXT) rm -f $(PREFIX)/lib/libBlinkenLib.$(SHLIBEXT).$(VERSION_MAJOR) rm -f $(addprefix $(PREFIX)/lib/, $(LIBS)) rm -rf $(PREFIX)/include/BlinkenLib