b36371d0ccde4f343aaff161a0a363b310df7f5d
[chise/libchise.git] / Makefile.in
1 CC = @CC@
2 DEFS = @DEFS@
3 LIBS = @LIBS@ -ldb
4 CFLAGS  = @CFLAGS@ -c -Wall -Wmissing-prototypes
5
6 LIBTOOL = @LIBTOOL@
7
8 RM      = /bin/rm -f
9
10
11 ## The default location for installation.  Everything is placed in
12 ## subdirectories of this directory.  The default values for many of
13 ## the variables below are expressed in terms of this one, so you may
14 ## not need to change them.  This defaults to /usr/local.
15 prefix  = @prefix@
16
17 ## Like `prefix', but used for architecture-specific files.
18 exec_prefix = @exec_prefix@
19
20 libdir  = @libdir@
21
22 libexecdir = @libexecdir@
23
24
25 INCLUDE_INSTALLDIR = ${prefix}/include
26 LIB_INSTALLDIR  = ${libdir}
27 DB_DIR          = ${libexecdir}/chise/0.2/
28
29
30 VERSION         = @PACKAGE_VERSION@
31 ABI_VERSION     = 1:0:0
32
33
34 HEADERS = chise.h chise-name.h
35 OBJS    = chise.lo name.lo
36
37
38 all:    libchise.la
39
40 libchise.la:    $(OBJS)
41         $(LIBTOOL) --mode=link \
42                 $(CC) -o libchise.la $(OBJS) $(LIBS) \
43                 -rpath ${libdir} -version-info $(ABI_VERSION)
44
45 chise.lo:       chise.c chise.h config.h sysdep.h
46         $(LIBTOOL) $(CC) -DCHISE_DB_DIR=\"${DB_DIR}\" $(CFLAGS) chise.c
47
48 name.lo:        name.c chise-name.h
49         $(LIBTOOL) $(CC) $(CFLAGS) name.c
50
51
52 install:        install.h install.libs
53
54 install.h:
55         install -c $(HEADERS) $(INCLUDE_INSTALLDIR)
56
57 install.libs:   libchise.la
58         $(LIBTOOL) install -c libchise.la $(LIB_INSTALLDIR)
59
60
61 sample: sample.c libchise.la
62         gcc -Wall -Wmissing-prototypes -o sample sample.c -lchise
63
64
65 clean:
66         -$(RM) -r *.o *.lo *.so *.la .libs sample
67
68 distclean: clean
69         -$(RM) Makefile config.h config.status config.log