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.3b1 < prev    next >
Makefile  |  1990-04-22  |  2KB  |  100 lines

  1. #
  2. # makefile - This is a sample makefile for building the DB library and
  3. # (3B1)         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=-c -g -DSYSV
  30. CC=cc
  31.  
  32. all: lib tests
  33.  
  34. lib: libdb.a 
  35.  
  36. libdb.a: db_main.o db_seq.o db_ran.o db_idx.o db_var.o fname.o sort.o db_dict.o
  37.     ar r libdb.a db_main.o db_seq.o db_ran.o db_idx.o db_var.o fname.o sort.o db_dict.o
  38.  
  39. db_main.o: db_main.c db.h dblib.h
  40.     $(CC) $(CCFLAGS) -DALL  db_main.c
  41.  
  42. db_seq.o:  db_seq.c db.h dblib.h
  43.     $(CC) $(CCFLAGS) db_seq.c
  44.  
  45. db_ran.o: db_ran.c db.h dblib.h
  46.     $(CC) $(CCFLAGS) db_ran.c
  47.  
  48. db_idx.o: db_idx.c db.h dblib.h
  49.     $(CC) $(CCFLAGS) db_idx.c
  50.  
  51. db_var.o: db_var.c db.h dblib.h
  52.     $(CC) $(CCFLAGS) db_var.c
  53.  
  54. db_dict.o: db_dict.c db.h dblib.h
  55.     $(CC) $(CCFLAGS) db_dict.c
  56.  
  57. fname.o: fname.c
  58.     $(CC) $(CCFLAGS) fname.c
  59.  
  60. sort.o: sort.c dblib.h
  61.     $(CC) $(CCFLAGS) sort.c
  62.  
  63. tests: stest rtest itest vtest dtest sortest
  64.  
  65. stest: stest.o libdb.a
  66.     $(CC)  stest.o libdb.a -g -o stest
  67.  
  68. rtest: rtest.o libdb.a
  69.     $(CC)  rtest.o libdb.a -g -o rtest
  70.  
  71. itest: itest.o libdb.a
  72.     $(CC)  itest.o libdb.a -g -o itest
  73.  
  74. vtest: vtest.o libdb.a
  75.     $(CC)  vtest.o libdb.a -g -o vtest
  76.  
  77. dtest: dtest.o libdb.a
  78.     $(CC)  dtest.o libdb.a -g -o dtest
  79.  
  80. sortest: sortest.o libdb.a
  81.     $(CC)  sortest.o libdb.a -o sortest
  82.  
  83. stest.o: stest.c db.h
  84.     $(CC) $(CCFLAGS) stest.c
  85.  
  86. rtest.o: rtest.c db.h
  87.     $(CC) $(CCFLAGS) rtest.c
  88.  
  89. itest.o: itest.c db.h
  90.     $(CC) $(CCFLAGS) itest.c
  91.  
  92. vtest.o: vtest.c db.h
  93.     $(CC) $(CCFLAGS) vtest.c
  94.  
  95. dtest.o: dtest.c db.h
  96.     $(CC) $(CCFLAGS) dtest.c
  97.  
  98. sortest.o: sortest.c
  99.     $(CC) $(CCFLAGS) sortest.c
  100.