[18019] | 1 | #### Start of system configuration section. ####
|
---|
| 2 |
|
---|
| 3 | srcdir = @srcdir@
|
---|
| 4 | top_builddir = .
|
---|
| 5 | VPATH = @srcdir@
|
---|
| 6 |
|
---|
| 7 | CC = @CC@
|
---|
| 8 | LIBTOOL = @LIBTOOL@
|
---|
| 9 |
|
---|
| 10 | # GDBM 1.8.3 builds shared libraries version 3.0
|
---|
| 11 | SHLIB_VER = 3 0 0
|
---|
| 12 |
|
---|
| 13 | INSTALL = @INSTALL@
|
---|
| 14 | INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
---|
| 15 | INSTALL_DATA = @INSTALL_DATA@
|
---|
| 16 |
|
---|
| 17 | # File ownership and group
|
---|
| 18 | BINOWN = bin
|
---|
| 19 | BINGRP = bin
|
---|
| 20 |
|
---|
| 21 | MAKEINFO = makeinfo
|
---|
| 22 | TEXI2DVI = texi2dvi
|
---|
| 23 |
|
---|
| 24 | DEFS =
|
---|
| 25 |
|
---|
| 26 | # Where the system [n]dbm routines are...
|
---|
| 27 | LIBS = @LIBS@ -lc
|
---|
| 28 |
|
---|
| 29 | CFLAGS = @CFLAGS@
|
---|
| 30 | LDFLAGS = @LDFLAGS@
|
---|
| 31 |
|
---|
| 32 | # Common prefix for installation directories
|
---|
| 33 | prefix = @prefix@
|
---|
| 34 | exec_prefix = @exec_prefix@
|
---|
| 35 | binprefix = $(exec_prefix)
|
---|
| 36 | manprefix = $(prefix)
|
---|
| 37 |
|
---|
| 38 | # Directory in which to put libgdbm.a.
|
---|
| 39 | libdir = @libdir@
|
---|
| 40 | # The include directory for gdbm.h and dbm.h.
|
---|
| 41 | includedir = @includedir@
|
---|
| 42 | # Info and man directories.
|
---|
| 43 | infodir = @infodir@
|
---|
| 44 | man3dir = @mandir@/man3
|
---|
| 45 | manext = 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 |
|
---|
| 58 | SHELL = /bin/sh
|
---|
| 59 |
|
---|
| 60 | PROGS = libgdbm.la testgdbm testdbm testndbm tndbm tdbm conv2gdbm
|
---|
| 61 |
|
---|
| 62 | DBM_CF = dbminit.c delete.c fetch.c store.c seq.c close.c
|
---|
| 63 |
|
---|
| 64 | NDBM_CF = dbmopen.c dbmdelete.c dbmfetch.c dbmstore.c dbmseq.c \
|
---|
| 65 | dbmclose.c dbmdirfno.c dbmpagfno.c dbmrdonly.c
|
---|
| 66 |
|
---|
| 67 | GDBM_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 |
|
---|
| 72 | TEST_CF = testdbm.c testndbm.c testgdbm.c
|
---|
| 73 |
|
---|
| 74 |
|
---|
| 75 | DBM_OF = dbminit.o delete.o fetch.o store.o seq.o close.o
|
---|
| 76 |
|
---|
| 77 | NDBM_OF = dbmopen.o dbmdelete.o dbmfetch.o dbmstore.o dbmseq.o \
|
---|
| 78 | dbmclose.o dbmdirfno.o dbmpagfno.o dbmrdonly.o
|
---|
| 79 |
|
---|
| 80 | GDBM_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 |
|
---|
| 85 | DBM_LOF = dbminit.lo delete.lo fetch.lo store.lo seq.lo close.lo
|
---|
| 86 |
|
---|
| 87 | NDBM_LOF = dbmopen.lo dbmdelete.lo dbmfetch.lo dbmstore.lo dbmseq.lo \
|
---|
| 88 | dbmclose.lo dbmdirfno.lo dbmpagfno.lo dbmrdonly.lo
|
---|
| 89 |
|
---|
| 90 | GDBM_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 |
|
---|
| 95 | TEX_F = gdbm.aux gdbm.cp gdbm.dvi gdbm.fn gdbm.ky gdbm.log gdbm.pg \
|
---|
| 96 | gdbm.toc gdbm.tp gdbm.vr
|
---|
| 97 |
|
---|
| 98 | TEXI_F = gdbm.info
|
---|
| 99 |
|
---|
| 100 | SRCS = $(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:
|
---|
| 108 | OBJS = $(GDBM_OF)
|
---|
| 109 | LOBJS = $(GDBM_LOF)
|
---|
| 110 |
|
---|
| 111 | C_OBJS = $(DBM_OF) $(NDBM_OF)
|
---|
| 112 | C_LOBJS = $(DBM_LOF) $(NDBM_LOF)
|
---|
| 113 |
|
---|
| 114 | HDRS = gdbmdefs.h extern.h gdbmerrno.h systems.h dbm.h ndbm.h gdbmconst.h \
|
---|
| 115 | proto.h
|
---|
| 116 |
|
---|
| 117 | MSCFILES = 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 |
|
---|
| 123 | DISTFILES = $(SRCS) $(HDRS) $(MSCFILES)
|
---|
| 124 |
|
---|
| 125 | all: libgdbm.la libgdbm_compat.la
|
---|
| 126 |
|
---|
| 127 | progs: $(PROGS)
|
---|
| 128 |
|
---|
| 129 | install: 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 |
|
---|
| 141 | install-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 |
|
---|
| 156 | libgdbm.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 |
|
---|
| 161 | libgdbm_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 |
|
---|
| 166 | gdbm.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 |
|
---|
| 174 | testgdbm: testgdbm.o libgdbm.la @LIBOBJS@
|
---|
| 175 | $(LIBTOOL) $(CC) $(LDFLAGS) -o testgdbm testgdbm.o libgdbm.la @LIBOBJS@
|
---|
| 176 |
|
---|
| 177 | testdbm: testdbm.o libgdbm.la libgdbm_compat.la
|
---|
| 178 | $(LIBTOOL) $(CC) $(LDFLAGS) -o testdbm testdbm.o libgdbm.la libgdbm_compat.la
|
---|
| 179 |
|
---|
| 180 | tdbm: testdbm.o
|
---|
| 181 | $(CC) $(LDFLAGS) -o tdbm testdbm.o $(LIBS)
|
---|
| 182 |
|
---|
| 183 | testndbm.o: testndbm.c
|
---|
| 184 | $(CC) -c -I. -I$(srcdir) $(CFLAGS) $(DEFS) -DGNU $(srcdir)/testndbm.c
|
---|
| 185 |
|
---|
| 186 | testndbm: testndbm.o libgdbm.la libgdbm_compat.la
|
---|
| 187 | $(LIBTOOL) $(CC) $(LDFLAGS) -o testndbm testndbm.o libgdbm.la libgdbm_compat.la
|
---|
| 188 |
|
---|
| 189 | tndbm.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 |
|
---|
| 194 | tndbm: tndbm.o
|
---|
| 195 | $(CC) $(LDFLAGS) -o tndbm tndbm.o $(LIBS)
|
---|
| 196 |
|
---|
| 197 | conv2gdbm: conv2gdbm.o libgdbm.la @LIBOBJS@
|
---|
| 198 | $(LIBTOOL) $(CC) $(LDFLAGS) -o conv2gdbm conv2gdbm.o $(LIBS) libgdbm.la @LIBOBJS@
|
---|
| 199 |
|
---|
| 200 | lintgdbm:
|
---|
| 201 | lint $(DEFS) $(LFLAGS) $(DBM_CF) $(NDBM_CF) $(GDBM_CF) testgdbm.c
|
---|
| 202 |
|
---|
| 203 | TAGS: $(SRCS)
|
---|
| 204 | etags $(SRCS)
|
---|
| 205 |
|
---|
| 206 | info: gdbm.info
|
---|
| 207 |
|
---|
| 208 | gdbm.info: gdbm.texinfo
|
---|
| 209 | $(MAKEINFO) $(srcdir)/gdbm.texinfo
|
---|
| 210 |
|
---|
| 211 | dvi: gdbm.dvi
|
---|
| 212 |
|
---|
| 213 | gdbm.dvi: gdbm.texinfo
|
---|
| 214 | $(TEXI2DVI) $(srcdir)/gdbm.texinfo
|
---|
| 215 |
|
---|
| 216 | clean:
|
---|
| 217 | rm -rf $(PROGS) $(TEX_F) *.a *.la *.o *.lo core *.core junk* \
|
---|
| 218 | .libs _libs
|
---|
| 219 |
|
---|
| 220 | mostlyclean: clean
|
---|
| 221 |
|
---|
| 222 | distclean: clean
|
---|
| 223 | rm -f Makefile autoconf.h config.status config.cache config.log \
|
---|
| 224 | gdbm.h libtool $(TEXI_F) *~
|
---|
| 225 |
|
---|
| 226 | realclean: 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 |
|
---|
| 232 | dist:
|
---|
| 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
|
---|
| 244 | dbminit.o: autoconf.h gdbmdefs.h proto.h extern.h gdbmerrno.h
|
---|
| 245 | delete.o: autoconf.h gdbmdefs.h proto.h extern.h
|
---|
| 246 | fetch.o: autoconf.h gdbmdefs.h proto.h extern.h
|
---|
| 247 | store.o: autoconf.h gdbmdefs.h proto.h extern.h
|
---|
| 248 | seq.o: autoconf.h gdbmdefs.h proto.h extern.h
|
---|
| 249 |
|
---|
| 250 | # ndbm files
|
---|
| 251 | dbmopen.o: autoconf.h gdbmdefs.h extern.h gdbmerrno.h
|
---|
| 252 | dbmdelete.o: autoconf.h gdbmdefs.h extern.h
|
---|
| 253 | dbmfetch.o: autoconf.h gdbmdefs.h extern.h
|
---|
| 254 | dbmstore.o: autoconf.h gdbmdefs.h extern.h
|
---|
| 255 | dbmseq.o: autoconf.h gdbmdefs.h extern.h
|
---|
| 256 | dbmclose.o: autoconf.h gdbmdefs.h systems.h
|
---|
| 257 | dbmpagfno.o: autoconf.h gdbmdefs.h extern.h
|
---|
| 258 | dbmdirfno.o: autoconf.h gdbmdefs.h extern.h
|
---|
| 259 |
|
---|
| 260 |
|
---|
| 261 | # gdbm files
|
---|
| 262 | gdbmclose.o: autoconf.h gdbmdefs.h
|
---|
| 263 | gdbmdelete.o: autoconf.h gdbmdefs.h gdbmerrno.h
|
---|
| 264 | gdbmfetch.o: autoconf.h gdbmdefs.h gdbmerrno.h
|
---|
| 265 | gdbmfdesc.o: autoconf.h gdbmdefs.h
|
---|
| 266 | gdbmopen.o: autoconf.h gdbmdefs.h gdbmerrno.h
|
---|
| 267 | gdbmreorg.o: autoconf.h gdbmdefs.h gdbmerrno.h extern.h
|
---|
| 268 | gdbmseq.o: autoconf.h gdbmdefs.h
|
---|
| 269 | gdbmstore.o: autoconf.h gdbmdefs.h gdbmerrno.h
|
---|
| 270 |
|
---|
| 271 | # gdbm support files
|
---|
| 272 | bucket.o: autoconf.h gdbmdefs.h
|
---|
| 273 | falloc.o: autoconf.h gdbmdefs.h
|
---|
| 274 | findkey.o: autoconf.h gdbmdefs.h
|
---|
| 275 | global.o: autoconf.h gdbmdefs.h gdbmerrno.h
|
---|
| 276 | hash.o: autoconf.h gdbmdefs.h
|
---|
| 277 | update.o: autoconf.h gdbmdefs.h
|
---|
| 278 | version.o:
|
---|
| 279 | extern.h:
|
---|
| 280 | gdbmdefs.h: gdbmconst.h systems.h
|
---|
| 281 | touch gdbmdefs.h
|
---|
| 282 |
|
---|
| 283 | # other programs
|
---|
| 284 | testgdbm.o: autoconf.h gdbmdefs.h extern.h gdbmerrno.h systems.h
|
---|
| 285 | testdbm.o: autoconf.h
|
---|
| 286 | testndbm.o: autoconf.h ndbm.h
|
---|
| 287 | tdbm.o: autoconf.h
|
---|
| 288 | conv2gdbm.o: autoconf.h gdbm.h
|
---|