New file [separate from chise.c].
[chise/libchise.git] / Makefile.in
1 CC = @CC@
2 DEFS = @DEFS@
3 LIBS = @LIBS@ -ldb
4 CFLAGS  = @CFLAGS@ -c
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=/usr/local
16
17 ## Like `prefix', but used for architecture-specific files.
18 exec_prefix=${prefix}
19
20 ## Where to install and expect executable files to be run by XEmacs
21 ## rather than directly by users, and other architecture-dependent data
22 ## ${archlibdir} is a subdirectory of this.
23 libdir=${exec_prefix}/lib
24
25
26 INCLUDE_INSTALLDIR = ${prefix}/include
27 LIB_INSTALLDIR  = ${libdir}
28 DB_INSTALLDIR   = ${libdir}/chise
29
30
31 VERSION         = @PACKAGE_VERSION@
32
33 ABI_VERSION     = 1:0:0
34
35 HEADERS = chise.h chise-name.h
36 OBJS    = chise.lo name.lo
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
46         $(LIBTOOL) $(CC) $(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 install.db
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 install.db:
61         -mkdir -p $(DB_INSTALLDIR)
62         ln -sf `xemacs -q -batch -eval '(princ (file-name-as-directory exec-directory))'`char-db $(DB_INSTALLDIR)
63
64
65 sample: sample.c libchise.la
66         gcc -o sample sample.c -lchise
67
68
69 clean:
70         -$(RM) -r *.o *.lo *.so *.la .libs sample
71
72 distclean: clean
73         -$(RM) Makefile config.h config.status config.log