vm: restore stacktrace on SIGSEGV
[minix.git] / benchmarks / unixbench-5.1.2 / Makefile
blob5c09de9ab9991790c270a4fe4f22f1caf5e608f9
1 ##############################################################################
2 # UnixBench v5.1.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 ##############################################################################
36 # CONFIGURATION
37 ##############################################################################
39 SHELL = /bin/sh
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:
53 ## Very generic
54 OPTON = -O
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
70 #OPTON = -O4
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 ##############################################################################
78 # END CONFIGURATION
79 ##############################################################################
82 # local directories
83 PROGDIR = ./pgms
84 SRCDIR = ./src
85 TESTDIR = ./testdir
86 RESULTDIR = ./results
87 TMPDIR = ./tmp
88 # other directories
89 INCLDIR = /usr/include
90 LIBDIR = /lib
91 SCRIPTS = unixbench.logo multi.sh tst.sh index.base
92 SOURCES = arith.c big.c context1.c \
93 dummy.c execl.c \
94 fstime.c hanoi.c \
95 pipe.c spawn.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
102 # else
103 GRAPHIC_BINS =
104 # endif
106 # Program binaries.
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 \
119 $(PROGDIR)/gfx-x11 \
120 $(TESTDIR)/sort.src $(TESTDIR)/cctest.c $(TESTDIR)/dc.dat \
121 $(TESTDIR)/large.txt
123 # ######################### the big ALL ############################
124 all: distr programs
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 ######################
129 check: $(REQD)
130 make all
131 # ##############################################################
132 # distribute the files out to subdirectories if they are in this one
133 distr:
134 @echo "Checking distribution of files"
135 # scripts
136 @if test ! -d $(PROGDIR) \
137 ; then \
138 mkdir $(PROGDIR) \
139 ; mv $(SCRIPTS) $(PROGDIR) \
140 ; else \
141 echo "$(PROGDIR) exists" \
142 ; fi
143 # C sources
144 @if test ! -d $(SRCDIR) \
145 ; then \
146 mkdir $(SRCDIR) \
147 ; mv $(SOURCES) $(SRCDIR) \
148 ; else \
149 echo "$(SRCDIR) exists" \
150 ; fi
151 # test data
152 @if test ! -d $(TESTDIR) \
153 ; then \
154 mkdir $(TESTDIR) \
155 ; mv $(TESTS) $(TESTDIR) \
156 ; else \
157 echo "$(TESTDIR) exists" \
158 ; fi
159 # temporary work directory
160 @if test ! -d $(TMPDIR) \
161 ; then \
162 mkdir $(TMPDIR) \
163 ; else \
164 echo "$(TMPDIR) exists" \
165 ; fi
166 # directory for results
167 @if test ! -d $(RESULTDIR) \
168 ; then \
169 mkdir $(RESULTDIR) \
170 ; else \
171 echo "$(RESULTDIR) exists" \
172 ; fi
174 programs: $(BINS)
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
237 run:
238 sh ./Run
240 clean:
241 rm -f $(BINS) core *~ */*~
243 spotless: clean
244 rm -f $(RESULTDIR)/* $(TMPDIR)/*
246 ## END ##