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 7AM_CPPFLAGS += -I. -I$(srcdir) -I$(top_builddir)/include \ 8 -I$(top_srcdir)/include $(USB_CFLAGS) 9 10bin_PROGRAMS = sane-find-scanner gamma4scanimage 11noinst_PROGRAMS = sane-desc 12if INSTALL_UMAX_PP_TOOLS 13bin_PROGRAMS += umax_pp 14endif 15 16if CROSS_COMPILING 17HOTPLUG = 18HOTPLUG_DIRS = 19HOTPLUG_DIR = 20else 21HOTPLUG = hal/libsane.fdi hotplug/libsane.usermap hotplug-ng/libsane.db \ 22 udev/libsane.rules 23HOTPLUG_DIRS = hal hotplug hotplug-ng udev 24HOTPLUG_DIR = dirs 25endif 26 27bin_SCRIPTS = sane-config 28noinst_SCRIPTS = $(HOTPLUG) 29BUILT_SOURCES = $(HOTPLUG_DIR) 30CLEANFILES = $(bin_SCRIPTS) $(dist_noinst_SCRIPTS) 31 32EXTRA_DIST = check-po.awk libtool-get-dll-ext mustek600iin-off.c \ 33 RenSaneDlls.cmd README xerox 34EXTRA_DIST += style-check.sh 35EXTRA_DIST += create-changelog.sh 36EXTRA_DIST += update-upstreams.sh 37EXTRA_DIST += epson2usb.pl 38 39sane_find_scanner_SOURCES = sane-find-scanner.c 40if have_usblib 41sane_find_scanner_SOURCES += check-usb-chip.c 42endif 43sane_find_scanner_LDADD = ../sanei/libsanei.la ../lib/liblib.la \ 44 $(USB_LIBS) $(IEEE1284_LIBS) $(SCSI_LIBS) $(XML_LIBS) \ 45 ../backend/sane_strstatus.lo 46 47gamma4scanimage_SOURCES = gamma4scanimage.c 48gamma4scanimage_LDADD = $(MATH_LIB) 49 50umax_pp_SOURCES = umax_pp.c 51umax_pp_SOURCES += ../backend/umax_pp_low.c 52umax_pp_LDADD = ../sanei/libsanei.la ../lib/liblib.la $(MATH_LIB) 53 54sane_desc_SOURCES = sane-desc.c 55sane_desc_LDADD = ../sanei/libsanei.la ../lib/liblib.la 56 57EXTRA_DIST += hotplug/README hotplug/libusbscanner 58EXTRA_DIST += hotplug-ng/README hotplug-ng/libsane.hotplug 59EXTRA_DIST += openbsd/attach openbsd/detach 60 61pkgconfigdir = @libdir@/pkgconfig 62pkgconfig_DATA = sane-backends.pc 63 64# When build directory is not same as source directory then any 65# subdirectories that targets use must be manually created (under 66# the build directory that is). 67dirs: 68 for subdir in $(HOTPLUG_DIRS); do \ 69 $(MKDIR_P) $$subdir || exit 1; \ 70 done 71 72descriptions = ${top_srcdir}/doc/descriptions/*.desc ${top_srcdir}/doc/descriptions-external/*.desc 73 74hotplug/libsane.usermap: sane-desc $(descriptions) 75 @./sane-desc -m usermap -s ${top_srcdir}/doc/descriptions:${top_srcdir}/doc/descriptions-external \ 76 -d 1 > $@ 77 78hotplug-ng/libsane.db: sane-desc $(descriptions) 79 @./sane-desc -m db -s ${top_srcdir}/doc/descriptions:${top_srcdir}/doc/descriptions-external \ 80 -d 0 > $@ 81 82udev/libsane.rules: sane-desc $(descriptions) 83 @./sane-desc -m udev -s ${top_srcdir}/doc/descriptions:${top_srcdir}/doc/descriptions-external \ 84 -d 0 > $@ 85 86hal/libsane.fdi: sane-desc $(descriptions) 87 @./sane-desc -m hal -s ${top_srcdir}/doc/descriptions:${top_srcdir}/doc/descriptions-external \ 88 -d 0 > $@ 89 90clean-local: 91 rm -f $(HOTPLUG) 92