summaryrefslogtreecommitdiff
path: root/lib/Makefile
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-07-06 18:04:32 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-07-06 18:04:32 +0200
commita7f89980e5b3f4b9a74c70dbc5ffe8aabd28be28 (patch)
tree41c4deec1fdfbafd7821b4ca7a9772ac0abd92f5 /lib/Makefile
Imported Upstream version 2.9.3upstream/2.9.3
Diffstat (limited to 'lib/Makefile')
-rw-r--r--lib/Makefile73
1 files changed, 73 insertions, 0 deletions
diff --git a/lib/Makefile b/lib/Makefile
new file mode 100644
index 0000000..c5c9030
--- /dev/null
+++ b/lib/Makefile
@@ -0,0 +1,73 @@
+#!/bin/sh
+# Makefile to build/install ipmiutil lib files
+#
+# If --enable-lanplus (-DHAVE_LANPLUS), then this script
+# does a make from lib/lanplus/ for the lanplus library.
+# If --enable-landesk (-DLINK_LANDESK), then this script
+# assumes that these files are copied into this lib/ directory:
+# libipmiapi32.a libipmiapi64.a.suse libipmiapi64.a.redhat
+#
+MKDIR = sh ../mkinstalldirs
+INSTALL = sh ../install-sh -c
+INSTALL_DATA = $(INSTALL) -m 644
+INSTALL_SCRIPT = $(INSTALL) -m 755
+INSTALL_BIN = /usr/bin/install -c
+prefix = /usr
+
+datadir = ${prefix}/share
+mandir = ${prefix}/man
+sbindir = ${exec_prefix}/sbin
+libdir = ${exec_prefix}/lib
+datato = ${DESTDIR}${datadir}/ipmiutil
+lib32 = ${DESTDIR}/usr/lib
+lib64 = ${DESTDIR}/usr/lib64
+
+all:
+ if [ -f libipmiapi32.a ]; then \
+ rm -f libipmiapi.a; \
+ if [ "`uname -m`" = "x86_64" ]; then \
+ if [ -f /etc/SuSE-release ]; then \
+ cp -f libipmiapi64.a.suse libipmiapi.a; \
+ else cp -f libipmiapi64.a.redhat libipmiapi.a; fi \
+ else cp -f libipmiapi32.a libipmiapi.a; fi \
+ fi
+ cd lanplus; make clean; make
+ cp -f lanplus/libipmi_lanplus.a .
+ # cp -f lanplus/.libs/libipmi_lanplus.so.0.0.0 libipmi_lanplus.so
+
+clean:
+ rm -f libipmiapi.a lib*_lanplus.a lib*_lanplus.so
+ cd lanplus; make clean
+
+clobber:
+ rm -f libipmiapi.a lib*_lanplus.a lib*_lanplus.so
+ cd lanplus; make clean
+
+distclean:
+ rm -f libipmiapi.a lib*.a lib*_lanplus.so
+ cd lanplus; make distclean
+
+install:
+ $(MKDIR) ${datato}
+ cd lanplus; make install
+
+check:
+
+installso:
+ @if [ -d /usr/lib64 ]; then \
+ $(MKDIR) ${lib64} ; \
+ echo "installing libipmi_lanplus into ${lib64}"; \
+ cd lanplus; /bin/sh ../../libtool --mode=install $(INSTALL_BIN) 'libipmi_lanplus.la' '${lib64}/libipmi_lanplus.la' ; \
+ $(INSTALL_BIN) .libs/libipmi_lanplus.so.0.0.0 ${lib64}/libipmi_lanplus.so.0.0.0 ; \
+ (cd ${lib64} && rm -f libipmi_lanplus.so.0 && ln -s libipmi_lanplus.so.0.0.0 libipmi_lanplus.so.0) ; \
+ (cd ${lib64} && rm -f libipmi_lanplus.so && ln -s libipmi_lanplus.so.0.0.0 libipmi_lanplus.so) ; \
+ $(INSTALL_BIN) .libs/libipmi_lanplus.lai ${lib64}/libipmi_lanplus.la ; \
+ $(INSTALL_BIN) .libs/libipmi_lanplus.a ${lib64}/libipmi_lanplus.a; \
+ ranlib ${lib64}/libipmi_lanplus.a ; \
+ chmod 644 ${lib64}/libipmi_lanplus.a ; \
+ (cd ${lib32} && rm -f libipmi_lanplus.* ); \
+ ../../libtool --finish ${lib64} \
+ fi
+
+# $(INSTALL_DATA) libipmiapi.a ${datato}
+# $(INSTALL_DATA) libintf_lanplus.a ${datato}