update.
[chise/libchise.git] / Makefile.in
1 CC = @CC@
2 DEFS = @DEFS@
3 LIBS = @LIBS@
4 CFLAGS  = @CFLAGS@ -c -Wall -Wmissing-prototypes @DEFS@
5
6 LIBTOOL = @LIBTOOL@
7
8 RM      = /bin/rm -f
9 TAR     = tar
10
11
12 ## The default location for installation.  Everything is placed in
13 ## subdirectories of this directory.  The default values for many of
14 ## the variables below are expressed in terms of this one, so you may
15 ## not need to change them.  This defaults to /usr/local.
16 prefix  = @prefix@
17
18 ## Like `prefix', but used for architecture-specific files.
19 exec_prefix = @exec_prefix@
20
21 datadir = @datadir@
22
23 libdir  = @libdir@
24
25 #libexecdir = @libexecdir@
26
27 #localstatedir = @localstatedir@
28
29 sharedstatedir = @sharedstatedir@
30
31 #target = @target@
32
33 top_builddir = @builddir@
34
35
36 INCLUDE_INSTALLDIR = ${prefix}/include
37 LIB_INSTALLDIR  = ${libdir}
38 #CHISE_DIR_PREFIX = ${libexecdir}/chise
39 CHISE_DIR_PREFIX = ${datadir}/chise
40 #CHISE_DIR_PREFIX = ${sharedstatedir}/chise
41 CHISE_DIR_VERSION = 1.0
42 CHISE_DIR       = ${CHISE_DIR_PREFIX}/${CHISE_DIR_VERSION}
43 #CHISE_DB_DIR   = ${CHISE_DIR}/${target}
44 CHISE_DB_DIR    = ${CHISE_DIR}
45 CHISE_SI_DB_DIR = ${CHISE_DB_DIR}/db
46
47 CHISE_CFLAGS    = \
48         -DCHISE_DB_FORMAT_VERSION=\"${CHISE_DIR_VERSION}/\" \
49         -DCHISE_DB_DIR=\"${CHISE_DB_DIR}/\" \
50         -DCHISE_SI_DB_DIR=\"${CHISE_SI_DB_DIR}/\"
51
52 VERSION         = @PACKAGE_VERSION@
53 ABI_VERSION     = 4:0:3
54
55
56 HEADERS = chise.h
57 OBJS    = chise.lo
58
59
60 all:    libchise.la
61
62 libchise.la:    $(OBJS)
63         $(LIBTOOL) --mode=link \
64                 $(CC) -o libchise.la $(OBJS) $(LIBS) \
65                 -rpath ${libdir} -version-info $(ABI_VERSION) \
66                 -no-undefined
67
68 chise.lo:       chise.c chise.h config.h sysdep.h
69         $(LIBTOOL) --mode=compile $(CC) $(CHISE_CFLAGS) $(CFLAGS) chise.c
70
71
72 install:        install.h install.libs
73
74 install.h:
75         install -c $(HEADERS) $(INCLUDE_INSTALLDIR)
76
77 install.libs:   libchise.la
78         $(LIBTOOL) --mode=install install -c libchise.la $(LIB_INSTALLDIR)
79
80
81 sample: sample.c libchise.la
82         gcc -Wall -Wmissing-prototypes -o sample sample.c -lchise
83
84
85 clean:
86         -$(RM) -r *.o *.lo *.so *.la .libs sample
87
88 distclean: clean
89         -$(RM) Makefile config.h config.status config.log
90         -$(RM) -r autom4te.cache autoscan.log configure.scan libtool
91
92 tar:
93         cvs commit
94         sh -c 'cvs tag -R libchise-`echo $(VERSION) \
95                                 | sed s/\\\\./_/ | sed s/\\\\./_/`; \
96         cd /tmp; \
97         cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/chise \
98                 export -d libchise-$(VERSION) \
99                 -r libchise-`echo $(VERSION) | tr . _` libchise'
100         cd /tmp; $(RM) libchise-$(VERSION)/.cvsignore ; \
101                 $(TAR) cvzf libchise-$(VERSION).tar.gz libchise-$(VERSION)
102         cd /tmp; $(RM) -r libchise-$(VERSION)