Add header.
[chise/libchise.git] / Makefile.in
1 CC = @CC@
2 DEFS = @DEFS@
3 LIBS = @LIBS@
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 #localstatedir = @localstatedir@
25
26 target  = @target@
27
28 top_builddir = @builddir@
29
30
31 INCLUDE_INSTALLDIR = ${prefix}/include
32 LIB_INSTALLDIR  = ${libdir}
33 CHISE_DIR_PREFIX = ${libexecdir}/chise
34 CHISE_DIR_VERSION = 0.2
35 CHISE_DIR       = ${CHISE_DIR_PREFIX}/${CHISE_DIR_VERSION}
36 CHISE_DB_DIR    = ${CHISE_DIR}/${target}
37 CHISE_SI_DB_DIR = ${CHISE_DB_DIR}/db
38
39 CHISE_CFLAGS    = \
40         -DCHISE_DB_DIR=\"${CHISE_DB_DIR}/\" \
41         -DCHISE_SI_DB_DIR=\"${CHISE_SI_DB_DIR}/\"
42
43 VERSION         = @PACKAGE_VERSION@
44 ABI_VERSION     = 1:0:0
45
46
47 HEADERS = chise.h chise-name.h
48 OBJS    = chise.lo name.lo
49
50
51 all:    libchise.la
52
53 libchise.la:    $(OBJS)
54         $(LIBTOOL) --mode=link \
55                 $(CC) -o libchise.la $(OBJS) $(LIBS) \
56                 -rpath ${libdir} -version-info $(ABI_VERSION)
57
58 chise.lo:       chise.c chise.h config.h sysdep.h
59         $(LIBTOOL) $(CC) $(CHISE_CFLAGS) $(CFLAGS) chise.c
60
61 name.lo:        name.c chise-name.h
62         $(LIBTOOL) $(CC) $(CFLAGS) name.c
63
64
65 install:        install.h install.libs
66
67 install.h:
68         install -c $(HEADERS) $(INCLUDE_INSTALLDIR)
69
70 install.libs:   libchise.la
71         $(LIBTOOL) install -c libchise.la $(LIB_INSTALLDIR)
72
73
74 sample: sample.c libchise.la
75         gcc -Wall -Wmissing-prototypes -o sample sample.c -lchise
76
77
78 clean:
79         -$(RM) -r *.o *.lo *.so *.la .libs sample
80
81 distclean: clean
82         -$(RM) Makefile config.h config.status config.log