/amanda/tags/amanda260p2/tape-src/Makefile.am
Makefile | 101 lines | 70 code | 23 blank | 8 comment | 4 complexity | 1492dc4808bef037ec0027513588d954 MD5 | raw file
- # Makefile for Amanda tape library.
- include $(top_srcdir)/config/automake/precompile.am
- INCLUDES = -I$(top_builddir)/common-src \
- -I$(top_srcdir)/common-src \
- -I$(top_srcdir)/gnulib
- AM_CFLAGS = $(AMANDA_WARNING_CFLAGS)
- AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
- LINT=@AMLINT@
- LINTFLAGS=@AMLINTFLAGS@
- amlib_LTLIBRARIES = libamtape.la
- LIB_EXTENSION = la
- sbin_PROGRAMS= ammt amdd amtapetype
- libamtape_la_SOURCES = output-file.c \
- output-null.c \
- output-rait.c \
- output-tape.c \
- tapeio.c
- libamtape_la_LDFLAGS = -release $(VERSION)
- libamtape_la_LIBADD = ../common-src/libamanda.$(LIB_EXTENSION)
- ###
- # Because libamanda includes routines (e.g. regex) provided by some system
- # libraries, and because of the way libtool sets up the command line, we
- # need to list libamanda twice here, first to override the system library
- # routines, and second to pick up any references in the other libraries.
- ###
- LDADD = ../common-src/libamanda.$(LIB_EXTENSION) \
- libamtape.$(LIB_EXTENSION) \
- ../common-src/libamanda.$(LIB_EXTENSION)
- # used for testing only
- TEST_PROGS = amtapeio
- EXTRA_PROGRAMS = $(TEST_PROGS)
- CLEANFILES = *.test.c
- amtapetype_SOURCES = tapetype.c
- noinst_HEADERS = \
- output-file.h \
- output-null.h \
- output-rait.h \
- output-tape.h \
- tapeio.h
- INSTALLPERMS_exec = \
- dest=$(sbindir) chown=amanda $(sbin_PROGRAMS) $(sbin_SCRIPTS) \
- dest=$(amlibexecdir) chown=amanda $(amlibexec_PROGRAMS) $(amlibexec_SCRIPTS)
- amtapeio_SOURCES = amtapeio.test.c
- amtapeio_LDADD = ../common-src/libamanda.$(LIB_EXTENSION) \
- libamtape.$(LIB_EXTENSION) \
- ../common-src/libamanda.$(LIB_EXTENSION)
- amtapeio.test.c: $(srcdir)/tapeio.c
- echo '#define TEST' >$@
- echo '#include "$<"' >>$@
- %.test.c: $(srcdir)/%.c
- echo '#define TEST' >$@
- echo '#include "$<"' >>$@
- tapetype:
- @echo "Use amtapetype instead"
- lint:
- @ for p in $(sbin_PROGRAMS); do \
- if [ $$p = "amtapetype" ]; then \
- s="$(amtapetype_SOURCES)"; \
- else \
- s=$$p.c; \
- fi; \
- f="$$s $(libamandad_la_SOURCES)"; \
- f="$$f "`(cd ../common-src; make listlibsrc 2>&1 > /dev/null)`; \
- (cd ../common-src; make listlibsrc); \
- f="$$f "`cat ../common-src/listlibsrc.output`; \
- echo $(LINT) $$f; \
- $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config \
- $(INCLUDES) $$f; \
- if [ $$? -ne 0 ]; then \
- exit 1; \
- fi; \
- done; \
- exit 0
- listlibsrc:
- @ for p in $(libamtape_la_SOURCES); do \
- listlibsrcs="$$listlibsrcs `pwd`/$$p"; \
- done; \
- echo $$listlibsrcs > listlibsrc.output