Module: sip-router
Branch: master
Commit: cf837383aa29090f484dde50759604169678f1a2
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=cf83738…
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'
---
Makefile.defs | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/Makefile.defs b/Makefile.defs
index d1fce21..04559b0 100644
--- a/Makefile.defs
+++ b/Makefile.defs
@@ -225,13 +225,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/
@@ -2048,7 +2058,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 \