Imported Upstream version 3.3.0
[debian/amanda] / device-src / Makefile.am
index 75177d7d738cccb2b64b4336014e223c7e1df39e..73cf6585fe7b807296f21f6899e23a45207a6959 100644 (file)
@@ -1,64 +1,92 @@
 # Makefile for Amanda tape library.
 
-SUBDIRS = . tests
-
+include $(top_srcdir)/config/automake/vars.am
+include $(top_srcdir)/config/automake/scripts.am
 include $(top_srcdir)/config/automake/precompile.am
 
 INCLUDES =     -I$(top_builddir)/common-src \
                -I$(top_srcdir)/common-src \
+               -I$(top_srcdir)/xfer-src \
+               -I$(top_srcdir)/ndmp-src \
                -I$(top_srcdir)/gnulib
 
 AM_CFLAGS = $(AMANDA_WARNING_CFLAGS)
-AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
+if GCC_COMPILER
+# ndmp-device.c includes files with old-skool prototypes, so:
+AM_CFLAGS += -Wno-strict-prototypes
+endif
+AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS) $(AS_NEEDED_FLAGS)
 
 sbin_PROGRAMS =
 
+SCRIPTS_PERL = \
+       amdevcheck \
+       amtapetype
+sbin_SCRIPTS = $(SCRIPTS_PERL)
+
 ## libamdevice.la
 
 amlib_LTLIBRARIES =    libamdevice.la
-libamdevice_la_LDFLAGS = -release $(VERSION) 
-libamdevice_la_SOURCES = property.c device.c queueing.c semaphore.c \
-       null-device.c rait-device.c vfs-device.c 
-libamdevice_la_LIBADD = ../common-src/libamanda.la
-
-# tape-device has *lots* of conditionals; the first is whether to support
-# the device at all, and the remainder select a particular kind of OS-specific
-# backend.
+libamdevice_la_LDFLAGS = -release $(VERSION) $(AS_NEEDED_FLAGS)
+libamdevice_la_SOURCES = \
+       property.c \
+       device.c \
+       directtcp-connection.c \
+       null-device.c \
+       rait-device.c \
+       vfs-device.c \
+       xfer-source-device.c \
+       xfer-dest-device.c \
+       xfer-dest-taper.c \
+       xfer-dest-taper-cacher.c \
+       xfer-dest-taper-directtcp.c \
+       xfer-dest-taper-splitter.c \
+       xfer-source-recovery.c
+libamdevice_la_LIBADD = \
+       ../common-src/libamanda.la \
+       ../xfer-src/libamxfer.la
 
 if WANT_TAPE_DEVICE
 libamdevice_la_SOURCES += tape-device.c
-
-if WANT_TAPE_XENIX
-libamdevice_la_SOURCES += tape-xenix.c
-endif
-if WANT_TAPE_AIX
-libamdevice_la_SOURCES += tape-aix.c
-endif
-if WANT_TAPE_UWARE
-libamdevice_la_SOURCES += tape-uware.c
 endif
-if WANT_TAPE_POSIX
-libamdevice_la_SOURCES += tape-posix.c
+
+if WANT_S3_DEVICE
+libamdevice_la_SOURCES += s3-device.c s3.c s3-util.c
 endif
 
+if WANT_DVDRW_DEVICE
+libamdevice_la_SOURCES += dvdrw-device.c
 endif
 
-if WANT_S3_DEVICE
-libamdevice_la_SOURCES += s3-device.c s3.c
+if WANT_NDMP_DEVICE
+libamdevice_la_SOURCES += ndmp-device.c
+libamdevice_la_LIBADD += ../ndmp-src/libndmlib.la
 endif
 
+## automake-style tests
+
+TESTS =
+noinst_PROGRAMS = $(TESTS)
+
 ## activate-devpay
 
-if WANT_DEVPAY
+if WANT_S3_DEVICE
 sbin_PROGRAMS += activate-devpay
+activate_devpay_LDADD = \
+       ../gnulib/libgnu.la
 activate_devpay_SOURCES = activate-devpay.c
 endif
 
 ## headers
 
-noinst_HEADERS = null-device.h semaphore.h \
-       tape-ops.h property.h rait-device.h s3.h \
-       s3-device.h tape-device.h vfs-device.h \
-       device.h queueing.h
-       
+noinst_HEADERS = \
+       device.h \
+       directtcp-connection.h \
+       property.h \
+       s3.h \
+       s3-util.h \
+       xfer-device.h \
+       xfer-dest-taper.h \
+       vfs-device.h
+
 aminclude_HEADERS =