home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 311_01 / makefile.tbo < prev    next >
Makefile  |  1990-04-22  |  2KB  |  103 lines

  1. #
  2. # makefile - This is a sample makefile for building the DB library and
  3. # (turbo)    the test programs. It is to be used with a Unix like MAKE
  4. #         utility.  You will need to read through the file and make
  5. #         changes needed for your compiler.
  6. #
  7. #         (1) Select desired memory model for 80xxx machines.
  8. #
  9. #         (2) Define the compiler 
  10. #            MSC     - Microsoft C
  11. #            TURBO   - Turbo C
  12. #            SYSV    - AT&T 3B1 
  13. #            ULTRIX  - DEC Ultrix-32 
  14. #
  15. #         (3) Define ANSI if your compiler supports the ANSI
  16. #             function prototypes
  17. #
  18. #         (4) Decide which modules you are going to use. DB_MAIN.C
  19. #             has conditional code for each of the file types.
  20. #         You can thus built a library which supports only the
  21. #         file types you intend to use.
  22. #            ALL     - All file types
  23. #            SEQ     - Sequential
  24. #            RAN     - Random
  25. #            IDX     - Index
  26. #            VAR     - Varaible
  27.  
  28.  
  29. CCFLAGS=-ms -c -DTURBO -DANSI
  30. CC=tcc
  31. LBR=/tc/tlibr
  32. LINK=tcc
  33.  
  34. all: lib tests
  35.  
  36. lib: libdb.lib
  37.  
  38. libdb.lib: db_main.obj db_seq.obj db_ran.obj db_idx.obj db_var.obj \
  39.        fname.obj sort.obj db_dict.obj
  40.     $(LBR) libdb-+db_main-+db_seq-+db_ran-+db_idx-+db_var-+fname-+sort-+db_dict
  41.  
  42. db_main.obj: db_main.c db.h dblib.h
  43.     $(CC) $(CCFLAGS) -DALL  db_main.c
  44.  
  45. db_seq.obj:  db_seq.c db.h dblib.h
  46.     $(CC) $(CCFLAGS) db_seq.c
  47.  
  48. db_ran.obj: db_ran.c db.h dblib.h
  49.     $(CC) $(CCFLAGS) db_ran.c
  50.  
  51. db_idx.obj: db_idx.c db.h dblib.h
  52.     $(CC) $(CCFLAGS) db_idx.c
  53.  
  54. db_var.obj: db_var.c db.h dblib.h
  55.     $(CC) $(CCFLAGS) db_var.c
  56.  
  57. db_dict.obj: db_dict.c db.h dblib.h
  58.     $(CC) $(CCFLAGS) db_dict.c
  59.  
  60. fname.obj: fname.c
  61.     $(CC) $(CCFLAGS) fname.c
  62.  
  63. sort.obj: sort.c dblib.h
  64.     $(CC) $(CCFLAGS) sort.c
  65.  
  66. tests: stest.exe rtest.exe itest.exe vtest.exe sortest.exe dtest.exe
  67.  
  68. stest.exe: stest.obj libdb.lib 
  69.     $(LINK) stest.obj libdb.lib 
  70.  
  71. rtest.exe: rtest.obj libdb.lib 
  72.     $(LINK) rtest.obj libdb.lib 
  73.  
  74. itest.exe: itest.obj libdb.lib 
  75.     $(LINK) itest.obj libdb.lib 
  76.  
  77. vtest.exe: vtest.obj libdb.lib 
  78.     $(LINK) vtest.obj libdb.lib 
  79.  
  80. sortest.exe: sortest.obj libdb.lib
  81.     $(LINK) sortest.obj libdb.lib
  82.  
  83. dtest.exe: dtest.obj libdb.lib
  84.     $(LINK) dtest.obj libdb.lib
  85.  
  86. stest.obj: stest.c db.h
  87.     $(CC) $(CCFLAGS) stest.c
  88.  
  89. rtest.obj: rtest.c db.h
  90.     $(CC) $(CCFLAGS) rtest.c
  91.  
  92. itest.obj: itest.c db.h
  93.     $(CC) $(CCFLAGS) itest.c
  94.  
  95. vtest.obj: vtest.c db.h
  96.     $(CC) $(CCFLAGS) vtest.c
  97.  
  98. sortest.obj: sortest.c
  99.     $(CC) $(CCFLAGS) sortest.c
  100.  
  101. dtest.obj: dtest.c db.h
  102.     $(CC) $(CCFLAGS) dtest.c
  103.