root/gsdl/trunk/common-src/packages/gdbm/gdbm-1.8.3/Makefile.in @ 18019

Revision 18019, 7.9 KB (checked in by mdewsnip, 11 years ago)

Added gdbm-1.8.3 (downloaded as gdbm-1.8.3.tar.gz and unpacked), in preparation for adding code for reading both little and big endian databases.

Line 
1#### Start of system configuration section. ####
2
3srcdir = @srcdir@
4top_builddir = .
5VPATH = @srcdir@
6
7CC = @CC@
8LIBTOOL = @LIBTOOL@
9
10# GDBM 1.8.3 builds shared libraries version 3.0
11SHLIB_VER = 3 0 0
12
13INSTALL = @INSTALL@
14INSTALL_PROGRAM = @INSTALL_PROGRAM@
15INSTALL_DATA = @INSTALL_DATA@
16
17# File ownership and group
18BINOWN = bin
19BINGRP = bin
20
21MAKEINFO = makeinfo
22TEXI2DVI = texi2dvi
23
24DEFS =
25
26# Where the system [n]dbm routines are...
27LIBS = @LIBS@ -lc
28
29CFLAGS = @CFLAGS@
30LDFLAGS = @LDFLAGS@
31
32# Common prefix for installation directories
33prefix = @prefix@
34exec_prefix = @exec_prefix@
35binprefix = $(exec_prefix)
36manprefix = $(prefix)
37
38# Directory in which to put libgdbm.a.
39libdir = @libdir@
40# The include directory for gdbm.h and dbm.h.
41includedir = @includedir@
42# Info and man directories.
43infodir = @infodir@
44man3dir = @mandir@/man3
45manext = 3
46
47#### End of system configuration section. ####
48
49.SUFFIXES:
50.SUFFIXES: .c .lo .o
51
52.c.o:
53    $(CC) -c $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) $(CFLAGS) $<
54
55.c.lo:
56    $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) $(CFLAGS) $<
57
58SHELL = /bin/sh
59
60PROGS = libgdbm.la testgdbm testdbm testndbm tndbm tdbm conv2gdbm
61
62DBM_CF = dbminit.c delete.c fetch.c store.c seq.c close.c
63
64NDBM_CF = dbmopen.c dbmdelete.c dbmfetch.c dbmstore.c dbmseq.c \
65    dbmclose.c dbmdirfno.c dbmpagfno.c dbmrdonly.c
66
67GDBM_CF = gdbmopen.c gdbmdelete.c gdbmfetch.c  gdbmstore.c gdbmclose.c \
68    gdbmreorg.c gdbmseq.c gdbmsync.c gdbmerrno.c gdbmexists.c gdbmfdesc.c \
69    gdbmsetopt.c bucket.c falloc.c findkey.c global.c hash.c update.c \
70    version.c
71
72TEST_CF = testdbm.c testndbm.c testgdbm.c
73
74
75DBM_OF = dbminit.o delete.o fetch.o store.o seq.o close.o
76
77NDBM_OF = dbmopen.o dbmdelete.o dbmfetch.o dbmstore.o dbmseq.o \
78    dbmclose.o dbmdirfno.o dbmpagfno.o dbmrdonly.o
79
80GDBM_OF = gdbmopen.o gdbmdelete.o gdbmfetch.o  gdbmstore.o gdbmclose.o \
81    gdbmreorg.o gdbmseq.o gdbmsync.o gdbmerrno.o gdbmexists.o gdbmfdesc.o \
82    gdbmsetopt.o bucket.o falloc.o findkey.o global.o hash.o update.o \
83    version.o
84
85DBM_LOF = dbminit.lo delete.lo fetch.lo store.lo seq.lo close.lo
86
87NDBM_LOF = dbmopen.lo dbmdelete.lo dbmfetch.lo dbmstore.lo dbmseq.lo \
88    dbmclose.lo dbmdirfno.lo dbmpagfno.lo dbmrdonly.lo
89
90GDBM_LOF = gdbmopen.lo gdbmdelete.lo gdbmfetch.lo  gdbmstore.lo gdbmclose.lo \
91    gdbmreorg.lo gdbmseq.lo gdbmsync.lo gdbmerrno.lo gdbmexists.lo \
92    gdbmfdesc.lo gdbmsetopt.lo bucket.lo falloc.lo findkey.lo global.lo \
93    hash.lo update.lo version.lo
94
95TEX_F = gdbm.aux gdbm.cp gdbm.dvi gdbm.fn gdbm.ky gdbm.log gdbm.pg \
96    gdbm.toc gdbm.tp gdbm.vr
97
98TEXI_F = gdbm.info
99     
100SRCS = $(DBM_CF) $(NDBM_CF) $(GDBM_CF) $(TEST_CF)
101
102# The old all in one library:
103#OBJS = $(DBM_OF) $(NDBM_OF) $(GDBM_OF)
104#
105#LOBJS = $(DBM_LOF) $(NDBM_LOF) $(GDBM_LOF)
106
107# The new split libraries:
108OBJS = $(GDBM_OF)
109LOBJS = $(GDBM_LOF)
110
111C_OBJS = $(DBM_OF) $(NDBM_OF)
112C_LOBJS = $(DBM_LOF) $(NDBM_LOF)
113
114HDRS = gdbmdefs.h extern.h gdbmerrno.h systems.h dbm.h ndbm.h gdbmconst.h \
115    proto.h
116
117MSCFILES = COPYING ChangeLog Makefile.in README gdbm.3 gdbm.texinfo \
118    gdbm.info NEWS INSTALL gdbm.proto gdbm.proto2 conv2gdbm.c \
119    configure configure.in getopt.c getopt.h samp1.cc \
120    autoconf.h.in install-sh mkinstalldirs config.guess config.sub \
121    aclocal.m4 ltconfig ltmain.sh
122
123DISTFILES = $(SRCS) $(HDRS) $(MSCFILES)
124
125all: libgdbm.la libgdbm_compat.la
126
127progs: $(PROGS)
128
129install: libgdbm.la gdbm.h gdbm.info
130    $(srcdir)/mkinstalldirs $(INSTALL_ROOT)$(libdir) \
131        $(INSTALL_ROOT)$(includedir) $(INSTALL_ROOT)$(man3dir) \
132        $(INSTALL_ROOT)$(infodir)
133    $(LIBTOOL) $(INSTALL) -c libgdbm.la $(INSTALL_ROOT)$(libdir)/libgdbm.la
134    $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) gdbm.h \
135        $(INSTALL_ROOT)$(includedir)/gdbm.h
136    $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/gdbm.3 \
137        $(INSTALL_ROOT)$(man3dir)/gdbm.3
138    $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/gdbm.info \
139        $(INSTALL_ROOT)$(infodir)/gdbm.info
140
141install-compat:
142    $(srcdir)/mkinstalldirs $(INSTALL_ROOT)$(libdir) \
143        $(INSTALL_ROOT)$(includedir)
144    $(LIBTOOL) $(INSTALL) -c libgdbm_compat.la \
145        $(INSTALL_ROOT)$(libdir)/libgdbm_compat.la
146    $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/dbm.h \
147        $(INSTALL_ROOT)$(includedir)/dbm.h
148    $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/ndbm.h \
149        $(INSTALL_ROOT)$(includedir)/ndbm.h
150
151#libgdbm.a: $(OBJS) gdbm.h
152#   rm -f libgdbm.a
153#   ar q libgdbm.a $(OBJS)
154#   $(RANLIB) libgdbm.a
155
156libgdbm.la: $(LOBJS) gdbm.h
157    rm -f libgdbm.la
158    $(LIBTOOL) --mode=link $(CC) -o libgdbm.la -rpath $(libdir) \
159        -version-info $(SHLIB_VER) $(LOBJS)
160
161libgdbm_compat.la: $(C_LOBJS) gdbm.h
162    rm -f libgdbm_compat.la
163    $(LIBTOOL) --mode=link $(CC) -o libgdbm_compat.la -rpath $(libdir) \
164        -version-info $(SHLIB_VER) $(C_LOBJS)
165
166gdbm.h: gdbm.proto gdbmerrno.h gdbm.proto2
167    rm -f gdbm.h
168    cp $(srcdir)/gdbm.proto gdbm.h
169    chmod +w gdbm.h
170    grep _ $(srcdir)/gdbmerrno.h >> gdbm.h
171    cat $(srcdir)/gdbm.proto2 >> gdbm.h
172    chmod -w gdbm.h
173
174testgdbm: testgdbm.o libgdbm.la @LIBOBJS@
175    $(LIBTOOL) $(CC) $(LDFLAGS) -o testgdbm testgdbm.o libgdbm.la @LIBOBJS@
176
177testdbm: testdbm.o libgdbm.la libgdbm_compat.la
178    $(LIBTOOL) $(CC) $(LDFLAGS) -o testdbm testdbm.o libgdbm.la libgdbm_compat.la
179
180tdbm: testdbm.o
181    $(CC) $(LDFLAGS) -o tdbm testdbm.o $(LIBS)
182
183testndbm.o: testndbm.c
184    $(CC) -c -I. -I$(srcdir) $(CFLAGS) $(DEFS) -DGNU $(srcdir)/testndbm.c
185
186testndbm: testndbm.o libgdbm.la libgdbm_compat.la
187    $(LIBTOOL) $(CC) $(LDFLAGS) -o testndbm testndbm.o libgdbm.la libgdbm_compat.la
188
189tndbm.o: testndbm.c
190    cp $(srcdir)/testndbm.c ./tndbm.c
191    $(CC) -c -I. -I$(srcdir) $(CFLAGS) $(DEFS) ./tndbm.c
192    rm -f ./tndbm.c
193
194tndbm: tndbm.o
195    $(CC) $(LDFLAGS) -o tndbm tndbm.o $(LIBS)
196
197conv2gdbm: conv2gdbm.o libgdbm.la @LIBOBJS@
198    $(LIBTOOL) $(CC) $(LDFLAGS) -o conv2gdbm conv2gdbm.o $(LIBS) libgdbm.la @LIBOBJS@
199
200lintgdbm:
201    lint $(DEFS) $(LFLAGS) $(DBM_CF) $(NDBM_CF) $(GDBM_CF) testgdbm.c
202
203TAGS: $(SRCS)
204    etags $(SRCS)
205
206info: gdbm.info
207
208gdbm.info: gdbm.texinfo
209    $(MAKEINFO) $(srcdir)/gdbm.texinfo
210
211dvi: gdbm.dvi
212
213gdbm.dvi: gdbm.texinfo
214    $(TEXI2DVI) $(srcdir)/gdbm.texinfo
215
216clean:
217    rm -rf $(PROGS) $(TEX_F) *.a *.la *.o *.lo core *.core junk* \
218        .libs _libs
219
220mostlyclean: clean
221
222distclean: clean
223    rm -f Makefile autoconf.h config.status config.cache config.log \
224        gdbm.h libtool $(TEXI_F) *~
225
226realclean: distclean
227    rm -f TAGS
228    -rm -f \
229      `sed -n 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/gdbm-\1/p' \
230        version.c`.tar.gz
231
232dist:
233    echo \
234      `sed -n 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/gdbm-\1/p' \
235        version.c` > .fname
236    rm -rf `cat .fname`
237    mkdir `cat .fname`
238    ln $(DISTFILES) `cat .fname`
239    tar chf `cat .fname`.tar `cat .fname`
240    gzip `cat .fname`.tar
241    rm -rf `cat .fname` .fname
242
243# dbm files
244dbminit.o:  autoconf.h gdbmdefs.h proto.h extern.h gdbmerrno.h
245delete.o:   autoconf.h gdbmdefs.h proto.h extern.h
246fetch.o:    autoconf.h gdbmdefs.h proto.h extern.h
247store.o:    autoconf.h gdbmdefs.h proto.h extern.h
248seq.o:      autoconf.h gdbmdefs.h proto.h extern.h
249
250# ndbm files
251dbmopen.o:  autoconf.h gdbmdefs.h extern.h gdbmerrno.h
252dbmdelete.o:    autoconf.h gdbmdefs.h extern.h
253dbmfetch.o: autoconf.h gdbmdefs.h extern.h
254dbmstore.o: autoconf.h gdbmdefs.h extern.h
255dbmseq.o:   autoconf.h gdbmdefs.h extern.h
256dbmclose.o: autoconf.h gdbmdefs.h systems.h
257dbmpagfno.o:    autoconf.h gdbmdefs.h extern.h
258dbmdirfno.o:    autoconf.h gdbmdefs.h extern.h
259
260
261# gdbm files
262gdbmclose.o:    autoconf.h gdbmdefs.h
263gdbmdelete.o:   autoconf.h gdbmdefs.h gdbmerrno.h
264gdbmfetch.o:    autoconf.h gdbmdefs.h gdbmerrno.h
265gdbmfdesc.o:    autoconf.h gdbmdefs.h
266gdbmopen.o: autoconf.h gdbmdefs.h gdbmerrno.h
267gdbmreorg.o:    autoconf.h gdbmdefs.h gdbmerrno.h extern.h
268gdbmseq.o:  autoconf.h gdbmdefs.h
269gdbmstore.o:    autoconf.h gdbmdefs.h gdbmerrno.h
270
271# gdbm support files
272bucket.o:   autoconf.h gdbmdefs.h
273falloc.o:   autoconf.h gdbmdefs.h
274findkey.o:  autoconf.h gdbmdefs.h
275global.o:   autoconf.h gdbmdefs.h gdbmerrno.h
276hash.o:     autoconf.h gdbmdefs.h
277update.o:   autoconf.h gdbmdefs.h
278version.o:
279extern.h:
280gdbmdefs.h: gdbmconst.h systems.h
281    touch gdbmdefs.h
282
283# other programs
284testgdbm.o: autoconf.h gdbmdefs.h extern.h gdbmerrno.h systems.h
285testdbm.o:  autoconf.h
286testndbm.o: autoconf.h ndbm.h
287tdbm.o:     autoconf.h
288conv2gdbm.o:    autoconf.h gdbm.h
Note: See TracBrowser for help on using the browser.