home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / database / bplus / makefile < prev    next >
Encoding:
Makefile  |  1989-02-23  |  2.0 KB  |  95 lines

  1. # makefile for UNIX bplus test
  2.  
  3. # Bplus routines, utility routines, and the whole library
  4. PLUSLIB        = bplus.o find1stkey.o
  5. UTILLIB        = filelen.o memmove.o
  6. LIB        = $(PLUSLIB) $(UTILLIB)
  7. LIBSRC        = bplus.c find1stkey.c filelen.c memmove.c
  8.  
  9. TESTS        = utest3 utest4 zoodb
  10. TESTOBJ        = utest3.o utest4.o zoodb.o
  11. TESTSRC        = utest3.c utest4.c s.zoodb.c
  12.  
  13. DEMOSRC        = ndb.c lookup.c names.c
  14.  
  15. # C flags, load flags, misc (shared) flags
  16. CFLAGS        = -O
  17. LFLAGS        =
  18. MFLAGS        = 
  19. CC        = cc $(CFLAGS) ${MFLAGS}
  20.  
  21. # archive for distribution
  22. BPLUSARC    = bplus11a.arc
  23.  
  24. all: $(TESTS)
  25.  
  26. $(TESTS): bplus.a $$@.o
  27.     $(CC) $(LFLAGS) -o $@ $@.o bplus.a
  28.  
  29. $(PLUSLIB):    bplus.h
  30. $(TESTOBJ):    bplus.h
  31.  
  32. bplus.a: $(LIB)
  33.     ar rv bplus.a $?
  34.     ranlib bplus.a
  35.  
  36. # special section to make libraries under Xenix386, for Xenix286 and MS-DOS
  37. extlib:        $(LIBSRC) bplus.h
  38.     @echo "Making x286 small"
  39.     cc -c -O -M2 $(LIBSRC)
  40.     ar rv Sbplus286.a $(LIB)
  41.     ranlib Sbplus286.a
  42.     @echo "Making x286 large"
  43.     cc -c -O -M2l $(LIBSRC)
  44.     ar rv Lbplus286.a $(LIB)
  45.     ranlib Lbplus286.a
  46.     @echo "Making DOS small"
  47.     cc -c -O -M2 -dos $(LIBSRC)
  48.     ar rv SbplusDOS.a $(LIB)
  49.     ranlib SbplusDOS.a
  50.     @echo "Making DOS large"
  51.     cc -c -O -M2l -dos $(LIBSRC)
  52.     ar rv LbplusDOS.a $(LIB)
  53.     ranlib LbplusDOS.a
  54.     @echo "Making 386 version"
  55.     $(MAKE) bplus.a
  56.     touch extlib
  57.  
  58. .SUFFIXES:    .exe
  59.  
  60. # special inference rules, DOS and SCCS
  61. .o.exe:
  62.     $(CC) -o $@ -dos $< bplus.a
  63. .c~.o:
  64.     get -s $?
  65.     $(CC) -c $*.c && rm -f $*.c
  66. .c.o:
  67.     $(CC) -c $*.c
  68.  
  69. MISCSAVE    = bplus.h bplus.doc makefile read.me
  70. bplus.zoo:    $(TESTSRC) $(LIBSRC) $(MISCSAVE) $(DEMOSRC)
  71.     zoo aunPP bplus $?
  72.  
  73. bplusarc:    $(BPLUSARC)
  74.  
  75. $(BPLUSARC):    $(LIBSRC) $(MISCSAVE) $(DEMOSRC)
  76.     rm -f $(BPLUSARC)
  77.     arc a $(BPLUSARC) $(LIBSRC) $(MISCSAVE) $(DEMOSRC)
  78.  
  79. shar:        bplus.shar
  80. bplus.shar:    $(LIBSRC) bplus.h
  81.     $${SHAR:-shar} $(LIBSRC) bplus.h > bplus.shar
  82.  
  83. # phone number database software
  84.  
  85. PDBX        = ndb lookup
  86. pdbx:        $(PDBX) lookup.exe
  87.  
  88. $(PDBX):    bplus.a $$@.o
  89.     cc $(MFLAGS) $(LFLAGS) -o $@ $@.o bplus.a
  90.  
  91. lookup.exe:    lookup.c
  92.     $(CC) $(LFLAGS) -dos -o lookup.exe lookup.c bplus.a
  93.  
  94. ndb.o lookup.o:    bplus.h
  95.