1##  Makefile.am -- an automake template for Makefile.in file
2##  Copyright (C) 2009 Chris Bagwell and Sane Developers.
3##
4##  This file is part of the "Sane" build infra-structure.  See
5##  included LICENSE file for license information.
6
7EXTRA_PROGRAMS = test tstbackend
8
9bin_PROGRAMS = scanimage
10
11if COMPILE_SANED
12sbin_PROGRAMS = saned
13else
14EXTRA_PROGRAMS += saned
15endif
16
17AM_CPPFLAGS += -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include
18
19scanimage_SOURCES = scanimage.c jpegtopdf.c jpegtopdf.h sicc.c sicc.h stiff.c stiff.h
20scanimage_LDADD = ../backend/libsane.la ../sanei/libsanei.la ../lib/liblib.la \
21                  $(PNG_LIBS) $(JPEG_LIBS)
22
23saned_SOURCES = saned.c
24saned_CPPFLAGS = $(AM_CPPFLAGS) $(AVAHI_CFLAGS)
25saned_LDADD = ../backend/libsane.la ../sanei/libsanei.la ../lib/liblib.la \
26              $(SYSLOG_LIBS) $(SYSTEMD_LIBS) $(AVAHI_LIBS)
27
28test_SOURCES = test.c
29test_LDADD = ../lib/liblib.la ../backend/libsane.la
30
31tstbackend_SOURCES = tstbackend.c
32tstbackend_LDADD = ../lib/liblib.la ../backend/libsane.la
33
34if preloadable_backends_enabled
35if WITH_GENESYS_TESTS
36##  Because the genesys backend is implemented in C++, programs need
37##  to link against the standard C++ library.  The work-around below
38##  will work for the GNU C++ compiler with the GNU standard library
39##  for C++.  Other build scenarios may need work.
40scanimage_LDADD += -lstdc++
41saned_LDADD += -lstdc++
42test_LDADD += -lstdc++
43tstbackend_LDADD += -lstdc++
44endif
45endif
46
47clean-local:
48	rm -f test tstbackend
49