summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-11-24 15:25:11 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2011-11-24 15:25:11 +0100
commit19c58fff82a1c8e7f10b4ccc09711594d594e4a7 (patch)
tree961c4b5ec61aaa053c4763efeb16cf2a55236dfb /Makefile
parent35f13e162dc226bd1fa21d6e26d240509898b7b8 (diff)
downloadlibuniso-19c58fff82a1c8e7f10b4ccc09711594d594e4a7.tar.bz2
libuniso-19c58fff82a1c8e7f10b4ccc09711594d594e4a7.tar.xz
build: install lua module
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 85b5cd0..6eaa516 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ SONAME := libuniso.so.$(ABI_VERSION)
progs-y += uniso
INCLUDES := uniso.h
-TARGETS := libuniso.a $(progs-y)
+TARGETS = libuniso.a $(progs-y) $(shlibs-y) $(lualibs-y)
CFLAGS ?= -g -Wall -Werror
CFLAGS += -fPIC
@@ -26,6 +26,10 @@ PKG_CONFIG ?= pkg-config
LUA_LIBS ?= $(shell $(PKG_CONFIG) --libs lua)
LUA_CFLAGS ?= $(shell $(PKG_CONFIG) --cflags lua)
+LUA_VERSION ?= 5.1
+LUA_LIBDIR ?= $(prefix)/lib/lua/$(LUA_VERSION)
+LUA_SHAREDIR ?= $(prefix)/share/lua/$(LUA_VERSION)
+
install-progs-y := $(INSTALLDIR) $(DESTDIR)$(bindir) && \
$(INSTALL) $(progs-y) $(DESTDIR)$(bindir)
install-libs-y := $(INSTALLDIR) $(DESTDIR)$(libdir) && \
@@ -53,12 +57,12 @@ UNISO_LIBS = -luniso
else
UNISO_LIBS = libuniso.a
endif
-TARGETS += $(shlibs-y)
ifneq ($(ENABLE_LUA),)
lualibs-y += uniso.so
+install-lualibs-y := $(INSTALLDIR) $(DESTDIR)$(LUA_LIBDIR) && \
+ $(INSTALL) uniso.so $(DESTDIR)$(LUA_LIBDIR)
endif
-TARGETS += $(lualibs-y)
all: $(TARGETS)
@@ -93,4 +97,5 @@ install: $(TARGETS) $(INCLUDES)
$(install-progs-y)
$(install-libs-y)
$(install-shlibs-y)
+ $(install-lualibs-y)