home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / gdbm-1.7.3-src.tgz / tar.out / fsf / gdbm / Makefile.in < prev    next >
Makefile  |  1996-09-28  |  8KB  |  266 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. DVIPS = dvips
  15. RANLIB = @RANLIB@
  16.  
  17. DEFS = @DEFS@
  18.  
  19. # Where the system [n]dbm routines are...
  20. LIBS = @LIBS@ -lc
  21.  
  22. # SunOS users might wish to add '-fpcc-struct-return' to CFLAGS. see INSTALL.
  23. CFLAGS = @CFLAGS@
  24. LDFLAGS = @LDFLAGS@
  25.  
  26. # Common prefix for installation directories
  27. prefix = @prefix@
  28. exec_prefix = $(prefix)
  29. binprefix = $(exec_prefix)
  30. manprefix = $(prefix)
  31.  
  32. # Directory in which to put libgdbm.a.
  33. libdir = $(exec_prefix)/lib
  34. # The include directory for gdbm.h and dbm.h.
  35. includedir = $(prefix)/include
  36. # Info and man directories.
  37. infodir = @infodir@
  38. guidedir = @guidedir@
  39. dvidir = @dvidir@
  40. psdir = @psdir@
  41. man3dir = $(prefix)/man/man3
  42. manext = 3
  43.  
  44. #### End of system configuration section. ####
  45.  
  46. .c.o:
  47.     $(CC) -c $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) $(CFLAGS) $<
  48.  
  49. SHELL = /bin/sh
  50.  
  51. PROGS = libgdbm.a testgdbm testdbm testndbm # tndbm tdbm conv2gdbm
  52.  
  53. DBM_CF = dbminit.c delete.c fetch.c store.c seq.c close.c
  54.  
  55. NDBM_CF = dbmopen.c dbmdelete.c dbmfetch.c dbmstore.c dbmseq.c \
  56.     dbmclose.c dbmdirfno.c dbmpagfno.c dbmrdonly.c
  57.  
  58. GDBM_CF = gdbmopen.c gdbmdelete.c gdbmfetch.c  gdbmstore.c gdbmclose.c \
  59.     gdbmreorg.c gdbmseq.c gdbmsync.c gdbmerrno.c gdbmexists.c gdbmsetopt.c \
  60.     bucket.c falloc.c findkey.c global.c hash.c update.c \
  61.     version.c
  62.  
  63. TEST_CF = testdbm.c testndbm.c testgdbm.c
  64.  
  65.  
  66. DBM_OF = dbminit.o delete.o fetch.o store.o seq.o close.o
  67.  
  68. NDBM_OF = dbmopen.o dbmdelete.o dbmfetch.o dbmstore.o dbmseq.o \
  69.     dbmclose.o dbmdirfno.o dbmpagfno.o dbmrdonly.o
  70.  
  71. GDBM_OF = gdbmopen.o gdbmdelete.o gdbmfetch.o  gdbmstore.o gdbmclose.o \
  72.     gdbmreorg.o gdbmseq.o gdbmsync.o gdbmerrno.o gdbmexists.o gdbmsetopt.o \
  73.     bucket.o falloc.o findkey.o global.o hash.o update.o \
  74.     version.o
  75.  
  76. TEX_F = gdbm.aux gdbm.cp gdbm.dvi gdbm.fn gdbm.ky gdbm.log gdbm.pg \
  77.     gdbm.toc gdbm.tp gdbm.vr
  78.  
  79. TEXI_F = gdbm.info gdbm.dvi gdbm.guide gdbm.ps
  80.      
  81. SRCS = $(DBM_CF) $(NDBM_CF) $(GDBM_CF) $(TEST_CF)
  82.  
  83. # ADE hack.  Disable inclusion of the dbm and ndbm compatibility functions
  84. # since the standard ndbm.h file comes from ixemul, which has dbm/ndbm
  85. # functions.  We don't want to overwrite that file with the one from gdbm,
  86. # and we must not try to use the compatibility functions without including
  87. # the correct ndbm.h, since some functions like dbm_error are handled
  88. # differently (#defined away in the gdbm ndbm.h file).  Longterm the
  89. # way this should be handled is configure should check to see if the
  90. # system already supplies dbm or ndbm functions, and if so, arrange to
  91. # substitute null for @DBM_OF@, @NDBM_OF@, and @install-compat@.
  92. # On systems without dbm or ndbm support, the compatibility functions
  93. # should be put into libgdbm.a and dbm.h/ndbm.h should be installed.
  94. #OBJS = $(DBM_OF) $(NDBM_OF) $(GDBM_OF) @ALLOCA@
  95. OBJS = $(GDBM_OF) @ALLOCA@ # @DBM_OF@ @NDBM_OF@ 
  96.  
  97. HDRS = gdbmdefs.h extern.h gdbmerrno.h systems.h dbm.h ndbm.h gdbmconst.h \
  98.     proto.h
  99.  
  100. MSCFILES = COPYING ChangeLog Makefile.in README gdbm.3 gdbm.texinfo \
  101.     gdbm.info NEWS INSTALL gdbm.proto gdbm.proto2 conv2gdbm.c \
  102.     configure configure.in alloca.c getopt.c getopt.h samp1.cc \
  103.     autoconf.h.in
  104.  
  105. DISTFILES = $(SRCS) $(HDRS) $(MSCFILES)
  106.  
  107. all: libgdbm.a gdbm.h gdbm.info gdbm.guide gdbm.dvi gdbm.ps
  108.  
  109. progs: $(PROGS)
  110.  
  111. install: all # @install-compat@
  112.     -if [ -d $(libdir) ] ; then true ; else mkdir -p $(libdir) ; fi
  113.     $(INSTALL_DATA) libgdbm.a $(libdir)/libgdbm.a
  114.     -if [ -d $(includedir) ] ; then true ; else mkdir -p $(includedir) ; fi
  115.     $(INSTALL_DATA) gdbm.h $(includedir)/gdbm.h
  116.     -if [ -d $(man3dir) ] ; then true ; else mkdir -p $(man3dir) ; fi
  117.     $(INSTALL_DATA) $(srcdir)/gdbm.3 $(man3dir)/gdbm.3
  118.     -if [ -d $(infodir) ] ; then true ; else mkdir -p $(infodir) ; fi
  119.     $(INSTALL_DATA) gdbm.info $(infodir)/gdbm.info
  120.     -if [ -d $(guidedir) ] ; then true ; else mkdir -p $(guidedir) ; fi
  121.     $(INSTALL_DATA) gdbm.guide $(guidedir)/gdbm.guide
  122.     -if [ -d $(dvidir) ] ; then true ; else mkdir -p $(dvidir) ; fi
  123.     $(INSTALL_DATA) gdbm.dvi $(dvidir)/gdbm.dvi
  124.     -if [ -d $(psdir) ] ; then true ; else mkdir -p $(psdir) ; fi
  125.     $(INSTALL_DATA) gdbm.ps $(psdir)/gdbm.ps
  126.  
  127. install-compat:
  128.     -if [ -d $(includedir) ] ; then true ; else mkdir -p $(includedir) ; fi
  129.     $(INSTALL_DATA) $(srcdir)/dbm.h $(includedir)/dbm.h
  130.     $(INSTALL_DATA) $(srcdir)/ndbm.h $(includedir)/ndbm.h
  131.  
  132. libgdbm.a: $(OBJS) gdbm.h
  133.     rm -f libgdbm.a
  134.     ar q libgdbm.a $(OBJS)
  135.     $(RANLIB) libgdbm.a
  136.  
  137. gdbm.h:    gdbm.proto gdbmerrno.h gdbm.proto2
  138.     rm -f gdbm.h
  139.     cp $(srcdir)/gdbm.proto gdbm.h
  140.     chmod +w gdbm.h
  141.     grep _ $(srcdir)/gdbmerrno.h >> gdbm.h
  142.     cat $(srcdir)/gdbm.proto2 >> gdbm.h
  143.     chmod -w gdbm.h
  144.  
  145. testgdbm: testgdbm.o libgdbm.a @LIBOBJS@
  146.     $(CC) $(LDFLAGS) -o testgdbm testgdbm.o libgdbm.a @LIBOBJS@
  147.  
  148. testdbm: testdbm.o libgdbm.a
  149.     $(CC) $(LDFLAGS) -o testdbm testdbm.o libgdbm.a
  150.  
  151. tdbm: testdbm.o libgdbm.a
  152.     $(CC) $(LDFLAGS) -o tdbm testdbm.o $(LIBS)
  153.  
  154. testndbm.o: testndbm.c
  155.     $(CC) -c -I. -I$(srcdir) $(CFLAGS) $(DEFS) -DGNU $(srcdir)/testndbm.c
  156.  
  157. testndbm: testndbm.o libgdbm.a
  158.     $(CC) $(LDFLAGS) -o testndbm testndbm.o libgdbm.a
  159.  
  160. tndbm.o: testndbm.c
  161.     cp $(srcdir)/testndbm.c ./tndbm.c
  162.     $(CC) -c -I. -I$(srcdir) $(CFLAGS) $(DEFS) ./tndbm.c
  163.     rm -f ./tndbm.c
  164.  
  165. tndbm: tndbm.o libgdbm.a
  166.     $(CC) $(LDFLAGS) -o tndbm tndbm.o $(LIBS)
  167.  
  168. conv2gdbm: conv2gdbm.o libgdbm.a @LIBOBJS@
  169.     $(CC) $(LDFLAGS) -o conv2gdbm conv2gdbm.o $(LIBS) libgdbm.a @LIBOBJS@
  170.  
  171. lintgdbm: 
  172.     lint $(DEFS) $(LFLAGS) $(DBM_CF) $(NDBM_CF) $(GDBM_CF) testgdbm.c
  173.  
  174. TAGS: $(SRCS)
  175.     etags $(SRCS)
  176.  
  177. info: gdbm.info
  178.  
  179. gdbm.info: gdbm.texinfo
  180.     $(MAKEINFO) -I$(srcdir) $? --output=$@
  181.  
  182. guide: gdbm.guide
  183.  
  184. gdbm.guide: gdbm.texinfo
  185.     $(MAKEINFO) --amiga-39 $? -o $@
  186.  
  187. dvi: gdbm.dvi
  188.  
  189. gdbm.dvi: gdbm.texinfo
  190.     $(TEXI2DVI) $?
  191.  
  192. ps: gdbm.ps
  193. gdbm.ps: gdbm.dvi
  194.     $(DVIPS) -o $@ $?
  195.  
  196. clean:
  197.     rm -f $(PROGS) $(TEX_F) *.o core junk*
  198.  
  199. mostlyclean: clean
  200.  
  201. distclean: clean
  202.     rm -f Makefile autoconf.h config.status gdbm.h $(TEXI_F) *~
  203.  
  204. realclean: distclean
  205.     rm -f TAGS
  206.     -rm -f \
  207.       `sed -n 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/gdbm-\1/p' \
  208.         version.c`.tar.gz
  209.  
  210. dist:
  211.     echo \
  212.       `sed -n 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/gdbm-\1/p' \
  213.         version.c` > .fname
  214.     rm -rf `cat .fname`
  215.     mkdir `cat .fname`
  216.     ln $(DISTFILES) `cat .fname`
  217.     tar chf `cat .fname`.tar `cat .fname`
  218.     gzip `cat .fname`.tar
  219.     rm -rf `cat .fname` .fname
  220.  
  221. # dbm files
  222. dbminit.o:    autoconf.h gdbmdefs.h proto.h extern.h gdbmerrno.h
  223. delete.o:    autoconf.h gdbmdefs.h proto.h extern.h
  224. fetch.o:    autoconf.h gdbmdefs.h proto.h extern.h
  225. store.o:    autoconf.h gdbmdefs.h proto.h extern.h
  226. seq.o:        autoconf.h gdbmdefs.h proto.h extern.h
  227.  
  228. # ndbm files
  229. dbmopen.o:    autoconf.h gdbmdefs.h extern.h gdbmerrno.h
  230. dbmdelete.o:    autoconf.h gdbmdefs.h extern.h
  231. dbmfetch.o:    autoconf.h gdbmdefs.h extern.h
  232. dbmstore.o:    autoconf.h gdbmdefs.h extern.h
  233. dbmseq.o:    autoconf.h gdbmdefs.h extern.h
  234. dbmclose.o:    autoconf.h gdbmdefs.h systems.h
  235. dbmpagfno.o:    autoconf.h gdbmdefs.h extern.h
  236. dbmdirfno.o:    autoconf.h gdbmdefs.h extern.h
  237.  
  238.  
  239. # gdbm files
  240. gdbmclose.o:    autoconf.h gdbmdefs.h 
  241. gdbmdelete.o:    autoconf.h gdbmdefs.h gdbmerrno.h 
  242. gdbmfetch.o:    autoconf.h gdbmdefs.h gdbmerrno.h 
  243. gdbmopen.o:    autoconf.h gdbmdefs.h gdbmerrno.h 
  244. gdbmreorg.o:    autoconf.h gdbmdefs.h gdbmerrno.h extern.h
  245. gdbmseq.o:    autoconf.h gdbmdefs.h 
  246. gdbmstore.o:    autoconf.h gdbmdefs.h gdbmerrno.h 
  247.  
  248. # gdbm support files
  249. bucket.o:    autoconf.h gdbmdefs.h
  250. falloc.o:    autoconf.h gdbmdefs.h
  251. findkey.o:    autoconf.h gdbmdefs.h
  252. global.o:    autoconf.h gdbmdefs.h gdbmerrno.h 
  253. hash.o:        autoconf.h gdbmdefs.h
  254. update.o:    autoconf.h gdbmdefs.h
  255. version.o:
  256. extern.h:
  257. gdbmdefs.h:    gdbmconst.h systems.h
  258.     touch gdbmdefs.h
  259.  
  260. # other programs
  261. testgdbm.o:    autoconf.h gdbmdefs.h extern.h gdbmerrno.h systems.h
  262. testdbm.o:    autoconf.h
  263. testndbm.o:    autoconf.h ndbm.h
  264. tdbm.o:        autoconf.h
  265. conv2gdbm.o:    autoconf.h gdbm.h
  266.