Skip to content

Commit e66cd74

Browse files
committed
Added Linux and MaxOSX ports of ltotape
This is untested, I do not even know if it builds. While there remove a .a that was added by mistake.
1 parent 8613ff9 commit e66cd74

23 files changed

+11974
-3
lines changed

Makefile.am

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,14 @@ ACLOCAL_AMFLAGS = -I m4
22

33
nobase_pkginclude_HEADERS = config.h
44

5-
SUBDIRS = messages src/tape_drivers/netbsd/ltotape
5+
if PLATFORM_LINUX
6+
SUBDIRS = messages src/tape_drivers/linux/ltotape
7+
endif
8+
9+
if PLATFORM_MAC
10+
SUBDIRS = messages src/tape_drivers/osx/ltotape
11+
endif
612

13+
if PLATFORM_NETBSD
14+
SUBDIRS = messages src/tape_drivers/netbsd/ltotape
15+
endif

configure.ac

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ AC_INIT([ltfs-plugins], [0.1], [[email protected]])
66
AC_CONFIG_SRCDIR([src/tape_drivers/netbsd/ltotape/ltotape.c])
77
AC_CONFIG_MACRO_DIRS([m4])
88
AC_CONFIG_MACRO_DIR([m4])
9+
AC_CANONICAL_TARGET
910
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
1011
AC_CONFIG_HEADERS([config.h])
1112
AC_PROG_CC
@@ -99,8 +100,25 @@ AM_CPPFLAGS="${AM_CPPFLAGS} `${PKG_CONFIG} --cflags ltfs`"
99100
AM_CPPFLAGS="${AM_CPPFLAGS} `${PKG_CONFIG} --cflags fuse`"
100101
AM_CPPFLAGS="${AM_CPPFLAGS} -DIBM_LTFS_BUILD -DGENERIC_OEM_BUILD"
101102
AM_CPPFLAGS="${AM_CPPFLAGS} ${ICU_MODULE_CFLAGS}"
102-
#AM_CPPFLAGS="${AM_CPPFLAGS} -DENOMEDIUM=EAGAIN"
103103

104+
case "${target_os}" in
105+
linux*)
106+
target_linux=yes
107+
;;
108+
darwin*)
109+
host_mac=yes
110+
;;
111+
netbsd*)
112+
target_netbsd=yes
113+
;;
114+
*)
115+
AC_MSG_ERROR(["OS $target_os is not supported"])
116+
;;
117+
esac
118+
119+
AM_CONDITIONAL([PLATFORM_LINUX], [test "x${target_linux}" = "xyes"])
120+
AM_CONDITIONAL([PLATFORM_MAC], [test "x${target_mac}" = "xyes"])
121+
AM_CONDITIONAL([PLATFORM_NETBSD], [test "x${target_netbsd}" = "xyes"])
104122
AM_CONDITIONAL([CHK_MESSAGE], [test "x${use_msg_check}" = "xyes"])
105123

106124
AC_SUBST(CFLAGS)
@@ -109,5 +127,8 @@ AC_SUBST(AM_EXTRA_CPPFLAGS)
109127
AC_SUBST(AM_CFLAGS)
110128
AC_SUBST(AM_LDFLAGS)
111129

112-
AC_CONFIG_FILES([Makefile messages/Makefile src/tape_drivers/netbsd/ltotape/Makefile])
130+
AC_CONFIG_FILES([Makefile messages/Makefile
131+
src/tape_drivers/linux/ltotape/Makefile
132+
src/tape_drivers/osx/ltotape/Makefile
133+
src/tape_drivers/netbsd/ltotape/Makefile])
113134
AC_OUTPUT

messages/libdriver_ltotape_dat.a

-9.08 KB
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include <tape_drivers/ibm_tape.h>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#
2+
# Hewlett Packard LTFS backend for LTO and DAT tape drives
3+
#
4+
# FILE: Makefile.am
5+
#
6+
# CONTENTS: Makefile specifics for ltotape backend
7+
#
8+
# (C) Copyright 2015, 2016 Hewlett Packard Enterprise Development LP
9+
#
10+
# This program is free software; you can redistribute it and/or modify it
11+
# under the terms of version 2.1 of the GNU Lesser General Public License
12+
# as published by the Free Software Foundation.
13+
#
14+
# This program is distributed in the hope that it will be useful, but
15+
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16+
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17+
# License for more details.
18+
#
19+
# You should have received a copy of the GNU General Public License along
20+
# with this program; if not, write to:
21+
# Free Software Foundation, Inc.
22+
# 51 Franklin Street, Fifth Floor
23+
# Boston, MA 02110-1301, USA.
24+
#
25+
26+
AUTOMAKE_OPTIONS = nostdinc
27+
28+
lib_LTLIBRARIES = libdriver-ltotape.la
29+
libdir = @libdir@/ltfs
30+
31+
AM_LIBTOOLFLAGS = --tag=disable-static
32+
33+
libdriver_ltotape_la_SOURCES = ltotape.c ltotape_diag.c ltotape_platform.c
34+
libdriver_ltotape_la_DEPENDENCIES = $(top_srcdir)/messages/libdriver_ltotape_dat.la
35+
libdriver_ltotape_la_LIBADD = $(top_srcdir)/messages/libdriver_ltotape_dat.la
36+
libdriver_ltotape_la_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src
37+
libdriver_ltotape_la_LDFLAGS = -avoid-version -module
38+
39+
install-exec-hook:
40+
for f in $(lib_LTLIBRARIES); do rm -f $(libdir)/$$f; done

0 commit comments

Comments
 (0)