home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / gnu / gdbm-1.7.1.tar.gz / gdbm-1.7.1.tar / gdbm-1.7.1 / Makefile.in < prev    next >
Makefile  |  1993-11-16  |  6KB  |  232 lines

  1. #### Start of system configuration section. ####
  2.  
  3. srcdir = @srcdir@
  4. VPATH = @srcdir@
  5.  
  6. CC = @CC@
  7.  
  8. INSTALL = @INSTALL@
  9. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  10. INSTALL_DATA = @INSTALL_DATA@
  11.  
  12. MAKEINFO = makeinfo
  13. TEXI2DVI = texi2dvi
  14. RANLIB = @RANLIB@
  15.  
  16. DEFS =
  17.  
  18. LIBS = @LIBS@
  19.  
  20. # SunOS users might wish to add '-fpcc-struct-return' to CFLAGS. see INSTALL.
  21. CFLAGS = -g
  22. LDFLAGS = -g
  23.  
  24. # Common prefix for installation directories
  25. prefix = /usr/local
  26. exec_prefix = $(prefix)
  27. binprefix = $(exec_prefix)
  28. manprefix = $(prefix)
  29.  
  30. # Directory in which to put libgdbm.a.
  31. libdir = $(exec_prefix)/lib
  32. # The include directory for gdbm.h and dbm.h.
  33. includedir = $(prefix)/include
  34. # The include directory for standard cc.
  35. oldincludedir = /usr/include
  36. # Info and man directories.
  37. infodir = $(prefix)/info
  38. man3dir = $(prefix)/man/man3
  39. manext = 3
  40.  
  41. #### End of system configuration section. ####
  42.  
  43. .c.o:
  44.     $(CC) -c $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) $(CFLAGS) $<
  45.  
  46. SHELL = /bin/sh
  47.  
  48. PROGS = libgdbm.a testgdbm testdbm testndbm tndbm tdbm conv2gdbm
  49.  
  50. DBM_CF = dbminit.c delete.c fetch.c store.c seq.c close.c
  51.  
  52. NDBM_CF = dbmopen.c dbmdelete.c dbmfetch.c dbmstore.c dbmseq.c \
  53.     dbmclose.c dbmdirfno.c dbmpagfno.c dbmrdonly.c
  54.  
  55. GDBM_CF = gdbmopen.c gdbmdelete.c gdbmfetch.c  gdbmstore.c gdbmclose.c \
  56.     gdbmreorg.c gdbmseq.c gdbmsync.c gdbmerrno.c gdbmexists.c gdbmsetopt.c \
  57.     bucket.c falloc.c findkey.c global.c hash.c update.c version.c
  58.  
  59. TEST_CF = testdbm.c testndbm.c testgdbm.c
  60.  
  61.  
  62. DBM_OF = dbminit.o delete.o fetch.o store.o seq.o close.o
  63.  
  64. NDBM_OF = dbmopen.o dbmdelete.o dbmfetch.o dbmstore.o dbmseq.o \
  65.     dbmclose.o dbmdirfno.o dbmpagfno.o dbmrdonly.o
  66.  
  67. GDBM_OF = gdbmopen.o gdbmdelete.o gdbmfetch.o  gdbmstore.o gdbmclose.o \
  68.     gdbmreorg.o gdbmseq.o gdbmsync.o gdbmerrno.o gdbmexists.o gdbmsetopt.o \
  69.     bucket.o falloc.o findkey.o global.o hash.o update.o version.o
  70.  
  71. TEX_F = gdbm.aux gdbm.cp gdbm.dvi gdbm.fn gdbm.ky gdbm.log gdbm.pg \
  72.     gdbm.toc gdbm.tp gdbm.vr
  73.  
  74. TEXI_F = gdbm.info
  75.      
  76. SRCS = $(DBM_CF) $(NDBM_CF) $(GDBM_CF) $(TEST_CF)
  77.  
  78. OBJS = $(DBM_OF) $(NDBM_OF) $(GDBM_OF) @ALLOCA@
  79.  
  80. HDRS = gdbmdefs.h extern.h gdbmerrno.h systems.h dbm.h ndbm.h gdbmconst.h \
  81.     proto.h
  82.  
  83. MSCFILES = COPYING ChangeLog Makefile.in README gdbm.3 gdbm.texinfo \
  84.     gdbm.info NEWS INSTALL gdbm.proto gdbm.proto2 conv2gdbm.c \
  85.     configure configure.in alloca.c getopt.c getopt.h samp1.cc \
  86.     autoconf.h.in
  87.  
  88. DISTFILES = $(SRCS) $(HDRS) $(MSCFILES)
  89.  
  90. all: $(PROGS)
  91.  
  92. install: libgdbm.a gdbm.h gdbm.info
  93.     $(INSTALL_DATA) libgdbm.a $(libdir)/libgdbm.a
  94.     $(INSTALL_DATA) gdbm.h $(includedir)/gdbm.h
  95.     $(INSTALL_DATA) $(srcdir)/dbm.h $(includedir)/dbm.h
  96.     if [ "$(CC)" != gcc ] ; then \
  97.         $(INSTALL_DATA) gdbm.h $(oldincludedir)/gdbm.h; \
  98.         if [ ! -r $(oldincludedir) ] ; then \
  99.         $(INSTALL_DATA) dbm.h $(oldincludedir)/dbm.h; \
  100.         else \
  101.         @echo "$(oldincludedir) has a dbm.h.  GNU's version not installed."; \
  102.         fi; \
  103.     fi
  104.     $(INSTALL_DATA) $(srcdir)/gdbm.3 $(man3dir)/gdbm.3
  105.     $(INSTALL_DATA) $(srcdir)/gdbm.info $(infodir)/gdbm.info
  106.  
  107. libgdbm.a: $(OBJS) gdbm.h
  108.     rm -f libgdbm.a
  109.     ar q libgdbm.a $(OBJS)
  110.     $(RANLIB) libgdbm.a
  111.  
  112. gdbm.h:    gdbm.proto gdbmerrno.h gdbm.proto2
  113.     rm -f gdbm.h
  114.     cp $(srcdir)/gdbm.proto gdbm.h
  115.     chmod +w gdbm.h
  116.     grep _ $(srcdir)/gdbmerrno.h >> gdbm.h
  117.     cat $(srcdir)/gdbm.proto2 >> gdbm.h
  118.     chmod -w gdbm.h
  119.  
  120. testgdbm: testgdbm.o libgdbm.a @LIBOBJS@
  121.     $(CC) $(LDFLAGS) -o testgdbm testgdbm.o libgdbm.a @LIBOBJS@
  122.  
  123. testdbm: testdbm.o libgdbm.a
  124.     $(CC) $(LDFLAGS) -o testdbm testdbm.o libgdbm.a
  125.  
  126. tdbm: testdbm.o libgdbm.a
  127.     $(CC) $(LDFLAGS) -o tdbm testdbm.o $(LIBS)
  128.  
  129. testndbm.o: testndbm.c
  130.     $(CC) -c $(CFLAGS) $(DEFS) -DGNU $(srcdir)/testndbm.c
  131.  
  132. testndbm: testndbm.o libgdbm.a
  133.     $(CC) $(LDFLAGS) -o testndbm testndbm.o libgdbm.a
  134.  
  135. tndbm.o: testndbm.c
  136.     cp $(srcdir)/testndbm.c $(srcdir)/tndbm.c
  137.     $(CC) -c $(CFLAGS) $(DEFS) $(srcdir)/tndbm.c
  138.     rm -f $(srcdir)/tndbm.c
  139.  
  140. tndbm: tndbm.o libgdbm.a
  141.     $(CC) $(LDFLAGS) -o tndbm tndbm.o $(LIBS)
  142.  
  143. conv2gdbm: conv2gdbm.o libgdbm.a @LIBOBJS@
  144.     $(CC) $(LDFLAGS) -o conv2gdbm conv2gdbm.o $(LIBS) libgdbm.a @LIBOBJS@
  145.  
  146. lintgdbm: 
  147.     lint $(DEFS) $(LFLAGS) $(DBM_CF) $(NDBM_CF) $(GDBM_CF) testgdbm.c
  148.  
  149. TAGS: $(SRCS)
  150.     etags $(SRCS)
  151.  
  152. info: gdbm.info
  153.  
  154. gdbm.info:
  155.     $(MAKEINFO) $(srcdir)/gdbm.texinfo
  156.  
  157. dvi: gdbm.dvi
  158.  
  159. gdbm.dvi:
  160.     $(TEXI2DVI) $(srcdir)/gdbm.texinfo
  161.  
  162. clean:
  163.     rm -f $(PROGS) $(TEX_F) *.o core junk*
  164.  
  165. mostlyclean: clean
  166.  
  167. distclean: clean
  168.     rm -f Makefile autoconf.h config.status gdbm.h $(TEXI_F) *~
  169.  
  170. realclean: distclean
  171.     rm -f TAGS
  172.     -rm -f \
  173.       `sed -n 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/gdbm-\1/p' \
  174.         version.c`.tar.gz
  175.  
  176. dist:
  177.     echo \
  178.       `sed -n 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/gdbm-\1/p' \
  179.         version.c` > .fname
  180.     rm -rf `cat .fname`
  181.     mkdir `cat .fname`
  182.     ln $(DISTFILES) `cat .fname`
  183.     tar chf `cat .fname`.tar `cat .fname`
  184.     gzip `cat .fname`.tar
  185.     rm -rf `cat .fname` .fname
  186.  
  187. # dbm files
  188. dbminit.o:    autoconf.h gdbmdefs.h proto.h extern.h gdbmerrno.h
  189. delete.o:    autoconf.h gdbmdefs.h proto.h extern.h
  190. fetch.o:    autoconf.h gdbmdefs.h proto.h extern.h
  191. store.o:    autoconf.h gdbmdefs.h proto.h extern.h
  192. seq.o:        autoconf.h gdbmdefs.h proto.h extern.h
  193.  
  194. # ndbm files
  195. dbmopen.o:    autoconf.h gdbmdefs.h extern.h gdbmerrno.h
  196. dbmdelete.o:    autoconf.h gdbmdefs.h extern.h
  197. dbmfetch.o:    autoconf.h gdbmdefs.h extern.h
  198. dbmstore.o:    autoconf.h gdbmdefs.h extern.h
  199. dbmseq.o:    autoconf.h gdbmdefs.h extern.h
  200. dbmclose.o:    autoconf.h gdbmdefs.h systems.h
  201. dbmpagfno.o:    autoconf.h gdbmdefs.h extern.h
  202. dbmdirfno.o:    autoconf.h gdbmdefs.h extern.h
  203.  
  204.  
  205. # gdbm files
  206. gdbmclose.o:    autoconf.h gdbmdefs.h 
  207. gdbmdelete.o:    autoconf.h gdbmdefs.h gdbmerrno.h 
  208. gdbmfetch.o:    autoconf.h gdbmdefs.h gdbmerrno.h 
  209. gdbmopen.o:    autoconf.h gdbmdefs.h gdbmerrno.h 
  210. gdbmreorg.o:    autoconf.h gdbmdefs.h gdbmerrno.h extern.h
  211. gdbmseq.o:    autoconf.h gdbmdefs.h 
  212. gdbmstore.o:    autoconf.h gdbmdefs.h gdbmerrno.h 
  213.  
  214. # gdbm support files
  215. bucket.o:    autoconf.h gdbmdefs.h
  216. falloc.o:    autoconf.h gdbmdefs.h
  217. findkey.o:    autoconf.h gdbmdefs.h
  218. global.o:    autoconf.h gdbmdefs.h gdbmerrno.h 
  219. hash.o:        autoconf.h gdbmdefs.h
  220. update.o:    autoconf.h gdbmdefs.h
  221. version.o:
  222. extern.h:
  223. gdbmdefs.h:    gdbmconst.h systems.h
  224.     touch gdbmdefs.h
  225.  
  226. # other programs
  227. testgdbm.o:    autoconf.h gdbmdefs.h extern.h gdbmerrno.h systems.h
  228. testdbm.o:    autoconf.h
  229. testndbm.o:    autoconf.h ndbm.h
  230. tdbm.o:        autoconf.h
  231. conv2gdbm.o:    autoconf.h gdbm.h
  232.