aboutsummaryrefslogtreecommitdiff
path: root/backend/Makefile.am
blob: 4a3633987866d57dc91a241574d3c5527ba056b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
##  Makefile.am -- an automake template for a Makefile.in file
##  Copyright (C) 2004, 2005, 2009  Olaf Meeuwissen
##
##  This file is part of the "Image Scan!" build infra-structure.
##
##  The "Image Scan!" build infra-structure is free software.
##  You can redistribute it and/or modify it under the terms of the GNU
##  General Public License as published by the Free Software Foundation;
##  either version 2 of the License or at your option any later version.
##
##  This program is distributed in the hope that it will be useful, but
##  WITHOUT ANY WARRANTY;  without even the implied warranty of FITNESS
##  FOR A PARTICULAR PURPOSE or MERCHANTABILITY.
##  See the GNU General Public License for more details.
##
##  You should have received a verbatim copy of the GNU General Public
##  License along with this program; if not, write to:
##
##      Free Software Foundation, Inc.
##      59 Temple Place, Suite 330
##      Boston, MA  02111-1307  USA


SUBDIRS = . \
	tests

AM_CPPFLAGS = \
	-DPIC \
	-DPKGDATADIR=\"$(datadir)/$(DATA_PKG_NAME)\" \
	-DMODELDATADIR=\"$(datadir)/$(DATA_PKG_NAME)/$(MODEL_DATA_DIR_NAME)\" \
	-DPKGLIBDIR=\"$(pkglibdir)\" \
	-DPKGLOCALSTATEDIR=\"$(localstatedir)/lib/$(PACKAGE_TARNAME)\" \
	-DSYSCONFDIR=\"$(sysconfdir)\" \
	-DENABLE_DEBUG=1 \
	-DMSG_MODULE=\"epkowa\" \
	-I$(top_srcdir)
AM_CFLAGS = \
	-fPIC

exec_sanelibdir = $(libdir)/sane
exec_sanelib_LTLIBRARIES = \
	libsane-epkowa.la

libsane_epkowa_la_CPPFLAGS = \
	$(AM_CPPFLAGS) \
	-DBACKEND_NAME=epkowa
libsane_epkowa_la_LDFLAGS = \
	-export-symbols-regex ^sane_ \
	-version-info $(SANE_MAJOR):$(SANE_REVISION):$(SANE_MINOR)
libsane_epkowa_la_LIBADD = \
	libepkowa.la
libsane_epkowa_la_SOURCES = \
	backend.c \
	backend.h

noinst_LTLIBRARIES = \
	libepkowa.la

libepkowa_la_CPPFLAGS = \
	$(AM_CPPFLAGS) \
	$(LTDLINCL) \
	-I$(top_srcdir)/include \
	-I$(top_srcdir)/non-free \
	$(XML_CFLAGS) \
	$(LIBUSB_1_0_CFLAGS) \
	-DV_MAJOR=$(SANE_MAJOR) -DV_MINOR=$(SANE_MINOR)
libepkowa_la_LDFLAGS = \
	-static
libepkowa_la_LIBADD = \
	-lm \
	$(XML_LIBS) \
	$(LIBUSB_1_0_LIBS) \
	$(LIBLTDL)
libepkowa_la_SOURCES = \
	$(sane_backends_files) \
	ipc.c \
	ipc.h \
	cfg-obj.c \
	cfg-obj.h \
	command.c \
	command.h \
	defines.h \
	hw-data.c \
	hw-data.h \
	message.c \
	message.h \
	net-obj.c \
	net-obj.h \
	dip-obj.c \
	dip-obj.h \
	device.c \
	device.h \
	timing.c \
	timing.h \
	utils.c \
	utils.h \
	epkowa_ip.c \
	epkowa_ip.h \
	epkowa_ip_api.h \
	channel.c \
	channel.h \
	channel-net.c \
	channel-pio.c \
	channel-scsi.c \
	channel-usb.c \
	model-info.c \
	model-info.h \
	list.h \
	list.c \
	get-infofile.h \
	get-infofile.c \
	xmlreader.h \
	xmlreader.c

if ENABLE_TIMING
libepkowa_la_CPPFLAGS += -DENABLE_TIMING=1
libepkowa_la_LIBADD   += -lrt
endif

EXTRA_DIST = \
	extension.h \
	profile.c \
	epkowa.conf

sane_backends_files = \
	../include/sane/sanei.h \
	../include/sane/sanei_config.h \
	../include/sane/sanei_debug.h \
	../include/sane/sanei_magic.h \
	../include/sane/sanei_pio.h \
	../include/sane/sanei_scsi.h \
	../include/sane/sanei_usb.h \
	../sanei/linux_sg3_err.h \
	../sanei/sanei_config.c \
	../sanei/sanei_constrain_value.c \
	../sanei/sanei_init_debug.c \
	../sanei/sanei_magic.c \
	../sanei/sanei_pio.c \
	../sanei/sanei_scsi.c \
	../sanei/sanei_usb.c \
	epkowa.c \
	epkowa.h \
	epkowa_scsi.c \
	epkowa_scsi.h


##  There should be NO libsane.so symlink in $(exec_sanelibdir), but
##  libtool insists on making one for us anyway.
##
install-exec-hook:
	-rm -f $(DESTDIR)$(exec_sanelibdir)/libsane.so.$(SANE_MAJOR)


##  Minimal sanity checks on the backends we distribute.
##  WARNING: These checks may fail on non-Linux systems for a variety
##           of reasons.  If you know why, we would like to know (and
##           patches are naturally welcome).
check-local:
	for d in .libs _libs; do \
	  test -d $$d || continue; \
	  for l in $$d/libsane-*.so; do \
	    soname=`objdump -p $$l | awk '/SONAME/ {print $$2}'`; \
	    if test "$$soname" != "libsane.so.$(SANE_MAJOR)"; then \
	      echo "$$l: libsane.so.$(SANE_MAJOR) != $$soname"; \
	      exit 1; \
	    fi; \
	  done; \
	done