home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / db02_src.zip / makefile < prev    next >
Makefile  |  1994-02-23  |  18KB  |  693 lines

  1. ##########################################################
  2. # Makefile for Diamondbase.
  3. #
  4. #
  5. ##########################################################
  6. # Define your OS here.....
  7. #    The following operating systems are supported.
  8. #
  9. #        "os2-bc"        - OS/2 2.0 or greater (using BCOS2).
  10. #        "os2-emx"       - OS/2 2.x using emx/gcc 0.8h or later
  11. #        "os2-emx-syscalls"- OS/2 2.x using emx/gcc 0.8h or later
  12. #                    (using system calls library)
  13. #        "ultrix"        - DEC Ultrix (using gcc). (also SG IRIX with gcc)
  14. #        "sunos"         - SUN unix (using gcc).
  15. #        "linux"         - LINUX (using gcc).
  16. #        "cc"            - The (CFRONT?) CC C++ preprocessor compiler (tested
  17. #                        with IRIX)
  18. #        "sasc"          - Amiga, Comeau C++ 3.0b (AT&T cfront 3.0), SAS/C 6.2
  19. #    "next"          - NeXT using gcc
  20. #        "nothing"       - Will build nothing.
  21. #
  22. ifndef OS
  23. OS = os2-bc
  24. endif
  25. #
  26. ##########################################################
  27. # Make options...
  28. #    The following options may be either "on" or "off"
  29. #
  30. ifndef DEBUG
  31. DEBUG = off
  32. endif
  33. ifndef USEMALLOCLIB
  34. USEMALLOCLIB = off
  35. endif
  36. #
  37. ##########################################################
  38. # Ok, the install directories:
  39. #
  40. ifndef BINDIR
  41. BINDIR=/usr/local/bin
  42. endif
  43. ifndef LIBDIR
  44. LIBDIR=/usr/local/lib
  45. endif
  46. ifndef INCDIR
  47. INCDIR=/usr/local/include
  48. endif
  49. #
  50. ##########################################################
  51. #
  52. # DON'T SCREW WITH THE REST OF THIS MAKEFILE UNLESS YOU
  53. # KNOW WHAT YOU'RE DOING.... Andy
  54. #
  55. # If you are running an operating system besides those above, please
  56. # fashion a section for it below similar to the rest. You should not
  57. # need to change anything else in the makefile. It has been designed that
  58. # way.
  59. #
  60. # The following need to be defined in your OS section...
  61. # OBJ: The object code suffix without a '.'
  62. # CC: your C++ compiler
  63. # CFLAGS: Compile time flags. e.g. debugging, warnings etc. You should
  64. #   include $(MALLOC_I) if you ever plan to use the malloc library
  65. # LOAD: The loader flag for generating object code. Usually -o<space> under
  66. #   unix. Note that the <space> is essential otherwise compilers barf. The
  67. #   reason this is done this way is that BC++ requires -eexecname with no
  68. #   space.
  69. # LDFLAGS: Link time flags. These should include $(MALLOC_L) if you plan to
  70. #   use a the malloc library and MUST include -L. -ldiamond so that dsc can
  71. #   can have the diamond library linked in properly. Some gcc versions require
  72. #   a -lg++ on the end.
  73. # DEP: Any extra dependancies, like a compiler config file (see the OS/2
  74. #   section for an example)
  75. # FLEXFIX: If your lex does not produce lex.yy.c, then this define should
  76. #   be a command that generates (usually using copy or move instructions)
  77. #   lex.yy.c form your lexical analyser's output.
  78. # PARSERGEN: The parser that you use. e.g. yacc
  79. # LIBRARIAN: The command and arguments to run your librarian
  80. # RANLIB: If you need ranlib, this is where you put it. If you don't,
  81. #   define this to equal DIR or something benign like that (eg. see the OS/2
  82. #   section)
  83. # LIBNAME: The name of the library
  84. # LIBOBJ: A gnu make macro to convert the extensionless OBJS by adding a
  85. #   suffix on eg. LIBOBJ := $(OBJS:%=%.o)
  86. # LIBOBJS = $(LIBOBJ)
  87. # STRIPHEAD: This should copy the yacc (or equivalent) output to dsc.cc. In
  88. #   most cases this might read: cp y.tab.c dsc.cc. With some versions of
  89. #   yacc, you get extern's for malloc declared at the top of your output. If
  90. #   so, the C++ compiler will barf, so make this command a call to tail (or
  91. #   similar) to strip off the first line. See the Sunos section for an
  92. #   example.
  93. # MALLOC_I and MALLOC_L should be compile time and link time options to
  94. #   link in a malloc library if you want one. We used it to ensure there were
  95. #   no memory leaks. Leave them blank if you want.
  96. # RM: The program that deletes files.
  97. # RMFLAGS: The flags to that program.
  98. # CP: The program that copies files.
  99. #
  100. ##########################################################
  101.  
  102. ################
  103. # Source files
  104.  
  105. ALLSRC=btree.cc bucket.cc d_types.cc dbase.cc dbobj.cc dbotest.cc \
  106.        diarel.cc dispr.cc generate.cc idxinfo.cc main.cc \
  107.        myobj.cc nserver.cc rand.cc rserv.cc rtest.cc search.cc \
  108.        test1.cc tester.cc dberr.cc cache.cc btdump.cc version.cc \
  109.        mystring.cc mserv.cc diagrel.cc db2txt.cc utils.cc
  110.  
  111. MULTISRC=gib.cc dclient.cc
  112.  
  113. MULTIHEAD=gib.h dcdefs.h dclient.h ipcproto.h
  114.  
  115. INSTALLMULTIHEAD=dclient.h dcdefs.h
  116.  
  117. DOCSRC=doc.tex dsc.tex fileform.tex mycprog.sty fancyheadings.sty dirstruc.tex multi.tex strings.tex
  118.  
  119. XTRACLEAN= doc.aux doc.dvi doc.log doc.ps
  120.  
  121. OTHERSRC=dsc.l dsc.y ns.dbc
  122.  
  123. RELATIONHEAD=btree.h d_types.h dbase.h dbobj.h defs.h diarel.h \
  124.         idxinfo.h nserver.h object.h dbstr.h \
  125.         rserv.h dberr.h cache.h version.h mystring.h mserv.h \
  126.         diagrel.h ordcomp.h utils.h
  127.  
  128. ALLHEAD=$(RELATIONHEAD) generate.h myobj.h pathinfo.h rand.h
  129.  
  130. OTHERDIST=Makefile Makefile.gen BETA README Copyright Diamond.cfg CHANGES lex.yy.c
  131.  
  132. DIST=$(ALLSRC) $(DOCSRC) $(OTHERSRC) $(ALLHEAD) $(OTHERDIST) $(MULTISRC) $(MULTIHEAD)
  133.  
  134. BINARIES=dsc db2txt
  135.  
  136. DISTFILES:=$(DIST:%=diamond/%)
  137.  
  138. ################
  139. # List of object files
  140.  
  141. OBJS=btree bucket d_types dbase dbobj diarel generate idxinfo nserver \
  142.      rserv dberr cache mystring mserv diagrel utils
  143.  
  144. ################
  145. # Flags for building test databases.
  146.  
  147. TESTDBFILES=-O test/dbfiles
  148. TESTSCHEMA=-I test/schema
  149.  
  150. ################
  151. # Now the OS specific stuff.
  152.  
  153. #nothing stuff
  154. ifeq ($(OS),nothing)
  155. error: nothing_error
  156. all: nothing_error
  157. clean: nothing_error
  158. lib: nothing_error
  159. dsc: nothing_error
  160. depend: nothing_error
  161.  
  162. nothing_error:
  163.     @echo You must set the OS= line in Makefile or use make OS=something
  164.     @_____Error
  165.  
  166. endif
  167.  
  168. ifeq ($(DEBUG),on)
  169.   DFLAGS = -DDEBUG
  170. endif
  171.  
  172. #NeXT Defines
  173. ifeq ($(OS),next)
  174.   SYSDEFS = -DMALLOC_H_MISSING
  175.   OBJ=o
  176.   CC = gcc
  177.   CFLAGS = -pipe -O -Wall $(SYSDEFS)
  178.   LOAD = -o
  179.   LDFLAGS = -L. -ldiamond -lg++
  180.   DEP =
  181.   FLEXFIX =
  182.   PARSERGEN = yacc
  183.   LIBRARIAN = ar rcv
  184.   RANLIB = ranlib
  185.   INSTALLBIN = install -m 755 -s -c
  186.   INSTALL = install -m 644 -c
  187.   LIBNAME = libdiamond.a
  188.   MULTILIB = libdbmulti.a
  189.   LIBOBJ := $(OBJS:%=%.o)
  190.   LIBOBJS = $(LIBOBJ)
  191.   STRIPHEAD = tail +2 y.tab.c > dsc.cc
  192.   ifeq ($(USEMALLOCLIB),on)
  193.     MALLOC_I = -I/usr/local/gnu/include/dbmalloc
  194.     MALLOC_L = -ldbmalloc
  195.   else
  196.     MALLOC_I =
  197.     MALLOC_L =
  198.   endif
  199.   RM = rm
  200.   RMFLAGS = -f
  201.   CP = cp
  202.   MKDIR = mkdir
  203. endif
  204.  
  205. #Sunos Defines
  206. ifeq ($(OS),sunos)
  207.   OBJ=o
  208.   CC = gcc
  209.   CFLAGS = -g -Wall $(MALLOC_I)
  210.   LOAD = -o
  211.   LDFLAGS = $(MALLOC_L) -L. -ldiamond -lg++
  212.   DEP =
  213.   FLEXFIX =
  214.   PARSERGEN = yacc
  215.   LIBRARIAN = ar rcv
  216.   RANLIB = ranlib
  217.   INSTALLBIN = install -m 755 -s -c
  218.   INSTALL = install -m 644 -c
  219.   LIBNAME = libdiamond.a
  220.   MULTILIB = libdbmulti.a
  221.   LIBOBJ := $(OBJS:%=%.o)
  222.   LIBOBJS = $(LIBOBJ)
  223.   STRIPHEAD = tail +2 y.tab.c > dsc.cc
  224.   ifeq ($(USEMALLOCLIB),on)
  225.     MALLOC_I = -I/usr/local/gnu/include/dbmalloc
  226.     MALLOC_L = -ldbmalloc
  227.   else
  228.     MALLOC_I =
  229.     MALLOC_L =
  230.   endif
  231.   RM = rm
  232.   RMFLAGS = -f
  233.   CP = cp
  234.   MKDIR = mkdir
  235. endif
  236.  
  237. #SASC defines
  238. ifeq ($(OS),sasc)
  239.   SYSDEFS = -DMALLOC_H_MISSING
  240.   OBJ=o
  241.   CC = rx como
  242.   CFLAGS = $(SYSDEFS)
  243.   LOAD = -o
  244.   LDFLAGS = -ldiamond.lib
  245.   DEP =
  246.   FLEXFIX =
  247.   PARSERGEN = byacc
  248.   LIBRARIAN = oml
  249.   INSTALLBIN = install -m 755 -s -c
  250.   INSTALL = install -m 644 -c
  251.   RANLIB = echo "No ranlib required"
  252.   LIBNAME = diamond.lib
  253.   MULTILIB = libdbmulti.a
  254.   LIBOBJ := $(OBJS:%=%.o)
  255.   LIBOBJS = $(LIBOBJ)
  256.   STRIPHEAD = cp y.tab.c dsc.cc
  257.   MALLOC_I =
  258.   MALLOC_L =
  259.   RM = rm
  260.   RMFLAGS = -f
  261.   CP = cp
  262.   MKDIR = mkdir
  263. endif
  264.  
  265. #linux Defines
  266. ifeq ($(OS),linux)
  267.   OBJ=o
  268.   CC = gcc
  269.   CFLAGS = -g -Wall $(MALLOC_I)
  270.   LOAD = -o
  271.   LDFLAGS = $(MALLOC_L) -L. -ldiamond -lg++
  272.   DEP =
  273.   FLEXFIX =
  274.   PARSERGEN = yacc
  275.   LIBRARIAN = ar rcv
  276.   RANLIB = ranlib
  277.   INSTALLBIN = install -m 755 -s -c
  278.   INSTALL = install -m 644 -c
  279.   LIBNAME = libdiamond.a
  280.   MULTILIB = libdbmulti.a
  281.   LIBOBJ := $(OBJS:%=%.o)
  282.   LIBOBJS = $(LIBOBJ)
  283.   STRIPHEAD = cp y.tab.c dsc.cc
  284.   ifeq ($(USEMALLOCLIB),on)
  285.     MALLOC_I = -I/usr/local/gnu/include/dbmalloc
  286.     MALLOC_L = -ldbmalloc
  287.   else
  288.     MALLOC_I =
  289.     MALLOC_L =
  290.   endif
  291.   RM = rm
  292.   RMFLAGS = -f
  293.   CP = cp
  294.   MKDIR = mkdir
  295. endif
  296.  
  297. #CC Defines
  298. ifeq ($(OS),cc)
  299.   OBJ=o
  300.   CC = CC
  301.   CFLAGS = -g -D__CC $(MALLOC_I)
  302.   LOAD = -o
  303.   LDFLAGS = $(MALLOC_L) -L. -ldiamond
  304.   DEP =
  305.   FLEXFIX =
  306.   PARSERGEN = yacc
  307.   LIBRARIAN = ar rcv
  308.   RANLIB = ranlib
  309.   INSTALLBIN = install -m 755 -s -c
  310.   INSTALL = install -m 644 -c
  311.   LIBNAME = libdiamond.a
  312.   MULTILIB = libdbmulti.a
  313.   LIBOBJ := $(OBJS:%=%.o)
  314.   LIBOBJS = $(LIBOBJ)
  315.   STRIPHEAD = cp y.tab.c dsc.cc
  316.   ifeq ($(USEMALLOCLIB),on)
  317.     MALLOC_I = -I/usr/monash/contrib/include/dbmalloc
  318.     MALLOC_L = -L/usr/monash/contrib/lib -ldbmalloc
  319.   else
  320.     MALLOC_I =
  321.     MALLOC_L =
  322.   endif
  323.   RM = rm
  324.   RMFLAGS = -f
  325.   CP = cp
  326.   MKDIR = mkdir
  327. endif
  328.  
  329. #Ultrix Defines
  330. ifeq ($(OS),ultrix)
  331.   OBJ=o
  332.   CC = gcc
  333.   CFLAGS = -ggdb3 -Wall $(MALLOC_I)
  334.   LOAD = -o
  335.   LDFLAGS = $(MALLOC_L) -L. -ldiamond -lg++
  336.   DEP =
  337.   FLEXFIX =
  338.   PARSERGEN = yacc
  339.   LIBRARIAN = ar rcv
  340.   RANLIB = ranlib
  341.   INSTALLBIN = install -m 755 -s -c
  342.   INSTALL = install -m 644 -c
  343.   LIBNAME = libdiamond.a
  344.   MULTILIB = libdbmulti.a
  345.   LIBOBJ := $(OBJS:%=%.o)
  346.   LIBOBJS = $(LIBOBJ)
  347.   STRIPHEAD = cp y.tab.c dsc.cc
  348.   ifeq ($(USEMALLOCLIB),on)
  349.     MALLOC_I = -I/usr/monash/contrib/include/dbmalloc
  350.     MALLOC_L = -L/usr/monash/contrib/lib -ldbmalloc
  351.   else
  352.     MALLOC_I =
  353.     MALLOC_L =
  354.   endif
  355.   RM = rm
  356.   RMFLAGS = -f
  357.   CP = cp
  358.   MKDIR = mkdir
  359. endif
  360.  
  361. #OS/2 Defines
  362. ifeq ($(OS),os2-bc)
  363.   OBJ=obj
  364.   CC = bcc
  365.   CFLAGS = +Diamond.cfg
  366.   DEP = Diamond.cfg
  367.   LOAD = -e
  368.   LDFLAGS = diamond.lib
  369.   STRIPHEAD = move y.tab.c dsc.cc
  370.   FLEXFIX = move lexyy.c lex.yy.c
  371.   PARSERGEN = yacc
  372.   LIBRARIAN = tlib
  373.   RANLIB = dir
  374.   INSTALLBIN = copy
  375.   INSTALL = copy
  376.   LIBNAME = diamond.lib
  377.   LIBOBJ := $(OBJS:%=%.$(OBJ))
  378.   LIBOBJS := $(LIBOBJ:%=+%)
  379.   RM = del
  380.   RMFLAGS =
  381.   CP = copy
  382.   MKDIR = mkdir
  383. endif
  384.  
  385. #OS/2 emx/gcc Defines
  386. ifeq ($(OS),os2-emx)
  387.   OBJ=o
  388.   CC = gcc
  389.   CFLAGS = -O2 -s -Wall
  390.   LOAD = -o \
  391.  
  392.   LDFLAGS = -Zexe -L. -ldiamond -lgpp -liostream -ldiamond
  393.   DEP =
  394.   FLEXFIX = move lexyy.c lex.yy.c
  395.   PARSERGEN = yacc
  396.   LIBRARIAN = ar rcv
  397.   RANLIB = dir
  398.   INSTALLBIN = copy
  399.   INSTALL = copy
  400.   LIBNAME = diamond.a
  401.   MULTILIB = dbmulti.a
  402.   LIBOBJ := $(OBJS:%=%.o)
  403.   LIBOBJS = $(LIBOBJ)
  404.   STRIPHEAD = copy y.tab.c dsc.cc
  405.   RM = del
  406.   RMFLAGS =
  407.   CP = copy
  408.   MKDIR = mkdir
  409. endif
  410.  
  411. #OS/2 emx/gcc Defines
  412. ifeq ($(OS),os2-emx-syscalls)
  413.   OBJ=obj
  414.   CC = gcc
  415.   CFLAGS = -O2 -s -Wall -Zomf -Zsys
  416.   LOAD = -o \
  417.  
  418.   LDFLAGS = -Zexe -L. -ldiamonds -lgpp -liostream -ldiamonds
  419.   DEP =
  420.   FLEXFIX = move lexyy.c lex.yy.c
  421.   PARSERGEN = yacc
  422.   LIBRARIAN = emxomfar rcv
  423.   RANLIB = dir
  424.   INSTALLBIN = copy
  425.   INSTALL = copy
  426.   LIBNAME = diamonds.lib
  427.   MULTILIB = dbmulti.lib
  428.   LIBOBJ := $(OBJS:%=%.obj)
  429.   LIBOBJS = $(LIBOBJ)
  430.   STRIPHEAD = copy y.tab.c dsc.cc
  431.   RM = del
  432.   RMFLAGS =
  433.   CP = copy
  434.   MKDIR = mkdir
  435. endif
  436.  
  437.  
  438. .SUFFIXES:
  439. .SUFFIXES: .$(OBJ) .y,v .l,v .y .l .cc,v .cc .h,v .h
  440.  
  441.  
  442. #####################
  443. # RCS stuff for OS/2.
  444.  
  445. ifeq ($(OS),os2)
  446.  
  447. .path.cc,v = ./RCS
  448. .path.h,v = ./RCS
  449. .path.l,v = ./RCS
  450. .path.y,v = ./RCS
  451.  
  452. %.l : %.l,v
  453.     @if not exist $&.l co $&.l
  454.  
  455. %.y : %.y,v
  456.     @if not exist $&.y co $&.y
  457.  
  458. %.h : %.h,v
  459.     @if not exist $&.h co $&.h
  460.  
  461. %.cc : %.cc,v
  462.     @if not exist $&.cc co $&.cc
  463. endif
  464.  
  465. %.$(OBJ) : %.cc
  466.     $(CC) -I. -c $(CFLAGS) $(DFLAGS) $<
  467.  
  468. % : %.$(OBJ)
  469.     $(CC) $< $(LOAD)$@ $(LDFLAGS)
  470.  
  471. ######################################################
  472. # Targets start here
  473. #
  474. # Do not change anything under this comment.
  475. #
  476. ######################################################
  477.  
  478. all: lib $(BINARIES)
  479.  
  480. install: all
  481.     -$(MKDIR) $(BINDIR)
  482.     -$(MKDIR) $(LIBDIR)
  483.     -$(MKDIR) $(INCDIR)
  484.     $(INSTALLBIN) $(BINARIES) $(BINDIR)/dsc
  485.     $(INSTALL) $(LIBNAME) $(LIBDIR)/$(LIBNAME)
  486.     $(CP) $(RELATIONHEAD) $(INCDIR)
  487.  
  488. installmulti: multi
  489.     -$(MKDIR) $(LIBDIR)
  490.     -$(MKDIR) $(INCDIR)
  491.     $(INSTALL) $(MULTILIB) $(LIBDIR)/$(MULTILIB)
  492.     $(CP) $(INSTALLMULTIHEAD) $(INCDIR)
  493.  
  494. depend: $(ALLSRC) $(ALLHEAD) dsc.y
  495.     @echo -n "Backing up Makefile, "
  496.     @mv -f Makefile Makefile.bak
  497.     @awk '/^\#Do not remove/{n = 1;print $0} n==0' Makefile.bak >Makefile
  498.     @echo "now making dependencies"
  499.     @sh -c 'for a in $(ALLSRC) $(MULTISRC); do gcc -I. -M $$a; done' | sed -e 's/\.o/.$$(OBJ)/;s| /[^ ]*||g;/^ *\\$$/d' >> Makefile
  500.  
  501. clean:
  502.     rm -f lex.yy.c y.tab.c dsc.cc *.$(OBJ) $(MULTILIB) $(LIBNAME) dsc $(XTRACLEAN) version
  503.     rcsclean RCS/*
  504.  
  505. trans: db2txt
  506.  
  507. db2txt: db2txt.$(OBJ) $(LIBNAME)
  508.     $(CC) $(CFLAGS) $(LOAD)db2txt db2txt.$(OBJ) $(LDFLAGS)
  509.  
  510. lib: $(LIBNAME)
  511.  
  512. multi: $(MULTILIB) jeweler
  513.  
  514. $(MULTILIB): dclient.$(OBJ)
  515.     -$(RM) $(RMFLAGS) $(MULTILIB)
  516.     $(LIBRARIAN) $(MULTILIB) dclient.$(OBJ)
  517.     $(RANLIB) $(MULTILIB)
  518.  
  519. $(LIBNAME): $(LIBOBJ)
  520.     -$(RM) $(RMFLAGS) $(LIBNAME)
  521.     $(LIBRARIAN) $(LIBNAME) $(LIBOBJS)
  522.     $(RANLIB) $(LIBNAME)
  523.  
  524. lex.yy.c: dsc.l
  525.     flex dsc.l
  526.     $(FLEXFIX)
  527.  
  528. dsc.cc: lex.yy.c dsc.y
  529.     -$(RM) $(RMFLAGS) dsc.cc
  530.     $(PARSERGEN) dsc.y
  531.     $(STRIPHEAD)
  532.  
  533. dsc: lex.yy.c dsc.$(OBJ) $(LIBNAME)
  534.     $(CC) $(CFLAGS) $(LOAD)dsc dsc.$(OBJ) $(LDFLAGS)
  535.  
  536. jeweler: gib.$(OBJ) $(LIBNAME)
  537.     $(CC) $(CFLAGS) $(LOAD)jeweler gib.$(OBJ) $(LDFLAGS)
  538.  
  539. version: version.$(OBJ) $(LIBNAME) ns.dbc
  540.     $(CC) $(CFLAGS) $(LOAD)version version.$(OBJ) $(LDFLAGS)
  541.  
  542. dispr: dispr.$(OBJ) $(LIBNAME)
  543.     $(CC) $(CFLAGS) $(LOAD)dispr dispr.$(OBJ) $(LDFLAGS)
  544.  
  545. dist: $(DIST)
  546.     (cd ..; tar cf - $(DISTFILES) | compress > diamond.tar.Z)
  547.  
  548. ######################
  549. # Test suite....
  550. ######################
  551.  
  552. dbotest: $(LIBNAME)
  553.     dsc $(TESTDBFILES) $(TESTSCHEMA) test
  554.     $(CC) $(CFLAGS) $(LOAD)dbotest test.cc dbotest.cc $(LDFLAGS)
  555.  
  556. tester: tester.$(OBJ) $(LIBNAME)
  557.     $(CC) $(CFLAGS) $(LOAD)tester tester.$(OBJ) $(LDFLAGS)
  558.  
  559. btdump: btdump.$(OBJ) $(LIBNAME)
  560.     $(CC) $(CFLAGS) $(LOAD)btdump btdump.$(OBJ) $(LDFLAGS)
  561.  
  562. RTEST_O=rtest.$(OBJ) rand.$(OBJ) $(LIBNAME)
  563.  
  564. rtest: $(RTEST_O)
  565.     $(CC) $(CFLAGS) $(LOAD)rtest $(CFLAGS) $(RTEST_O) $(LDFLAGS) -lm
  566.  
  567. test1: test1.$(OBJ) myobj.$(OBJ) $(LIBNAME)
  568.     $(CC) $(CFLAGS) $(LOAD)test1 test1.$(OBJ) $(LDFLAGS)
  569.  
  570.  
  571. #########################
  572. # Automatic dependancies.
  573. #########################
  574.  
  575. dsc.$(OBJ) : dsc.cc idxinfo.h d_types.h rserv.h defs.h btree.h object.h generate.h cache.h dberr.h mserv.h
  576.  
  577. #Do not remove this line or I will be very very angry (and broken).
  578. btree.$(OBJ) : btree.cc \
  579.   ./btree.h ./defs.h ./dberr.h \
  580.   ./rserv.h ./cache.h ./object.h ./dbstr.h ./mystring.h
  581. bucket.$(OBJ) : bucket.cc ./defs.h ./dberr.h \
  582.   ./object.h ./dbstr.h ./mystring.h \
  583.  
  584. d_types.$(OBJ) : d_types.cc ./d_types.h ./dbstr.h ./mystring.h \
  585.   ./defs.h ./dberr.h
  586. dbase.$(OBJ) : dbase.cc \
  587.   ./dbase.h ./nserver.h \
  588.   ./defs.h ./dberr.h ./dbobj.h ./idxinfo.h \
  589.   ./rserv.h ./cache.h ./btree.h ./object.h ./dbstr.h ./mystring.h ./mserv.h \
  590.   ./diarel.h \
  591.   ./d_types.h ./version.h
  592. dbobj.$(OBJ) : dbobj.cc \
  593.   ./dbobj.h ./idxinfo.h \
  594.   ./rserv.h ./defs.h ./dberr.h ./cache.h \
  595.   ./btree.h ./object.h ./dbstr.h ./mystring.h \
  596.   ./mserv.h \
  597.   ./d_types.h
  598. diarel.$(OBJ) : diarel.cc ./diarel.h ./object.h ./defs.h ./dberr.h \
  599.   ./dbstr.h \
  600.   ./mystring.h \
  601.   ./dbase.h ./nserver.h \
  602.   ./dbobj.h ./idxinfo.h \
  603.   ./rserv.h ./cache.h ./btree.h ./mserv.h \
  604.   ./d_types.h
  605. dispr.$(OBJ) : dispr.cc \
  606.   idxinfo.h \
  607.   d_types.h ./dbstr.h ./mystring.h \
  608.   ./defs.h ./dberr.h
  609. generate.$(OBJ) : generate.cc \
  610.   ./defs.h ./dberr.h ./utils.h ./idxinfo.h ./d_types.h ./dbstr.h ./mystring.h
  611. idxinfo.$(OBJ) : idxinfo.cc \
  612.   ./idxinfo.h \
  613.  
  614. main.$(OBJ) : main.cc myobj.h object.h ./defs.h ./dberr.h \
  615.   ./dbstr.h ./mystring.h \
  616.  
  617. myobj.$(OBJ) : myobj.cc myobj.h object.h ./defs.h ./dberr.h \
  618.   ./dbstr.h ./mystring.h \
  619.  
  620. nserver.$(OBJ) : nserver.cc \
  621.   ./nserver.h \
  622.   ./defs.h ./dberr.h \
  623.  
  624. rand.$(OBJ) : rand.cc rand.h \
  625.  
  626. rserv.$(OBJ) : rserv.cc \
  627.   ./rserv.h ./defs.h ./dberr.h \
  628.   ./cache.h
  629. rtest.$(OBJ) : rtest.cc \
  630.   rserv.h ./defs.h ./dberr.h \
  631.   ./cache.h rand.h
  632. search.$(OBJ) : search.cc
  633. test1.$(OBJ) : test1.cc myobj.h object.h ./defs.h ./dberr.h \
  634.   ./dbstr.h ./mystring.h \
  635.   rserv.h ./cache.h
  636. tester.$(OBJ) : tester.cc myobj.h object.h ./defs.h ./dberr.h \
  637.   ./dbstr.h ./mystring.h \
  638.   rserv.h ./cache.h
  639. dberr.$(OBJ) : dberr.cc \
  640.   ./dberr.h
  641. cache.$(OBJ) : cache.cc \
  642.   ./cache.h ./defs.h ./dberr.h \
  643.  
  644. btdump.$(OBJ) : btdump.cc \
  645.   btree.h ./defs.h ./dberr.h \
  646.   ./rserv.h \
  647.   ./cache.h ./object.h ./dbstr.h ./mystring.h \
  648.  
  649. version.$(OBJ) : version.cc dbase.h ./nserver.h \
  650.   ./defs.h \
  651.   ./dberr.h ./dbobj.h ./idxinfo.h \
  652.   ./rserv.h ./cache.h ./btree.h ./object.h \
  653.   ./dbstr.h ./mystring.h \
  654.   ./mserv.h \
  655.  
  656. mystring.$(OBJ) : mystring.cc \
  657.   ./mystring.h \
  658.   ./defs.h ./dberr.h
  659. mserv.$(OBJ) : mserv.cc ./mserv.h \
  660.   ./mystring.h \
  661.   ./defs.h ./dberr.h
  662. diagrel.$(OBJ) : diagrel.cc \
  663.   ./diagrel.h ./diarel.h ./object.h ./defs.h ./dberr.h ./dbstr.h \
  664.   ./mystring.h \
  665.   ./dbase.h ./nserver.h \
  666.   ./dbobj.h ./idxinfo.h \
  667.   ./rserv.h ./cache.h ./btree.h ./mserv.h \
  668.   ./d_types.h ./ordcomp.h
  669. db2txt.$(OBJ) : db2txt.cc \
  670.   ./diagrel.h ./diarel.h ./object.h ./defs.h ./dberr.h \
  671.   ./dbstr.h ./mystring.h \
  672.   ./dbase.h ./nserver.h \
  673.   ./dbobj.h ./idxinfo.h \
  674.   ./rserv.h ./cache.h ./btree.h ./mserv.h \
  675.   ./d_types.h \
  676.   ./generate.h
  677. utils.$(OBJ) : utils.cc \
  678.  
  679. gib.$(OBJ) : gib.cc gib.h diagrel.h ./diarel.h ./object.h ./defs.h ./dberr.h \
  680.   ./dbstr.h ./mystring.h \
  681.   ./dbase.h ./nserver.h \
  682.   ./dbobj.h ./idxinfo.h ./rserv.h ./cache.h \
  683.   ./btree.h ./mserv.h \
  684.   ./d_types.h \
  685.   dcdefs.h \
  686.   ipcproto.h \
  687.  
  688. dclient.$(OBJ) : dclient.cc \
  689.   ipcproto.h \
  690.   dclient.h defs.h ./dberr.h \
  691.   dcdefs.h object.h ./defs.h ./dbstr.h \
  692.   ./mystring.h
  693.