summaryrefslogtreecommitdiff
path: root/src/Makefile.in
blob: af064d0369ea8eadb659b245f394eb9e51704581 (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
SHELL = /bin/sh

VPATH = @srcdir@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ..

PACKAGE = @PACKAGE@
VERSION = @VERSION@
distdir = $(top_srcdir)/$(PACKAGE)-$(VERSION)

sane_prefix = @SANE_PREFIX@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
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
sanedatadir = ${datadir}/sane

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 \
	@INCLUDES@ @GTK_CFLAGS@ @GIMP_CFLAGS@
DEFS        = @DEFS@
CPPFLAGS    = @CPPFLAGS@
CFLAGS      = @CFLAGS@ @SANE_CFLAGS@
LDFLAGS     = @LDFLAGS@ @SANE_LDFLAGS@
LIBS        = @LIBS@ @SANE_LIBS@
GTK_LIBS    = @GTK_LIBS@
GTK_CFLAGS  = @GTK_CFLAGS@
GIMP_LIBS   = @GIMP_LIBS@

BINPROGS = @BINPROGS@

COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(GTK_CFLAGS)
LINK = $(CC) $(LDFLAGS) -o $@

@SET_MAKE@

PROGRAMS = $(BINPROGS)
LIBLIB = ../lib/liblib.a
LIBSANEI = ../sanei/libsanei.a

XSCANIMAGE_OBJS = xscanimage.o progress.o preview.o preferences.o gtkglue.o
XCAM_OBJS = xcam.o preferences.o gtkglue.o
SCANADF_OBJS = scanadf.o

DISTFILES = Makefile.in gtkglue.c gtkglue.h preferences.c preferences.h \
  preview.c preview.h progress.c progress.h sane-style.rc xcam.c \
  xscanimage-gimp-1_0-compat.h xscanimage.c scanadf.c font_6x11.h

.PHONY: all clean depend dist distclean install uninstall

.c.o:
	$(COMPILE) $<

all: $(PROGRAMS)

install: $(PROGRAMS)
	@if test -z "$(BINPROGS)" ; then \
	  echo "*** The list of frontends to install is empty." ; \
	  echo "*** Check the output of configure and the file config.log," ; \
	  echo "*** maybe the GTK libraries weren't found?" ; \
	  exit 1 ; \
	fi
	$(MKDIR) $(DESTDIR)$(bindir) $(DESTDIR)$(datadir) $(DESTDIR)$(sanedatadir)
	@for program in $(BINPROGS); do \
	  echo installing $${program} in $(bindir)/$${program}... ; \
	  $(INSTALL_PROGRAM) $${program} \
	    $(DESTDIR)$(bindir)/$${program}; \
	done
	$(INSTALL_DATA) $(srcdir)/sane-style.rc \
          $(DESTDIR)$(sanedatadir)/sane-style.rc

uninstall:
	@for program in $(BINPROGS); do \
	  echo removing $(bindir)/$${program}...; \
	  rm -f $(bindir)/$${program}; \
	done
	rm -f $(sanedatadir)/sane-style.rc

xscanimage: $(XSCANIMAGE_OBJS) $(LIBSANEI) $(LIBLIB)
	$(LINK) $(XSCANIMAGE_OBJS) $(LIBSANEI) \
		$(LIBLIB) $(GIMP_LIBS) $(GTK_LIBS) $(LIBS)

xcam: $(XCAM_OBJS) $(LIBSANEI) $(LIBLIB)
	$(LINK) $(XCAM_OBJS) $(LIBSANEI) \
		$(LIBLIB) $(GTK_LIBS) $(LIBS)

scanadf: $(SCANADF_OBJS) $(LIBLIB)
	$(LINK) $(SCANADF_OBJS) $(LIBLIB) $(LIBS)

clean:
	rm -f *.o *~ .*~ *.bak
	rm -rf .libs

distclean: clean
	rm -f Makefile $(PROGRAMS)

depend:
	makedepend $(INCLUDES) *.c

dist: $(DISTFILES)
	for file in $(DISTFILES); do \
	  ln $$file $(distdir)/src 2> /dev/null \
	    || cp -p $$file $(distdir)/src ; \
	done