1 ##############################################################################
3 # Based on The BYTE UNIX Benchmarks - Release 3
4 # Module: Makefile SID: 3.9 5/15/91 19:30:15
6 ##############################################################################
7 # Bug reports, patches, comments, suggestions should be sent to:
8 # David C Niemi <niemi@tux.org>
10 # Original Contacts at Byte Magazine:
11 # Ben Smith or Tom Yager at BYTE Magazine
12 # bensmith@bytepb.byte.com tyager@bytepb.byte.com
14 ##############################################################################
15 # Modification Log: 7/28/89 cleaned out workload files
16 # 4/17/90 added routines for installing from shar mess
17 # 7/23/90 added compile for dhrystone version 2.1
18 # (this is not part of Run file. still use old)
19 # removed HZ from everything but dhry.
20 # HZ is read from the environment, if not
21 # there, you must define it in this file
22 # 10/30/90 moved new dhrystone into standard set
23 # new pgms (dhry included) run for a specified
24 # time rather than specified number of loops
25 # 4/5/91 cleaned out files not needed for
26 # release 3 -- added release 3 files -ben
27 # 10/22/97 added compiler options for strict ANSI C
28 # checking for gcc and DEC's cc on
29 # Digital Unix 4.x (kahn@zk3.dec.com)
30 # 09/26/07 changes for UnixBench 5.0
31 # 09/30/07 adding ubgears, GRAPHIC_TESTS switch
32 # 10/14/07 adding large.txt
33 ##############################################################################
35 ##############################################################################
37 ##############################################################################
41 # GRAPHICS TESTS: Uncomment the definition of "GRAPHIC_TESTS" to enable
42 # the building of the graphics benchmarks. This will require the
43 # X11 libraries on your system.
45 # Comment the line out to disable these tests.
46 # GRAPHIC_TESTS = defined
48 # Set "GL_LIBS" to the libraries needed to link a GL program.
49 GL_LIBS
= -lGL
-lXext
-lX11
51 # OPTIMISATION SETTINGS:
56 ## For Linux 486/Pentium, GCC 2.7.x and 2.8.x
57 #OPTON = -O2 -fomit-frame-pointer -fforce-addr -fforce-mem -ffast-math \
58 # -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2
60 ## For Linux, GCC previous to 2.7.0
61 #OPTON = -O2 -fomit-frame-pointer -fforce-addr -fforce-mem -ffast-math -m486
63 #OPTON = -O2 -fomit-frame-pointer -fforce-addr -fforce-mem -ffast-math \
64 # -m386 -malign-loops=1 -malign-jumps=1 -malign-functions=1
66 ## For Solaris 2, or general-purpose GCC 2.7.x
67 #OPTON = -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall
69 ## For Digital Unix v4.x, with DEC cc v5.x
71 #CFLAGS = -DTIME -std1 -verbose -w0
73 ## generic gcc CFLAGS. -DTIME must be included.
74 CFLAGS
+= $(CPPFLAGS
) -DTIME
-DMINIX
=1 -D_MINIX
=1 -D_POSIX_SOURCE
=1
77 ##############################################################################
79 ##############################################################################
89 INCLDIR
= /usr
/include
91 SCRIPTS
= unixbench.logo multi.sh tst.sh index.base
92 SOURCES
= arith.c big.c context1.c \
96 syscall.c looper.c timeit.c time-polling.c \
97 dhry_1.c dhry_2.c dhry.h whets.c ubgears.c
98 TESTS
= sort.src cctest.c dc.dat large.txt
100 # ifdef GRAPHIC_TESTS
101 # GRAPHIC_BINS = $(PROGDIR)/ubgears
107 BINS
= $(PROGDIR
)/arithoh
$(PROGDIR
)/register
$(PROGDIR
)/short \
108 $(PROGDIR
)/int
$(PROGDIR
)/long
$(PROGDIR
)/float
$(PROGDIR
)/double \
109 $(PROGDIR
)/hanoi
$(PROGDIR
)/syscall
$(PROGDIR
)/context1 \
110 $(PROGDIR
)/pipe
$(PROGDIR
)/spawn
$(PROGDIR
)/execl \
111 $(PROGDIR
)/dhry2
$(PROGDIR
)/dhry2reg
$(PROGDIR
)/looper \
112 $(PROGDIR
)/fstime
$(PROGDIR
)/whetstone-double
$(GRAPHIC_BINS
)
113 ## These compile only on some platforms...
114 # $(PROGDIR)/poll $(PROGDIR)/poll2 $(PROGDIR)/select
116 # Required non-binary files.
117 REQD
= $(BINS
) $(PROGDIR
)/unixbench.logo \
118 $(PROGDIR
)/multi.sh
$(PROGDIR
)/tst.sh
$(PROGDIR
)/index.base \
120 $(TESTDIR
)/sort.src
$(TESTDIR
)/cctest.c
$(TESTDIR
)/dc.dat \
123 # ######################### the big ALL ############################
125 ## Ick!!! What is this about??? How about let's not chmod everything bogusly.
126 # @chmod 744 * $(SRCDIR)/* $(PROGDIR)/* $(TESTDIR)/* $(DOCDIR)/*
128 # ####################### a check for Run ######################
131 # ##############################################################
132 # distribute the files out to subdirectories if they are in this one
134 @echo
"Checking distribution of files"
136 @if
test ! -d
$(PROGDIR
) \
139 ; mv
$(SCRIPTS
) $(PROGDIR
) \
141 echo
"$(PROGDIR) exists" \
144 @if
test ! -d
$(SRCDIR
) \
147 ; mv
$(SOURCES
) $(SRCDIR
) \
149 echo
"$(SRCDIR) exists" \
152 @if
test ! -d
$(TESTDIR
) \
155 ; mv
$(TESTS
) $(TESTDIR
) \
157 echo
"$(TESTDIR) exists" \
159 # temporary work directory
160 @if
test ! -d
$(TMPDIR
) \
164 echo
"$(TMPDIR) exists" \
166 # directory for results
167 @if
test ! -d
$(RESULTDIR
) \
171 echo
"$(RESULTDIR) exists" \
176 # Individual programs
177 $(PROGDIR
)/arithoh
: $(SRCDIR
)/arith.c
178 $(CC
) -o
$(PROGDIR
)/arithoh
${CFLAGS} ${OPTON} -Darithoh
$(SRCDIR
)/arith.c
179 $(PROGDIR
)/register
: $(SRCDIR
)/arith.c
180 $(CC
) -o
$(PROGDIR
)/register
${CFLAGS} ${OPTON} -Ddatum
='register int' $(SRCDIR
)/arith.c
181 $(PROGDIR
)/short
: $(SRCDIR
)/arith.c
182 $(CC
) -o
$(PROGDIR
)/short
${CFLAGS} ${OPTON} -Ddatum
=short
$(SRCDIR
)/arith.c
183 $(PROGDIR
)/int
: $(SRCDIR
)/arith.c
184 $(CC
) -o
$(PROGDIR
)/int
${CFLAGS} ${OPTON} -Ddatum
=int
$(SRCDIR
)/arith.c
185 $(PROGDIR
)/long
: $(SRCDIR
)/arith.c
186 $(CC
) -o
$(PROGDIR
)/long
${CFLAGS} ${OPTON} -Ddatum
=long
$(SRCDIR
)/arith.c
187 $(PROGDIR
)/float
: $(SRCDIR
)/arith.c
188 $(CC
) -o
$(PROGDIR
)/float
${CFLAGS} ${OPTON} -Ddatum
=float
$(SRCDIR
)/arith.c
189 $(PROGDIR
)/double
: $(SRCDIR
)/arith.c
190 $(CC
) -o
$(PROGDIR
)/double
${CFLAGS} ${OPTON} -Ddatum
=double
$(SRCDIR
)/arith.c
191 $(PROGDIR
)/whetstone-double
: $(SRCDIR
)/whets.c
192 $(CC
) -o
$(PROGDIR
)/whetstone-double
${CFLAGS} ${OPTON} -DDP
-DUNIX
-DUNIXBENCH
$(SRCDIR
)/whets.c
-lm
193 $(PROGDIR
)/hanoi
: $(SRCDIR
)/hanoi.c
194 $(CC
) -o
$(PROGDIR
)/hanoi
${CFLAGS} ${OPTON} $(SRCDIR
)/hanoi.c
196 $(PROGDIR
)/poll
: $(SRCDIR
)/time-polling.c
197 $(CC
) -DHAS_POLL
-DUNIXBENCH
-o
$(PROGDIR
)/poll
${CFLAGS} ${OPTON} $(SRCDIR
)/time-polling.c
199 $(PROGDIR
)/poll2
: $(SRCDIR
)/time-polling.c
200 $(CC
) -DHAS_POLL2
-DUNIXBENCH
-o
$(PROGDIR
)/poll2
${CFLAGS} ${OPTON} $(SRCDIR
)/time-polling.c
202 $(PROGDIR
)/select
: $(SRCDIR
)/time-polling.c
203 $(CC
) -DHAS_SELECT
-DUNIXBENCH
-o
$(PROGDIR
)/select
${CFLAGS} ${OPTON} $(SRCDIR
)/time-polling.c
205 $(PROGDIR
)/fstime
: $(SRCDIR
)/fstime.c
206 $(CC
) -o
$(PROGDIR
)/fstime
${CFLAGS} ${OPTON} $(SRCDIR
)/fstime.c
208 $(PROGDIR
)/syscall
: $(SRCDIR
)/syscall.c
209 $(CC
) -o
$(PROGDIR
)/syscall
${CFLAGS} ${OPTON} $(SRCDIR
)/syscall.c
210 $(PROGDIR
)/context1
: $(SRCDIR
)/context1.c
211 $(CC
) -o
$(PROGDIR
)/context1
${CFLAGS} ${OPTON} $(SRCDIR
)/context1.c
212 $(PROGDIR
)/pipe
: $(SRCDIR
)/pipe.c
213 $(CC
) -o
$(PROGDIR
)/pipe
${CFLAGS} ${OPTON} $(SRCDIR
)/pipe.c
214 $(PROGDIR
)/spawn
: $(SRCDIR
)/spawn.c
215 $(CC
) -o
$(PROGDIR
)/spawn
${CFLAGS} ${OPTON} $(SRCDIR
)/spawn.c
216 $(PROGDIR
)/execl
: $(SRCDIR
)/execl.c
$(SRCDIR
)/big.c
217 $(CC
) -o
$(PROGDIR
)/execl
${CFLAGS} ${OPTON} $(SRCDIR
)/execl.c
219 $(PROGDIR
)/dhry2
: $(SRCDIR
)/dhry_1.c
$(SRCDIR
)/dhry_2.c
$(SRCDIR
)/dhry.h
220 cd
$(SRCDIR
); $(CC
) -c
${CFLAGS} -DHZ
=${HZ} ${OPTON} dhry_1.c
221 cd
$(SRCDIR
); $(CC
) -c
${CFLAGS} -DHZ
=${HZ} ${OPTON} dhry_2.c
222 $(CC
) -o
$(PROGDIR
)/dhry2
${CFLAGS} ${OPTON} $(SRCDIR
)/dhry_1.o
$(SRCDIR
)/dhry_2.o
223 cd
$(SRCDIR
); rm -f dhry_1.o dhry_2.o
224 $(PROGDIR
)/dhry2reg
: $(SRCDIR
)/dhry_1.c
$(SRCDIR
)/dhry_2.c
$(SRCDIR
)/dhry.h
225 cd
$(SRCDIR
); $(CC
) -c
${CFLAGS} -DREG
=register
-DHZ
=${HZ} ${OPTON} dhry_1.c
226 cd
$(SRCDIR
); $(CC
) -c
${CFLAGS} -DREG
=register
-DHZ
=${HZ} ${OPTON} dhry_2.c
227 $(CC
) -o
$(PROGDIR
)/dhry2reg
${CFLAGS} ${OPTON} $(SRCDIR
)/dhry_1.o
$(SRCDIR
)/dhry_2.o
228 cd
$(SRCDIR
); rm -f dhry_1.o dhry_2.o
230 $(PROGDIR
)/looper
: $(SRCDIR
)/looper.c
231 $(CC
) -o
$(PROGDIR
)/looper
${CFLAGS} ${OPTON} $(SRCDIR
)/looper.c
233 $(PROGDIR
)/ubgears
: $(SRCDIR
)/ubgears.c
234 $(CC
) -o
$(PROGDIR
)/ubgears
${CFLAGS} ${OPTON} $(SRCDIR
)/ubgears.c
$(GL_LIBS
)
236 # Run the benchmarks and create the reports
241 rm -f
$(BINS
) core
*~
*/*~
244 rm -f
$(RESULTDIR
)/* $(TMPDIR
)/*