home *** CD-ROM | disk | FTP | other *** search
Makefile | 1994-11-30 | 3.3 KB | 121 lines | [TEXT/MPS ] |
- # Copyright (c) 1990-1994 Ari Halberstadt
-
- # This file is part of a free program. For precise terms of distribution
- # and use please see the file "Distribution" accompanying this software.
- # This notice and the copyright notice must remain intact in all copies
- # of this file. The file "Distribution" must be available to anyone
- # receiving copies of this file.
-
- # This is the makefile for "Sortlib" on Unix operating systems. You will
- # have to set the appropriate defines for your specific system (see the
- # comments following the definition of CFLAGS). This software has been
- # succesfully tested on a variety of Unix systems using the GNU C compiler
- # (gcc). You should be able to substitute any other ANSI compliant compiler.
-
- # Note: this makefile works most of the Unix systems I tested it on,
- # but fails with Ultrix make (Ultrix make ignores the VPATH
- # variable). Therefore, on Ultrix, either use the GNU make program,
- # or figure out some other way around the problem.
-
- # Use these defines when appropriate:
- #
- # -DSYS_MACINTOSH=1 When compiling on a Macintosh computer.
- # -DSYS_UNIX=1 When compiling on any Unix box (NeXT, Ultrix, AUX, etc.).
- # -DSYS_ULTRIX=1 When compiling on Ultrix systems.
- # -DSYS_NeXT=1 When compiling on NeXT systems.
- # -DMPW=1 When compiling using Macintosh Programmers Workshop.
- # -DNDEBUG=1 To turn off assertions and disable debug code.
- # -DPROFILE=1 When profiling.
- # -DMAXDATA=32768
- # Sets the maximum number of integers to sort. Notice that
- # this number is very system dependent: while a 14MIPS
- # Unix machine may take only a few seconds to sort 130000
- # integers, a Macintosh Plus could take a lot longer. Also,
- # some implementations of the standard qsort may be very
- # inefficient. Use trial and error to find the best value.
- # You may also have to modify the table in the file "sort.c"
- # which sets maximum values for each of the sorting tests
- # and functions.
- #
- # These defines are used to describe the environment we're running under.
- # The strings are printed at the start of the output from the program.
- #
- # -DMC_NAME='"VAX 11/780"'
- # -DOS_NAME='"Unix BSD4.3"'
- # -DCC_NAME='"gcc"'
- #
- # Add these flags for profiling:
- #
- # CFLAGS = -DPROFILE=1 -p
- #
- # Add these flags for debugging:
- #
- # CFLAGS = -pedantic -g -nostdinc
-
- OUTPUT = sorttest
-
- OBJECTS = \
- ansi.o \
- sort.o \
- sortsys.o \
- hpsort.o \
- insort.o \
- mgsort.o \
- qksort.o \
- shsort.o \
- thpsort.o \
- tinsort.o \
- tmgsort.o \
- tqksort.o \
- tshsort.o
-
- HEADERS = \
- sortlib.h \
- sort_private.h \
- tsort_private.h
-
- VPATH = source:source/sortlib:source/tsortlib:source/sorttest
-
- CC = cc
-
- DEFINES = \
- -DNDEBUG=1 \
- -DSYS_UNIX=1 \
- -DOS_NAME='"Unix"' \
- -DCC_NAME='"gcc"' \
- -DMC_NAME='"Irix"' \
- -DDATA_NELEM=32768
-
-
- GCCFLAGS = \
- -O \
- -Wall \
- -Wshadow \
- -Wpointer-arith \
- -Wcast-qual \
- -pedantic \
- -nostdinc \
- -I/usr/include \
- -Isource/sortlib \
- -Isource/tsortlib \
- -Isource/sorttest \
- $(DEFINES)
-
- CCFLAGS = \
- -O \
- -I/usr/include \
- -Isource/sortlib \
- -Isource/tsortlib \
- -Isource/sorttest \
- $(DEFINES)
-
- CFLAGS = $(CCFLAGS)
-
- $(OUTPUT): $(OBJECTS)
- $(CC) $(CFLAGS) $(DEFINES) $(OBJECTS) -o $(OUTPUT)
-
- $(OBJECTS): $(HEADERS)
-
- #clean:; $(RM) *.o *~ core
-
-