1999-08-09 18:06:01 +00:00
|
|
|
SHELL = /bin/sh
|
|
|
|
|
|
|
|
VPATH = @srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
top_srcdir = @top_srcdir@
|
|
|
|
top_builddir = ..
|
|
|
|
|
2002-01-08 19:06:54 +00:00
|
|
|
PACKAGE = @PACKAGE@
|
|
|
|
VERSION = @VERSION@
|
|
|
|
distdir = $(top_srcdir)/$(PACKAGE)-$(VERSION)
|
|
|
|
|
1999-08-09 18:06:01 +00:00
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
bindir = @bindir@
|
|
|
|
sbindir = @sbindir@
|
|
|
|
libexecdir = @libexecdir@
|
|
|
|
datadir = @datadir@
|
|
|
|
sysconfdir = @sysconfdir@
|
|
|
|
sharedstatedir = @sharedstatedir@
|
|
|
|
localstatedir = @localstatedir@
|
|
|
|
libdir = @libdir@
|
|
|
|
infodir = @infodir@
|
|
|
|
mandir = @mandir@
|
|
|
|
includedir = @includedir@
|
|
|
|
oldincludedir = /usr/include
|
|
|
|
configdir = ${sysconfdir}/sane.d
|
|
|
|
|
|
|
|
MKDIR = $(top_srcdir)/mkinstalldirs
|
|
|
|
INSTALL = @INSTALL@
|
|
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
|
|
|
|
|
|
CC = @CC@
|
|
|
|
INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include \
|
2000-11-23 21:29:38 +00:00
|
|
|
@INCLUDES@
|
1999-08-09 18:06:01 +00:00
|
|
|
DEFS = @DEFS@
|
|
|
|
CPPFLAGS = @CPPFLAGS@
|
|
|
|
CFLAGS = @CFLAGS@
|
|
|
|
LDFLAGS = @LDFLAGS@
|
2002-07-08 18:07:07 +00:00
|
|
|
LIBS = @LIBS@
|
1999-08-09 18:06:01 +00:00
|
|
|
|
|
|
|
LIBTOOL = ../libtool
|
|
|
|
MINST = --mode=install
|
|
|
|
MLINK = --mode=link
|
|
|
|
SANED = @SANED@
|
|
|
|
|
|
|
|
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
|
|
|
LINK = $(CC) $(LDFLAGS) -o $@
|
|
|
|
|
2002-02-13 20:48:29 +00:00
|
|
|
DISTCLEAN_FILES = @DISTCLEAN_FILES@
|
|
|
|
|
1999-08-09 18:06:01 +00:00
|
|
|
@SET_MAKE@
|
|
|
|
|
2002-04-20 22:49:54 +00:00
|
|
|
BINPROGS = scanimage # tstbackend
|
1999-08-09 18:06:01 +00:00
|
|
|
SBINPROGS = $(SANED)
|
|
|
|
PROGRAMS = $(BINPROGS) $(SBINPROGS)
|
|
|
|
TESTPROGRAMS = test
|
|
|
|
LIBLIB = ../lib/liblib.a
|
|
|
|
LIBSANE = ../backend/libsane.la
|
|
|
|
LIBSANEI = ../sanei/libsanei.a
|
|
|
|
|
2000-08-12 15:11:46 +00:00
|
|
|
SCAN_OBJS = scanimage.o stiff.o
|
1999-08-09 18:06:01 +00:00
|
|
|
|
2002-04-24 17:57:23 +00:00
|
|
|
DISTFILES = Makefile.in saned.c scanimage.c stiff.c stiff.h test.c tstbackend.c
|
2002-01-08 19:06:54 +00:00
|
|
|
|
|
|
|
.PHONY: all clean depend dist distclean install uninstall
|
|
|
|
|
1999-08-09 18:06:01 +00:00
|
|
|
.c.o:
|
|
|
|
$(COMPILE) $<
|
|
|
|
|
|
|
|
all: $(PROGRAMS)
|
|
|
|
|
|
|
|
install: $(PROGRAMS)
|
2002-03-29 13:27:16 +00:00
|
|
|
$(MKDIR) $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) $(DESTDIR)$(datadir)
|
1999-08-09 18:06:01 +00:00
|
|
|
@for program in $(BINPROGS); do \
|
|
|
|
$(LIBTOOL) $(MINST) $(INSTALL_PROGRAM) $${program} \
|
2002-03-29 13:27:16 +00:00
|
|
|
$(DESTDIR)$(bindir)/$${program}; \
|
1999-08-09 18:06:01 +00:00
|
|
|
done
|
|
|
|
@for program in $(SBINPROGS); do \
|
|
|
|
$(LIBTOOL) $(MINST) $(INSTALL_PROGRAM) $${program} \
|
2002-03-29 13:27:16 +00:00
|
|
|
$(DESTDIR)$(sbindir)/$${program}; \
|
1999-08-09 18:06:01 +00:00
|
|
|
done
|
|
|
|
|
2001-05-21 20:20:54 +00:00
|
|
|
uninstall:
|
|
|
|
@for program in $(BINPROGS); do \
|
|
|
|
rm -f $(bindir)/$${program}; \
|
|
|
|
done
|
|
|
|
@for program in $(SBINPROGS); do \
|
|
|
|
rm -f $(sbindir)/$${program}; \
|
|
|
|
done
|
|
|
|
|
1999-08-09 18:06:01 +00:00
|
|
|
test: test.o $(LIBSANE) $(LIBLIB)
|
2003-05-03 20:48:15 +00:00
|
|
|
@$(LIBTOOL) $(MLINK) $(LINK) test.o $(LIBLIB) $(LIBSANE) $(LIBS)
|
1999-08-09 18:06:01 +00:00
|
|
|
|
|
|
|
saned: saned.o $(LIBSANEI) $(LIBSANE) $(LIBLIB)
|
2003-07-26 18:27:05 +00:00
|
|
|
@$(LIBTOOL) $(MLINK) $(LINK) saned.o \
|
|
|
|
$(LIBS) $(LIBSANE) $(LIBSANEI) $(LIBLIB)
|
1999-08-09 18:06:01 +00:00
|
|
|
|
2003-07-26 18:27:05 +00:00
|
|
|
scanimage: $(SCAN_OBJS) $(LIBSANEI) $(LIBSANE) $(LIBLIB)
|
|
|
|
@$(LIBTOOL) $(MLINK) $(LINK) $(SCAN_OBJS) \
|
|
|
|
$(LIBS) $(LIBSANE) $(LIBSANEI) $(LIBLIB)
|
1999-08-09 18:06:01 +00:00
|
|
|
|
2002-04-20 22:49:54 +00:00
|
|
|
# tstbackend is not compiled by default.
|
|
|
|
# To compile it, add tstbackend to BINPROGS.
|
2003-07-26 18:27:05 +00:00
|
|
|
tstbackend: tstbackend.o $(LIBSANE) $(LIBLIB) $(LIBSANEI)
|
|
|
|
@$(LIBTOOL) $(MLINK) $(LINK) tstbackend.o $(LIBLIB) $(LIBSANE) $(LIBSANEI) $(LIBS)
|
2002-04-20 22:49:54 +00:00
|
|
|
|
1999-08-09 18:06:01 +00:00
|
|
|
clean:
|
2002-04-20 22:49:54 +00:00
|
|
|
rm -f *.o tstbackend
|
1999-08-09 18:06:01 +00:00
|
|
|
rm -rf .libs
|
|
|
|
|
|
|
|
distclean: clean
|
2002-02-13 20:48:29 +00:00
|
|
|
rm -f $(DISTCLEAN_FILES)
|
1999-08-09 18:06:01 +00:00
|
|
|
rm -f Makefile $(PROGRAMS) $(TESTPROGRAMS)
|
|
|
|
|
|
|
|
depend:
|
|
|
|
makedepend $(INCLUDES) *.c
|
|
|
|
|
2002-01-08 19:06:54 +00:00
|
|
|
dist: $(DISTFILES)
|
|
|
|
for file in $(DISTFILES); do \
|
|
|
|
ln $$file $(distdir)/frontend 2> /dev/null \
|
|
|
|
|| cp -p $$file $(distdir)/frontend ; \
|
|
|
|
done
|
|
|
|
|