From 10e698ace1542d5351935fcb5216af5514a4f7b0 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Thu, 13 Nov 2008 22:36:25 +0000 Subject: -- Replace LINUX define with standard __linux__ -- Remove more useless prototypes from useless nbench1.h git-svn-id: svn://mattst88.com/svn/cleanbench/trunk@18 0d43b9a7-5ab2-4d7b-af9d-f64450cef757 --- Makefile | 162 +++++++-------------------------------------------------------- 1 file changed, 17 insertions(+), 145 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 0bfa36a..e73cb87 100644 --- a/Makefile +++ b/Makefile @@ -1,193 +1,65 @@ -# Makefile for nbench, December 11, 1997, Uwe F. Mayer -# Updated February 18, 2003 - default: nbench -########################################################################## -# If you are using gcc-2.7.2.3 or earlier: -# The optimizer of gcc has a bug and in general you should not specify -# -funroll-loops together with -O (or -O2, -O3, etc.) -# This bug is supposed to be fixed with release 2.8 of gcc. -# -# This bug does NOT seem to have an effect on the correct compilation -# of this benchmark suite on my Linux box. However, it leads to -# the dreaded "internal compiler error" message on our alpha -# running DEC Unix 4.0b. The Linux-binary that was used to obtain -# the baseline results was nevertheless compiled with -# CFLAGS = -s -static -Wall -O3 -fomit-frame-pointer -funroll-loops -# -# You should leave -static in the CFLAGS so that your sysinfo can be -# compiled into the executable. - ICC=icc GCC=gcc - -# generic options for gcc -#CFLAGS=-O3 -mcpu=ev67 -mieee -funroll-loops -ftree-vectorize -fprefetch-loop-arrays -pipe -static -msmall-data -msmall-text -#CFLAGS=-O3 -mcpu=ev67 -mieee -pipe -msmall-data -msmall-text -funroll-loops -ftree-vectorize -static GCCFLAGS=-O3 -march=k8 -msse3 -ftree-vectorize -funroll-loops -pipe -static -#GCCFLAGS=-fast -unroll 0 -inline speed ICCFLAGS=-O2 -ip -xP -gcc -static LINKFLAGS= -# if your gcc lets you do it, then try this one -#CFLAGS = -s -static -Wall -O3 -fomit-frame-pointer -funroll-loops - -# for gcc on an older Pentium type processor you can try the following -#CFLAGS = -s -static -O3 -fomit-frame-pointer -Wall -m486 \ -# -fforce-addr -fforce-mem -falign-loops=2 -falign-functions=2 \ -# -falign-jumps=2 -funroll-loops - -# for a newer gcc on a newer Pentium type processor you can try the following -#CFLAGS = -s -static -O3 -fomit-frame-pointer -Wall -march=i686 \ -# -fforce-addr -fforce-mem -falign-loops=2 -falign-functions=2 \ -# -falign-jumps=2 -funroll-loops - -# for a newer gcc on an Athlon XP type processor you can try the following -#CFLAGS = -s -static -O3 -fomit-frame-pointer -Wall -march=athlon-xp \ -# -fforce-addr -fforce-mem -falign-loops=2 -falign-functions=2 \ -# -falign-jumps=2 -funroll-loops - -# For debugging using gcc -#CFLAGS = -g -O3 -Wall -DDEBUG - -########################################################################## -# For Linux machines with more than one binary format. -# The default binaries, depends on your system whether it's elf or aout. -MACHINE= -# a.out code for linux on an elf machine -#MACHINE= -bi486-linuxaout -# elf code for linux on an a.out machine -#MACHINE= -bi486-linuxelf -# if you want a different compiler version and different binaries, for example -#MACHINE= -V2.7.2 -bi486-linuxaout - -########################################################################## -# Read the file README.nonlinux if you are not using Linux - -# for DEC Unix using cc you can try -#CC = cc -#CFLAGS = -O3 -#LINKFLAGS = -s -non_shared - -# for SunOS using cc -#CC = cc -#CFLAGS = -O3 -s - -# for DEC Ultrix using cc -#CC = cc -#CFLAGS = -O2 -#LINKFLAGS = -s - -# for a Mac with OsX and the Darwin environment -#CC = cc -#CFLAGS = -O3 -DOSX - -# For debugging using cc -#CC = cc -#CFLAGS = -g -DDEBUG - -########################################################################## -# If your system does not understand the system command "uname -s -r" -# then comment this out - -# NO_UNAME= -DNO_UNAME - -########################################################################## -# For any Unix flavor you need -DLINUX -# You also need -DLINUX to get the new indices - -DEFINES=$(NO_UNAME) -DLINUX - -########################################################################## -# For LINUX-like systems with gcc sysinfoc.c: Makefile - ./sysinfo.sh $(GCC) $(DEFINES) $(GCCFLAGS) + ./sysinfo.sh $(GCC) $(GCCFLAGS) sysinfo.c: Makefile - ./sysinfo.sh $(GCC) $(DEFINES) $(GCCFLAGS) - -########################################################################## -# For non-LINUX systems -# Edit the files sysinfo.c and sysinfoc.c to include your system information -# and take sysinfo.c and sysinfoc.c out of the dependencies for nbench0.o + ./sysinfo.sh $(GCC) $(GCCFLAGS) hardware.o: hardware.c hardware.h Makefile - $(GCC) $(DEFINES) $(GCCFLAGS) -c hardware.c + $(GCC) $(GCCFLAGS) -c hardware.c nbench0.o: nbench0.h nbench0.c nmglobal.h hardware.h Makefile sysinfo.c sysinfoc.c - $(GCC) $(DEFINES) $(GCCFLAGS) -c nbench0.c -# Segfault before first test + $(GCC) $(GCCFLAGS) -c nbench0.c emfloat.o: emfloat.h emfloat.c nmglobal.h Makefile - $(GCC) $(DEFINES) $(GCCFLAGS) -c emfloat.c + $(GCC) $(GCCFLAGS) -c emfloat.c randnum.o: randnum.c Makefile - $(GCC) $(DEFINES) $(GCCFLAGS) -c randnum.c + $(GCC) $(GCCFLAGS) -c randnum.c numsort.o: numsort.c - $(GCC) $(DEFINES) $(GCCFLAGS) -c numsort.c -# gcc - 2.95 -# ccc - 5.08 + $(GCC) $(GCCFLAGS) -c numsort.c stringsort.o: stringsort.c - $(GCC) $(DEFINES) $(GCCFLAGS) -c stringsort.c -# gcc - 6.77 -# ccc - 7.24 + $(GCC) $(GCCFLAGS) -c stringsort.c bitfield.o: bitfield.c - $(GCC) $(DEFINES) $(GCCFLAGS) -c bitfield.c -# gcc - 4.93, 4.90, 4.93, 4.93 -# ccc - 4.79, 4.85, 4.81, + $(GCC) $(GCCFLAGS) -c bitfield.c fpemulation.o: fpemulation.c - $(GCC) $(DEFINES) $(GCCFLAGS) -c fpemulation.c -# gcc - 13.90 -# ccc - 13.90 + $(GCC) $(GCCFLAGS) -c fpemulation.c fourier.o: fourier.c - $(GCC) $(DEFINES) $(GCCFLAGS) -c fourier.c -# gcc - 15.96 -# ccc - 19.30 + $(GCC) $(GCCFLAGS) -c fourier.c assignment.o: assignment.c - $(GCC) $(DEFINES) $(GCCFLAGS) -c assignment.c -# gcc - 16.51 -# ccc - 7.98 + $(GCC) $(GCCFLAGS) -c assignment.c idea.o: idea.c - $(GCC) $(DEFINES) $(GCCFLAGS) -c idea.c -# gcc - 8.79 -# ccc - 9.10 + $(GCC) $(GCCFLAGS) -c idea.c huffman.o: huffman.c - $(GCC) $(DEFINES) $(GCCFLAGS) -c huffman.c -# $(GCC) $(DEFINES) -O1 -host -unroll 0 -inline speed -c huffman.c -g3 -# $(GCC) $(DEFINES) $(GCCFLAGS) -c huffman.c -g3 -# gcc - 6.94 -# ccc - segfault -# ccc -O1 -host - 5.14 -# ccc -O2 -host - segfault -# ccc -O1 -host -unroll 0 -inline speed - 5.95 + $(GCC) $(GCCFLAGS) -c huffman.c neural.o: neural.c - $(GCC) $(DEFINES) $(GCCFLAGS) -c neural.c -# gcc - 12.00 -# ccc - 14.20 + $(GCC) $(GCCFLAGS) -c neural.c linear.o: linear.c - $(GCC) $(DEFINES) $(GCCFLAGS) -c linear.c -# gcc - 16.38 -# ccc - 23.29 + $(GCC) $(GCCFLAGS) -c linear.c sysspec.o: sysspec.h sysspec.c nmglobal.h Makefile - $(GCC) $(DEFINES) $(GCCFLAGS) -c sysspec.c + $(GCC) $(GCCFLAGS) -c sysspec.c nbench: emfloat.o randnum.o nbench0.o numsort.o sysspec.o hardware.o stringsort.o bitfield.o fpemulation.o fourier.o assignment.o idea.o huffman.o neural.o linear.o $(GCC) emfloat.o randnum.o nbench0.o numsort.o sysspec.o hardware.o stringsort.o bitfield.o fpemulation.o fourier.o assignment.o idea.o huffman.o neural.o linear.o -o nbench -lm -########################################################################## - clean: - /bin/rm -f *.o nbench sysinfo.c sysinfoc.c -- cgit v1.2.3