(SIZEOF_INT): New macro.
[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 = 2.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     = 1:0:1
52
53
54 HEADERS = cos.h concord.h concord-name.h concord-bdb.h
55 OBJS    = cos.lo symbol.lo read.lo concord.lo concord-bdb.lo name.lo
56
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-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.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 concord.lo:     concord.c cos-i.h cos.h concord.h config.h sysdep.h
76         $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) concord.c
77
78 concord-bdb.lo: concord-bdb.c concord-bdb.h concord-name.h
79         $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) concord-bdb.c
80
81 name.lo:        name.c concord-name.h
82         $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) name.c
83
84
85 install:        install.h install.libs
86
87 install.h:
88         $(MKDIR) $(INCLUDE_INSTALLDIR)
89         install -c $(HEADERS) $(INCLUDE_INSTALLDIR)
90
91 install.libs:   libconcord.la
92         $(MKDIR) $(LIB_INSTALLDIR)
93         $(LIBTOOL) --mode=install install -c libconcord.la $(LIB_INSTALLDIR)
94
95
96 sample: sample.c libconcord.la
97         gcc -Wall -Wmissing-prototypes -o sample sample.c -lconcord
98
99
100 clean:
101         -$(RM) -r *.o *.lo *.so *.la .libs sample
102
103 distclean: clean
104         -$(RM) Makefile config.h config.status config.log
105
106
107 tar:
108         cvs commit
109         sh -c 'cvs tag -R concord-`echo $(VERSION) \
110                                 | sed s/\\\\./_/ | sed s/\\\\./_/`; \
111         cd /tmp; \
112         cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/chise \
113                 export -d concord-$(VERSION) \
114                 -r concord-`echo $(VERSION) | tr . _` concord'
115         cd /tmp; $(RM) concord-$(VERSION)/.cvsignore ; \
116                 $(TAR) cvzf concord-$(VERSION).tar.gz concord-$(VERSION)
117         cd /tmp; $(RM) -r concord-$(VERSION)