######################################################################### # # Copyright 2019 by Sean Conner. All Rights Reserved. # # This library is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 3 of the License, or (at your # option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public # License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . # # Comments, questions and criticisms can be sent to: sean@conman.org # ######################################################################## INSTALL = /usr/bin/install INSTALL_PROGRAM = $(INSTALL) INSTALL_DATA = $(INSTALL) -m 644 prefix = /usr/local datarootdir = $(prefix)/share exec_prefix = $(prefix) libdir = $(exec_prefix)/lib LUA ?= lua LUA_VERSION := $(shell $(LUA) -e "print(_VERSION:match '^Lua (.*)')") LUADIR ?= $(datarootdir)/lua/$(LUA_VERSION) LIBDIR ?= $(libdir)/lua/$(LUA_VERSION) ifneq ($(LUA_INCDIR),) override CFLAGS += -I$(LUA_INCDIR) endif .PHONY: install uninstall clean luacheck install: $(INSTALL) -d $(DESTDIR)$(LUADIR)/org/conman/app/GLV-1/handlers/blog $(INSTALL) -d $(DESTDIR)$(LUADIR)/org/conman/app/port70/handlers/blog $(INSTALL_DATA) GLV-1/handlers/*.lua $(DESTDIR)$(LUADIR)/org/conman/app/GLV-1/handlers/ $(INSTALL_DATA) GLV-1/handlers/blog/*.lua $(DESTDIR)$(LUADIR)/org/conman/app/GLV-1/handlers/blog/ $(INSTALL_DATA) port70/handlers/*.lua $(DESTDIR)$(LUADIR)/org/conman/app/port70/handlers/ $(INSTALL_DATA) port70/handlers/blog/*.lua $(DESTDIR)$(LUADIR)/org/conman/app/port70/handlers/blog/ uninstall: $(RM) -r $(DESTDIR)$(LUADIR)/org/conman/app/GLV-1 $(RM) -r $(DESTDIR)$(LUADIR)/org/conman/app/port70 clean: $(RM) -r $(shell find . -name '*~') luacheck: luacheck $(shell find . -name '*.lua')