From f18a88bb8a5c1835339084c87f541123a17056f3 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Fri, 10 Sep 2010 10:38:19 +0200 Subject: make: install target --- Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Makefile b/Makefile index e0956f8..d95ce5a 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,13 @@ TARGETS += sircbot.so LUA_LIBS=-llua endif +prefix ?= /usr/local +bindir ?= $(prefix)/bin +DESTDIR ?= +LUA_LIBDIR ?= $(prefix)/lib/lua/5.1 +LUA_LUADIR ?= $(prefix)/share/lua/5.1 +INSTALL ?= install + all: $(TARGETS) sircbot: sircbot.o irc.o @@ -27,3 +34,12 @@ sircbot.so: lsircbot.o clean: rm -f *.o $(TARGETS) + +install: $(TARGETS) + $(INSTALL) -d $(DESTDIR)$(bindir) + $(INSTALL) sircbot $(DESTDIR)$(bindir) + $(INSTALL) sircbot-send $(DESTDIR)$(bindir) +ifneq (NOLUA,) + $(INSTALL) -d $(DESTDIR)$(LUA_LIBDIR) + $(INSTALL) sircbot.so $(DESTDIR)$(LUA_LIBDIR) +endif -- cgit v1.2.3