Update.
[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 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 = 0.3
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_DIR=\"${CHISE_DB_DIR}/\" \
49         -DCHISE_SI_DB_DIR=\"${CHISE_SI_DB_DIR}/\"
50
51 VERSION         = @PACKAGE_VERSION@
52 ABI_VERSION     = 2:0:1
53
54
55 HEADERS = chise.h chise-name.h
56 OBJS    = chise.lo name.lo
57
58
59 all:    libchise.la
60
61 libchise.la:    $(OBJS)
62         $(LIBTOOL) --mode=link \
63                 $(CC) -o libchise.la $(OBJS) $(LIBS) \
64                 -rpath ${libdir} -version-info $(ABI_VERSION)
65
66 chise.lo:       chise.c chise.h config.h sysdep.h
67         $(LIBTOOL) $(CC) $(CHISE_CFLAGS) $(CFLAGS) chise.c
68
69 name.lo:        name.c chise-name.h
70         $(LIBTOOL) $(CC) $(CFLAGS) name.c
71
72
73 install:        install.h install.libs
74
75 install.h:
76         install -c $(HEADERS) $(INCLUDE_INSTALLDIR)
77
78 install.libs:   libchise.la
79         $(LIBTOOL) install -c libchise.la $(LIB_INSTALLDIR)
80
81
82 sample: sample.c libchise.la
83         gcc -Wall -Wmissing-prototypes -o sample sample.c -lchise
84
85
86 clean:
87         -$(RM) -r *.o *.lo *.so *.la .libs sample
88
89 distclean: clean
90         -$(RM) Makefile config.h config.status config.log
91
92
93 tar:
94         cvs commit
95         sh -c 'cvs tag -R libchise-`echo $(VERSION) \
96                                 | sed s/\\\\./_/ | sed s/\\\\./_/`; \
97         cd /tmp; \
98         cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/chise \
99                 export -d libchise-$(VERSION) \
100                 -r libchise-`echo $(VERSION) | tr . _` libchise'
101         cd /tmp; $(RM) libchise-$(VERSION)/.cvsignore ; \
102                 $(TAR) cvzf libchise-$(VERSION).tar.gz libchise-$(VERSION)
103         cd /tmp; $(RM) -r libchise-$(VERSION)