home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Libraries / SortLib 2.0 / systems / unix / makefile
Encoding:
Makefile  |  1994-11-30  |  3.3 KB  |  121 lines  |  [TEXT/MPS ]

  1. # Copyright (c) 1990-1994 Ari Halberstadt
  2.    
  3. # This file is part of a free program. For precise terms of distribution
  4. # and use please see the file "Distribution" accompanying this software.
  5. # This notice and the copyright notice must remain intact in all copies
  6. # of this file. The file "Distribution" must be available to anyone
  7. # receiving copies of this file.
  8.  
  9. # This is the makefile for "Sortlib" on Unix operating systems. You will
  10. # have to set the appropriate defines for your specific system (see the
  11. # comments following the definition of CFLAGS). This software has been
  12. # succesfully tested on a variety of Unix systems using the GNU C compiler
  13. # (gcc). You should be able to substitute any other ANSI compliant compiler.
  14.  
  15. # Note: this makefile works most of the Unix systems I tested it on,
  16. # but fails with Ultrix make (Ultrix make ignores the VPATH
  17. # variable). Therefore, on Ultrix, either use the GNU make program,
  18. # or figure out some other way around the problem.
  19.  
  20. # Use these defines when appropriate:
  21. #
  22. #  -DSYS_MACINTOSH=1 When compiling on a Macintosh computer.
  23. #  -DSYS_UNIX=1         When compiling on any Unix box (NeXT, Ultrix, AUX, etc.).
  24. #  -DSYS_ULTRIX=1    When compiling on Ultrix systems.
  25. #  -DSYS_NeXT=1         When compiling on NeXT systems.
  26. #  -DMPW=1         When compiling using Macintosh Programmers Workshop.
  27. #  -DNDEBUG=1         To turn off assertions and disable debug code.
  28. #  -DPROFILE=1         When profiling.
  29. #  -DMAXDATA=32768
  30. #    Sets the maximum number of integers to sort. Notice that
  31. #    this number is very system dependent: while a 14MIPS
  32. #    Unix machine may take only a few seconds to sort 130000
  33. #    integers, a Macintosh Plus could take a lot longer. Also,
  34. #     some implementations of the standard qsort may be very
  35. #    inefficient. Use trial and error to find the best value.
  36. #    You may also have to modify the table in the file "sort.c"
  37. #    which sets maximum values for each of the sorting tests
  38. #    and functions.
  39. #
  40. # These defines are used to describe the environment we're running under.
  41. # The strings are printed at the start of the output from the program.
  42. #
  43. #  -DMC_NAME='"VAX 11/780"'
  44. #  -DOS_NAME='"Unix BSD4.3"'
  45. #  -DCC_NAME='"gcc"'
  46. #
  47. # Add these flags for profiling:
  48. #
  49. #   CFLAGS = -DPROFILE=1 -p
  50. #
  51. # Add these flags for debugging:
  52. #
  53. #   CFLAGS = -pedantic -g -nostdinc
  54.  
  55. OUTPUT    = sorttest
  56.  
  57. OBJECTS = \
  58.     ansi.o \
  59.     sort.o \
  60.     sortsys.o \
  61.     hpsort.o \
  62.     insort.o \
  63.     mgsort.o \
  64.     qksort.o \
  65.     shsort.o \
  66.     thpsort.o \
  67.     tinsort.o \
  68.     tmgsort.o \
  69.     tqksort.o \
  70.     tshsort.o
  71.  
  72. HEADERS = \
  73.     sortlib.h \
  74.     sort_private.h \
  75.     tsort_private.h
  76.  
  77. VPATH    = source:source/sortlib:source/tsortlib:source/sorttest
  78.  
  79. CC    = cc
  80.  
  81. DEFINES = \
  82.     -DNDEBUG=1 \
  83.     -DSYS_UNIX=1 \
  84.     -DOS_NAME='"Unix"' \
  85.     -DCC_NAME='"gcc"' \
  86.     -DMC_NAME='"Irix"' \
  87.     -DDATA_NELEM=32768
  88.  
  89.  
  90. GCCFLAGS = \
  91.     -O \
  92.     -Wall \
  93.     -Wshadow \
  94.     -Wpointer-arith \
  95.     -Wcast-qual \
  96.     -pedantic \
  97.     -nostdinc \
  98.     -I/usr/include \
  99.     -Isource/sortlib \
  100.     -Isource/tsortlib \
  101.     -Isource/sorttest \
  102.     $(DEFINES)
  103.  
  104. CCFLAGS = \
  105.     -O \
  106.     -I/usr/include \
  107.     -Isource/sortlib \
  108.     -Isource/tsortlib \
  109.     -Isource/sorttest \
  110.     $(DEFINES)
  111.  
  112. CFLAGS = $(CCFLAGS)
  113.     
  114. $(OUTPUT): $(OBJECTS)
  115.        $(CC) $(CFLAGS) $(DEFINES) $(OBJECTS) -o $(OUTPUT)
  116.  
  117. $(OBJECTS): $(HEADERS)
  118.  
  119. #clean:;    $(RM) *.o *~ core
  120.  
  121.