Module: sip-router
Branch: 3.1
Commit: c7c5a3cb39adef86d1c19746a073b2b73b666348
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c7c5a3c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Wed Mar 30 17:34:14 2011 +0200
Makefile: use lib64 for libs path on 64b arch
- it can be overwritten from command line with 'LIBDIR=xyz'
(cherry picked from commit cf837383aa29090f484dde50759604169678f1a2)
---
Makefile.defs | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/Makefile.defs b/Makefile.defs
index 83e2c2d..e49c5bf 100644
--- a/Makefile.defs
+++ b/Makefile.defs
@@ -223,13 +223,23 @@ endif
# extra CC command line options (e.g -march=athlon-mp)
CC_EXTRA_OPTS ?=
+LIBDIR ?=
+ifeq ($(LIBDIR),)
+ARCHBSZ= $(shell echo $(HOST_ARCH) | sed -e 's/.*64.*/64b/')
+ifeq ($(ARCHBSZ),64b)
+ LIBDIR = lib64
+else
+ LIBDIR = lib
+endif
+endif
+
# dirs
cfg_dir = etc/$(MAIN_NAME)/
bin_dir = sbin/
share_dir = share/$(MAIN_NAME)/
# lib/$(MAIN_NAME)/modules , lib/$(MAIN_NAME)/modules-s, lib/$(MAIN_NAME)/modules-k
-modules_dir = lib/$(MAIN_NAME)/
-lib_dir = lib/$(MAIN_NAME)/
+modules_dir = $(LIBDIR)/$(MAIN_NAME)/
+lib_dir = $(LIBDIR)/$(MAIN_NAME)/
doc_dir = doc/$(MAIN_NAME)/
man_dir = man/
@@ -2045,7 +2055,7 @@ saved_fixed_vars:= MAIN_NAME CFG_NAME SCR_NAME FLAVOUR
INSTALL_FLAVOUR \
# extra: prefix DESTDIR BASEDIR basedirt
saved_chg_vars:=\
CC_EXTRA_OPTS CPU CFLAGS_RM CFLAGS MOD_CFLAGS LIB_CFLAGS UTILS_CFLAGS \
- BASEDIR basedir DESTDIR \
+ BASEDIR basedir DESTDIR LIBDIR \
PREFIX prefix\
cfg_prefix cfg_dir bin_prefix bin_dir modules_prefix modules_dir \
doc_prefix doc_dir man_prefix man_dir ut_prefix ut_dir \