"Fossies" - the Fresh Open Source Software Archive

Member "nbench-byte-2.2.3/Makefile" (30 Dec 2004, 5039 Bytes) of package /linux/misc/old/nbench-byte-2.2.3.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # Makefile for nbench, December 11, 1997, Uwe F. Mayer <mayer@tux.org>
    2 # Updated February 18, 2003
    3 
    4 default: nbench
    5 
    6 ##########################################################################
    7 #   If you are using gcc-2.7.2.3 or earlier:
    8 #   The optimizer of gcc has a bug and in general you should not specify
    9 #   -funroll-loops together with -O (or -O2, -O3, etc.)
   10 #   This bug is supposed to be fixed with release 2.8 of gcc.
   11 #
   12 #   This bug does NOT seem to have an effect on the correct compilation
   13 #   of this benchmark suite on my Linux box. However, it leads to
   14 #   the dreaded "internal compiler error" message on our alpha
   15 #   running DEC Unix 4.0b. The Linux-binary that was used to obtain
   16 #   the baseline results was nevertheless compiled with
   17 #   CFLAGS = -s -static -Wall -O3 -fomit-frame-pointer -funroll-loops
   18 #
   19 # You should leave -static in the CFLAGS so that your sysinfo can be
   20 # compiled into the executable.
   21 
   22 CC = gcc
   23 
   24 # generic options for gcc
   25 CFLAGS = -s -static -Wall -O3
   26 
   27 # if your gcc lets you do it, then try this one
   28 #CFLAGS = -s -static -Wall -O3 -fomit-frame-pointer -funroll-loops
   29 
   30 # for gcc on an older Pentium type processor you can try the following
   31 #CFLAGS = -s -static -O3 -fomit-frame-pointer -Wall -m486 \
   32 #	-fforce-addr -fforce-mem -falign-loops=2 -falign-functions=2 \
   33 #	-falign-jumps=2 -funroll-loops
   34 
   35 # for a newer gcc on a newer Pentium type processor you can try the following
   36 #CFLAGS = -s -static -O3 -fomit-frame-pointer -Wall -march=i686 \
   37 #	-fforce-addr -fforce-mem -falign-loops=2 -falign-functions=2 \
   38 #	-falign-jumps=2 -funroll-loops
   39 
   40 # for a newer gcc on an Athlon XP type processor you can try the following
   41 #CFLAGS = -s -static -O3 -fomit-frame-pointer -Wall -march=athlon-xp \
   42 #	-fforce-addr -fforce-mem -falign-loops=2 -falign-functions=2 \
   43 #	-falign-jumps=2 -funroll-loops
   44 
   45 # For debugging using gcc
   46 #CFLAGS = -g -O3 -Wall -DDEBUG
   47 
   48 ##########################################################################
   49 # For Linux machines with more than one binary format.
   50 # The default binaries, depends on your system whether it's elf or aout.
   51 MACHINE=
   52 # a.out code for linux on an elf machine
   53 #MACHINE= -bi486-linuxaout
   54 # elf code for linux on an a.out machine
   55 #MACHINE= -bi486-linuxelf
   56 # if you want a different compiler version and different binaries, for example
   57 #MACHINE= -V2.7.2 -bi486-linuxaout
   58 
   59 ##########################################################################
   60 # Read the file README.nonlinux if you are not using Linux
   61 
   62 # for DEC Unix using cc you can try
   63 #CC = cc
   64 #CFLAGS = -O3
   65 #LINKFLAGS = -s -non_shared
   66 
   67 # for SunOS using cc
   68 #CC = cc
   69 #CFLAGS = -O3 -s
   70 
   71 # for DEC Ultrix using cc
   72 #CC = cc
   73 #CFLAGS = -O2
   74 #LINKFLAGS = -s
   75 
   76 # for a Mac with OsX and the Darwin environment
   77 #CC = cc
   78 #CFLAGS = -O3 -DOSX
   79 
   80 # For debugging using cc
   81 #CC = cc
   82 #CFLAGS = -g -DDEBUG
   83 
   84 ##########################################################################
   85 # If your system does not understand the system command "uname -s -r"
   86 # then comment this out
   87 
   88 # NO_UNAME= -DNO_UNAME
   89 
   90 ##########################################################################
   91 # For any Unix flavor you need -DLINUX
   92 # You also need -DLINUX to get the new indices
   93 
   94 DEFINES= -DLINUX $(NO_UNAME)
   95 
   96 ##########################################################################
   97 # For LINUX-like systems with gcc
   98 sysinfoc.c: Makefile
   99 	./sysinfo.sh $(CC) $(MACHINE) $(DEFINES) $(CFLAGS)
  100 
  101 sysinfo.c: Makefile
  102 	./sysinfo.sh $(CC) $(MACHINE) $(DEFINES) $(CFLAGS)
  103 
  104 ##########################################################################
  105 # For non-LINUX systems
  106 # Edit the files sysinfo.c and sysinfoc.c to include your system information
  107 # and take sysinfo.c and sysinfoc.c out of the dependencies for nbench0.o
  108 
  109 hardware.o: hardware.c hardware.h Makefile
  110 	$(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\
  111 		-c hardware.c
  112 
  113 nbench0.o: nbench0.h nbench0.c nmglobal.h pointer.h hardware.h\
  114 	   Makefile sysinfo.c sysinfoc.c
  115 	$(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\
  116 		-c nbench0.c
  117 
  118 emfloat.o: emfloat.h emfloat.c nmglobal.h pointer.h Makefile
  119 	$(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\
  120 		-c emfloat.c
  121 
  122 pointer.h: pointer Makefile
  123 	$(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\
  124 		-o pointer pointer.c
  125 	rm -f pointer.h
  126 	if [ "4" = `./pointer` ] ; then touch pointer.h ;\
  127 	else echo "#define LONG64" >pointer.h ; fi
  128 
  129 misc.o: misc.h misc.c Makefile
  130 	$(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\
  131 		-c misc.c
  132 
  133 nbench1.o: nbench1.h nbench1.c wordcat.h nmglobal.h pointer.h Makefile
  134 	$(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\
  135 		-c nbench1.c
  136 
  137 sysspec.o: sysspec.h sysspec.c nmglobal.h pointer.h Makefile
  138 	$(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\
  139 		-c sysspec.c
  140 
  141 nbench: emfloat.o misc.o nbench0.o nbench1.o sysspec.o hardware.o
  142 	$(CC) $(MACHINE) $(DEFINES) $(CFLAGS) $(LINKFLAGS)\
  143 		emfloat.o misc.o nbench0.o nbench1.o sysspec.o hardware.o\
  144 		-o nbench -lm
  145 
  146 ##########################################################################
  147 
  148 clean:
  149 	- /bin/rm -f *.o *~ \#* core a.out hello sysinfo.c sysinfoc.c \
  150 		 bug pointer pointer.h debugbit.dat
  151 
  152 mrproper: clean
  153 	- /bin/rm -f nbench