New files.
[chise/concord.git] / Makefile.in
1 CC = @CC@
2 DEFS = @DEFS@
3 LIBS = @LIBS@
4 CFLAGS  = -I. @CFLAGS@ -c -Wall -Wmissing-prototypes $(DEFS)
5
6 LIBTOOL = @LIBTOOL@
7
8 RM      = /bin/rm -f
9 TAR     = tar
10 MKDIR   = mkdir -p
11
12
13 ## The default location for installation.  Everything is placed in
14 ## subdirectories of this directory.  The default values for many of
15 ## the variables below are expressed in terms of this one, so you may
16 ## not need to change them.  This defaults to /usr/local.
17 prefix  = @prefix@
18
19 ## Like `prefix', but used for architecture-specific files.
20 exec_prefix = @exec_prefix@
21
22 datadir = @datadir@
23
24 libdir  = @libdir@
25
26 #libexecdir = @libexecdir@
27
28 localstatedir = @localstatedir@
29
30 sharedstatedir = @sharedstatedir@
31
32 #target = @target@
33
34 top_builddir = @builddir@
35
36
37 INCLUDE_INSTALLDIR = ${prefix}/include
38 LIB_INSTALLDIR  = ${libdir}
39
40 CONCORD_DB_PREFIX = ${localstatedir}/concord
41 CONCORD_DB_FORMAT_VERSION = 1.0
42 CONCORD_DB_DIR  = ${CONCORD_DB_PREFIX}/${CONCORD_DB_FORMAT_VERSION}
43 CONCORD_SI_DB_DIR = ${CONCORD_DB_DIR}/db
44
45 CONCORD_CFLAGS  = \
46         -DCONCORD_DB_FORMAT_VERSION=\"${CONCORD_DB_FORMAT_VERSION}/\" \
47         -DCONCORD_DB_DIR=\"${CONCORD_DB_DIR}/\" \
48         -DCONCORD_SI_DB_DIR=\"${CONCORD_SI_DB_DIR}/\"
49
50 VERSION         = @PACKAGE_VERSION@
51 ABI_VERSION     = 2:0:1
52
53
54 HEADERS = cos.h concord.h concord-name.h concord-bdb.h
55 OBJS    = cos.lo symbol.lo read.lo print.lo concord.lo concord-bdb.lo \
56                 name.lo cos-hash.lo
57
58 all:    libconcord.la
59
60 libconcord.la:  $(OBJS)
61         $(LIBTOOL) --mode=link \
62                 $(CC) -o libconcord.la $(OBJS) $(LIBS) \
63                 -rpath ${libdir} -version-info $(ABI_VERSION) \
64                 -no-undefined
65
66 cos.lo: cos.c cos-i.h cos-hash.h cos-read.h cos.h concord.h config.h sysdep.h Makefile
67         $(LIBTOOL) --mode=compile $(CC) $(CONCORD_CFLAGS) $(CFLAGS) cos.c
68
69 symbol.lo:      symbol.c cos-i.h cos-hash.h cos.h config.h sysdep.h Makefile
70         $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) symbol.c
71
72 read.lo:        read.c cos-read.h Makefile
73         $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) read.c
74
75 print.lo:       print.c cos-print.h Makefile
76         $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) print.c
77
78 concord.lo:     concord.c cos-i.h cos-hash.h cos.h concord.h config.h sysdep.h
79         $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) concord.c
80
81 concord-bdb.lo: concord-bdb.c concord-bdb.h concord-name.h
82         $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) concord-bdb.c
83
84 name.lo:        name.c concord-name.h hash-i.h
85         $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) name.c
86
87 cos-hash.lo:    cos-hash.c concord-name.h cos-hash.h hash-i.h
88         $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) cos-hash.c
89
90
91 install:        install.h install.libs
92
93 install.h:
94         $(MKDIR) $(INCLUDE_INSTALLDIR)
95         install -c $(HEADERS) $(INCLUDE_INSTALLDIR)
96
97 install.libs:   libconcord.la
98         $(MKDIR) $(LIB_INSTALLDIR)
99         $(LIBTOOL) --mode=install install -c libconcord.la $(LIB_INSTALLDIR)
100
101
102 sample: sample.c libconcord.la
103         gcc -Wall -Wmissing-prototypes -o sample sample.c -lconcord
104
105 symbol-test:    symbol-test.c libconcord.la
106         gcc -Wall -Wmissing-prototypes -o symbol-test symbol-test.c -lconcord
107
108 hash-test:      hash-test.c libconcord.la
109         gcc -Wall -Wmissing-prototypes -o hash-test hash-test.c -lconcord
110
111
112 clean:
113         -$(RM) -r *.o *.lo *.so *.la .libs sample
114
115 distclean: clean
116         -$(RM) Makefile config.h config.status config.log
117
118
119 tar:
120         cvs commit
121         sh -c 'cvs tag -R concord-`echo $(VERSION) \
122                                 | sed s/\\\\./_/ | sed s/\\\\./_/`; \
123         cd /tmp; \
124         cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/chise \
125                 export -d concord-$(VERSION) \
126                 -r concord-`echo $(VERSION) | tr . _` concord'
127         cd /tmp; $(RM) concord-$(VERSION)/.cvsignore ; \
128                 $(TAR) cvzf concord-$(VERSION).tar.gz concord-$(VERSION)
129         cd /tmp; $(RM) -r concord-$(VERSION)