Debian Codegraph @

benchmark/Makefile

raw
1 # Directory containing Faust .lib and .cpp architecture files:
2 ck1 := /opt/local/share/faust/music.lib
3 ck2 := /usr/local/share/faust/music.lib
4 ck3 := $(FAUST_LIB_PATH)/faust/music.lib
5 LIB := $(if $(wildcard $(ck1)),/opt/local/lib,"")
6 LIB := $(if $(wildcard $(ck2)),/usr/local/lib,$(LIB))
7 LIB := $(if $(wildcard $(ck3)),$(FAUST_LIB_PATH),$(LIB))
8
9 DESTDIR ?=
10 PREFIX ?= /usr/local
11
12 prefix := $(DESTDIR)$(PREFIX)
13
14 system := $(shell uname -s)
15
16 LLVM_VERSION = $(shell llvm-config --version)
17
18 ifeq ($(LLVM_VERSION), 3.1)
19 LLVM_VERSION = LLVM_31
20 CXX = /opt/local/libexec/llvm-3.1/bin/clang++
21 endif
22
23 ifeq ($(LLVM_VERSION), 3.2)
24 LLVM_VERSION = LLVM_32
25 CXX = /opt/local/libexec/llvm-3.2/bin/clang++
26 endif
27
28 ifeq ($(LLVM_VERSION), 3.3)
29 LLVM_VERSION = LLVM_33
30 CXX = /opt/local/libexec/llvm-3.3/bin/clang++
31 LLC = /opt/local/libexec/llvm-3.3/bin/llc
32 endif
33
34 ifeq ($(LLVM_VERSION),$(filter $(LLVM_VERSION),3.4, 3.4.1, 3.4.2))
35 LLVM_VERSION = LLVM_34
36 CXX = /opt/local/libexec/llvm-3.4/bin/clang++
37 LLC = /opt/local/libexec/llvm-3.4/bin/llc
38 endif
39
40 ifeq ($(LLVM_VERSION), 3.4.2)
41 LLVM_VERSION = LLVM_34
42 CXX = /opt/local/libexec/llvm-3.4/bin/clang++
43 LLC = /opt/local/libexec/llvm-3.4/bin/llc
44 endif
45
46 ifeq ($(LLVM_VERSION), 3.5)
47 LLVM_VERSION = LLVM_35
48 CXX = /opt/local/libexec/llvm-3.5/bin/clang++
49 LLC = /opt/local/libexec/llvm-3.5/bin/llc
50 endif
51
52 ifeq ($(LLVM_VERSION),$(filter $(LLVM_VERSION), 3.6.0 3.6.1 3.6.2))
53 LLVM_VERSION = LLVM_36
54 CXX = /opt/local/libexec/llvm-3.6/bin/clang++
55 LLC = /opt/local/libexec/llvm-3.6/bin/llc
56 endif
57
58 ifeq ($(LLVM_VERSION),$(filter $(LLVM_VERSION), 3.7.0 3.7.1 3.7.2))
59 LLVM_VERSION = LLVM_37
60 CXX = /opt/local/libexec/llvm-3.7/bin/clang++
61 LLC = /opt/local/libexec/llvm-3.7/bin/llc
62 endif
63
64 ifeq ($(LLVM_VERSION),$(filter $(LLVM_VERSION), 3.8.0 3.8.1))
65 LLVM_VERSION = LLVM_38
66 CXX = /opt/local/libexec/llvm-3.8/bin/clang++
67 LLC = /opt/local/libexec/llvm-3.8/bin/llc
68 endif
69
70 ifeq ($(LLVM_VERSION),$(filter $(LLVM_VERSION), 3.9.0 3.9.1))
71 LLVM_VERSION = LLVM_39
72 CXX = /opt/local/libexec/llvm-3.9/bin/clang++
73 LLC = /opt/local/libexec/llvm-3.9/bin/llc
74 endif
75
76 ifeq ($(LLVM_VERSION),$(filter $(LLVM_VERSION), 4.0.0 4.0.1))
77 LLVM_VERSION = LLVM_40
78 CXX = /opt/local/libexec/llvm-4.0/bin/clang++
79 LLC = /opt/local/libexec/llvm-4.0/bin/llc
80 endif
81
82 ifeq ($(LLVM_VERSION),$(filter $(LLVM_VERSION), 5.0.0 5.0.1))
83 LLVM_VERSION = LLVM_50
84 CXX = /opt/local/libexec/llvm-5.0/bin/clang++
85 LLC = /opt/local/libexec/llvm-5.0/bin/llc
86 endif
87
88 ifeq ($(system), Darwin)
89 #MYGCCFLAGS := '-O3 -mfpmath=sse -msse -msse2 -msse3 -ffast-math '
90 #MYGCCFLAGS := '-O3 -mfpmath=sse -msse -msse2 -msse3 -ffast-math -fvectorize -fslp-vectorize'
91
92 MYGCCFLAGS := '-O3 -march=native -fvectorize -fslp-vectorize-aggressive'
93
94 else
95 MYGCCFLAGS := '-O3 -march=native -mfpmath=sse -msse -msse2 -msse3 -ffast-math -ftree-vectorize'
96 endif
97
98 MYICCFLAGS := '-O3 -xHost -ftz -fno-alias -fp-model fast=2'
99
100 VSIZE := 1024
101
102 all : icc gcc
103 icc : ialsascal ialsavec ialsavec2 ialsavec4 ialsaomp2 ialsasch ialsasch2
104 gcc : galsascal galsavec galsavec2 galsavec4 galsaomp2 galsasch galsasch2
105 #osx : gcoreaudioscal gcoreaudiovec1 gcoreaudiovec2 gcoreaudiovec3 gcoreaudiovec4 gcoreaudiosch gcoreaudiosch2
106 osx : gcoreaudioscal gcoreaudiovec1 gcoreaudiovec2 gcoreaudiosch gcoreaudiollvm bscal bvec1 bvec2 bscalllvm
107 #osx : bscal bvec1 bvec2 bscalllvm
108
109
110 ### intel-compiler single-precision x {scalar, vector and openMP}
111
112 ialsascal :
113 install -d ialsascaldir
114 $(MAKE) DEST='ialsascaldir/' ARCH='alsa-gtk-bench.cpp' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='icc' CXXFLAGS=$(MYICCFLAGS) -f Makefile.compile
115
116 ialsasch :
117 install -d ialsaschdir
118 $(MAKE) DEST='ialsaschdir/' ARCH='alsa-gtk-bench.cpp' VEC='-sch -vs $(VSIZE)' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='icc' CXXFLAGS=$(MYICCFLAGS) -f Makefile.compile
119
120 ialsasch2 :
121 install -d ialsasch2dir
122 $(MAKE) DEST='ialsasch2dir/' ARCH='alsa-gtk-bench.cpp' VEC='-sch -g -vs $(VSIZE)' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='icc' CXXFLAGS=$(MYICCFLAGS) -f Makefile.compile
123
124 ialsavec :
125 install -d ialsavecdir
126 $(MAKE) DEST='ialsavecdir/' ARCH='alsa-gtk-bench.cpp' VEC='-vec -vs $(VSIZE)' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='icc' CXXFLAGS=$(MYICCFLAGS) -f Makefile.compile
127
128 ialsavec1 :
129 install -d ialsavec1dir
130 $(MAKE) DEST='ialsavec1dir/' ARCH='alsa-gtk-bench.cpp' VEC='-vec -lv 1 -vs $(VSIZE)' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='icc' CXXFLAGS=$(MYICCFLAGS) -f Makefile.compile
131
132 ialsavec2 :
133 install -d ialsavec2dir
134 $(MAKE) DEST='ialsavec2dir/' ARCH='alsa-gtk-bench.cpp' VEC='-vec -dfs -vs $(VSIZE)' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='icc' CXXFLAGS=$(MYICCFLAGS) -f Makefile.compile
135
136 ialsavec3 :
137 install -d ialsavec3dir
138 $(MAKE) DEST='ialsavec3dir/' ARCH='alsa-gtk-bench.cpp' VEC='-vec -g -vs $(VSIZE)' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='icc' CXXFLAGS=$(MYICCFLAGS) -f Makefile.compile
139
140 ialsavec4 :
141 install -d ialsavec4dir
142 $(MAKE) DEST='ialsavec4dir/' ARCH='alsa-gtk-bench.cpp' VEC='-vec -g -vs 16' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='icc' CXXFLAGS=$(MYICCFLAGS) -f Makefile.compile
143
144 ialsaomp :
145 install -d ialsaompdir
146 $(MAKE) DEST='ialsaompdir/' ARCH='alsa-gtk-bench.cpp' VEC='-omp -vs $(VSIZE)' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='icc' CXXFLAGS='-openmp '$(MYICCFLAGS) -f Makefile.compile
147
148 ialsaomp2 :
149 install -d ialsaomp2dir
150 $(MAKE) DEST='ialsaomp2dir/' ARCH='alsa-gtk-bench.cpp' VEC='-omp -g -vs $(VSIZE)' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='icc' CXXFLAGS='-openmp '$(MYICCFLAGS) -f Makefile.compile
151
152 ### gcc-compiler single-precision x {scalar, vector and openMP}
153
154 galsascal :
155 install -d galsascaldir
156 $(MAKE) DEST='galsascaldir/' ARCH='alsa-gtk-bench.cpp' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='g++' CXXFLAGS=$(MYGCCFLAGS) -f Makefile.compile
157
158 galsasch :
159 install -d galsaschdir
160 $(MAKE) DEST='galsaschdir/' ARCH='alsa-gtk-bench.cpp' VEC='-sch -vs $(VSIZE)' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='g++' CXXFLAGS=$(MYGCCFLAGS) -f Makefile.compile
161
162 galsasch2 :
163 install -d galsasch2dir
164 $(MAKE) DEST='galsasch2dir/' ARCH='alsa-gtk-bench.cpp' VEC='-sch -g -vs $(VSIZE)' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='g++' CXXFLAGS=$(MYGCCFLAGS) -f Makefile.compile
165
166 galsavec :
167 install -d galsavecdir
168 $(MAKE) DEST='galsavecdir/' ARCH='alsa-gtk-bench.cpp' VEC='-vec -vs $(VSIZE)' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='g++' CXXFLAGS=$(MYGCCFLAGS) -f Makefile.compile
169
170 galsavec1 :
171 install -d galsavec1dir
172 $(MAKE) DEST='galsavec1dir/' ARCH='alsa-gtk-bench.cpp' VEC='-vec -lv 1 -vs $(VSIZE)' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='g++' CXXFLAGS=$(MYGCCFLAGS) -f Makefile.compile
173
174 galsavec2 :
175 install -d galsavec2dir
176 $(MAKE) DEST='galsavec2dir/' ARCH='alsa-gtk-bench.cpp' VEC='-vec -dfs -vs $(VSIZE)' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='g++' CXXFLAGS=$(MYGCCFLAGS) -f Makefile.compile
177
178 galsavec3 :
179 install -d galsavec3dir
180 $(MAKE) DEST='galsavec3dir/' ARCH='alsa-gtk-bench.cpp' VEC='-vec -g -vs $(VSIZE)' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='g++' CXXFLAGS=$(MYGCCFLAGS) -f Makefile.compile
181
182 galsavec4 :
183 install -d galsavec4dir
184 $(MAKE) DEST='galsavec4dir/' ARCH='alsa-gtk-bench.cpp' VEC='-vec -g -vs 16' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='g++' CXXFLAGS=$(MYGCCFLAGS) -f Makefile.compile
185
186 galsaomp :
187 install -d galsaompdir
188 $(MAKE) DEST='galsaompdir/' ARCH='alsa-gtk-bench.cpp' VEC='-omp -vs $(VSIZE)' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='g++' CXXFLAGS='-fopenmp '$(MYGCCFLAGS) -f Makefile.compile
189
190 galsaomp2 :
191 install -d galsaomp2dir
192 $(MAKE) DEST='galsaomp2dir/' ARCH='alsa-gtk-bench.cpp' VEC='-omp -g -vs $(VSIZE)' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='g++' CXXFLAGS='-fopenmp '$(MYGCCFLAGS) -f Makefile.compile
193
194
195 # OSX
196
197 gcoreaudiollvm : coreaudio-gtk-llvm-bench.cpp
198 $(CXX) -O3 -D$(LLVM_VERSION) -emit-llvm -S ../architecture/scheduler.cpp -o scheduler.ll
199 $(CXX) -O3 coreaudio-gtk-llvm-bench.cpp /usr/local/lib/libfaust.a -lpthread -framework CoreAudio -framework AudioUnit -framework CoreServices `pkg-config --cflags --libs gtk+-2.0` `llvm-config --ldflags --libs all --system-libs` -o gcoreaudiollvm
200
201 bscalllvm : console-bench-llvm.cpp
202 $(CXX) -O3 console-bench-llvm.cpp /usr/local/lib/libfaust.a `llvm-config --ldflags --libs all --system-libs` -o bscalllvm
203
204 bscal :
205 install -d bscaldir
206 $(MAKE) DEST='bscaldir/' ARCH='console-bench.cpp' LIB='' CXX=$(CXX) CXXFLAGS=$(MYGCCFLAGS) -f Makefile.compile
207
208 bvec1 :
209 install -d bvec1dir
210 $(MAKE) DEST='bvec1dir/' ARCH='console-bench.cpp' VEC='-vec -lv 1 -vs $(VSIZE)' LIB='' CXX=$(CXX) CXXFLAGS=$(MYGCCFLAGS) -f Makefile.compile
211
212 bvec2:
213 install -d bvec2dir
214 $(MAKE) DEST='bvec2dir/' ARCH='console-bench.cpp' VEC='-vec -dfs -vs $(VSIZE)' LIB='' CXX=$(CXX) CXXFLAGS=$(MYGCCFLAGS) -f Makefile.compile
215
216 gcoreaudioscal :
217 install -d gcoreaudioscaldir
218 $(MAKE) DEST='gcoreaudioscaldir/' ARCH='coreaudio-gtk-bench.cpp' LIB='-lpthread -framework CoreAudio -framework AudioUnit -framework CoreServices `pkg-config --cflags --libs gtk+-2.0`' CXX=$(CXX) CXXFLAGS=$(MYGCCFLAGS) -f Makefile.compile
219
220
221 gcoreaudiovec1 :
222 install -d gcoreaudiovec1dir
223 $(MAKE) DEST='gcoreaudiovec1dir/' ARCH='coreaudio-gtk-bench.cpp' VEC='-vec -lv 1 -vs $(VSIZE)' LIB='-lpthread -framework CoreAudio -framework AudioUnit -framework CoreServices `pkg-config --cflags --libs gtk+-2.0`' CXX=$(CXX) CXXFLAGS=$(MYGCCFLAGS) -f Makefile.compile
224
225 gcoreaudiovec2 :
226 install -d gcoreaudiovec2dir
227 $(MAKE) DEST='gcoreaudiovec2dir/' ARCH='coreaudio-gtk-bench.cpp' VEC='-vec -dfs -vs $(VSIZE)' LIB='-lpthread -framework CoreAudio -framework AudioUnit -framework CoreServices `pkg-config --cflags --libs gtk+-2.0`' CXX=$(CXX) CXXFLAGS=$(MYGCCFLAGS) -f Makefile.compile
228
229 gcoreaudiovec3 :
230 install -d gcoreaudiovec3dir
231 $(MAKE) DEST='gcoreaudiovec3dir/' ARCH='coreaudio-gtk-bench.cpp' VEC='-vec -g -vs $(VSIZE)' LIB='-lpthread -framework CoreAudio -framework AudioUnit -framework CoreServices `pkg-config --cflags --libs gtk+-2.0`' CXX=$(CXX) CXXFLAGS=$(MYGCCFLAGS) -f Makefile.compile
232
233 gcoreaudiovec4 :
234 install -d gcoreaudiovec4dir
235 $(MAKE) DEST='gcoreaudiovec4dir/' ARCH='coreaudio-gtk-bench.cpp' VEC='-vec -dfs -g -vs $(VSIZE)' LIB='-lpthread -framework CoreAudio -framework AudioUnit -framework CoreServices `pkg-config --cflags --libs gtk+-2.0`' CXX=$(CXX) CXXFLAGS=$(MYGCCFLAGS) -f Makefile.compile
236
237 gcoreaudiosch :
238 install -d gcoreaudioschdir
239 $(MAKE) DEST='gcoreaudioschdir/' ARCH='coreaudio-gtk-bench.cpp' VEC='-sch -vs $(VSIZE)' LIB='-lpthread -framework CoreAudio -framework AudioUnit -framework CoreServices `pkg-config --cflags --libs gtk+-2.0`' CXX=$(CXX) CXXFLAGS=$(MYGCCFLAGS) -f Makefile.compile
240
241 gcoreaudiosch2 :
242 install -d gcoreaudiosch2dir
243 $(MAKE) DEST='gcoreaudiosch2dir/' ARCH='coreaudio-gtk-bench.cpp' VEC='-sch -g -vs $(VSIZE)' LIB='-lpthread -framework CoreAudio -framework AudioUnit -framework CoreServices `pkg-config --cflags --libs gtk+-2.0`' CXX=$(CXX) CXXFLAGS=$(MYGCCFLAGS) -f Makefile.compile
244
245 ### intel-compiler double-precision x {scalar, vector and openMP}
246
247 idalsascal :
248 install -d idalsascaldir
249 $(MAKE) DEST='idalsascaldir/' ARCH='alsa-gtk-bench.cpp' VEC='-double' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='icc' CXXFLAGS=$(MYICCFLAGS) -f Makefile.compile
250
251 idalsavec :
252 install -d idalsavecdir
253 $(MAKE) DEST='idalsavecdir/' ARCH='alsa-gtk-bench.cpp' VEC='-double -vec -vs $(VSIZE)' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='icc' CXXFLAGS=$(MYICCFLAGS) -f Makefile.compile
254
255 idalsaomp :
256 install -d idalsaompdir
257 $(MAKE) DEST='idalsaompdir/' ARCH='alsa-gtk-bench.cpp' VEC='-double -omp -vs $(VSIZE)' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='icc' CXXFLAGS='-openmp '$(MYICCFLAGS) -f Makefile.compile
258
259 ### intel-compiler quad-precision x {scalar, vector and openMP}
260
261 iqalsascal :
262 install -d iqalsascaldir
263 $(MAKE) DEST='iqalsascaldir/' ARCH='alsa-gtk-bench.cpp' VEC='-quad' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='icc' CXXFLAGS=$(MYICCFLAGS) -f Makefile.compile
264
265 iqalsavec :
266 install -d iqalsavecdir
267 $(MAKE) DEST='iqalsavecdir/' ARCH='alsa-gtk-bench.cpp' VEC='-quad -vec -vs $(VSIZE)' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='icc' CXXFLAGS=$(MYICCFLAGS) -f Makefile.compile
268
269 iqalsaomp :
270 install -d iqalsaompdir
271 $(MAKE) DEST='iqalsaompdir/' ARCH='alsa-gtk-bench.cpp' VEC='-quad -omp -vs $(VSIZE)' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='icc' CXXFLAGS='-openmp '$(MYICCFLAGS) -f Makefile.compile
272
273
274 install:
275 ([ -e scheduler.ll ]) && cp scheduler.ll $(prefix)/lib/faust || echo scheduler.ll not found
276
277 .PHONY: depend clean
278
279 depend :
280 makedepend *.cpp -w120 -Y -I $(PREFIX)/include
281
282 clean :
283 rm -rf *dir
284 ([ -e gcoreaudiollvm ] && rm gcoreaudiollvm) || echo gcoreaudiollvm not found
285 ([ -e bscalllvm ] && rm bscalllvm) || echo gcoreaudiollvm not found
286 ([ -e scheduler.ll ] && rm scheduler.ll ) || echo scheduler.ll not found
287
288 # DO NOT DELETE
289
290 alsa-gtk-bench.o: /usr/local/include/faust/dsp/dsp.h
291 console-bench-llvm.o: /usr/local/include/faust/audio/coreaudio-dsp.h /usr/local/include/faust/audio/audio.h
292 console-bench-llvm.o: /usr/local/include/faust/dsp/dsp.h /usr/local/include/faust/dsp/dsp-bench.h
293 console-bench-llvm.o: /usr/local/include/faust/gui/MapUI.h /usr/local/include/faust/gui/UI.h
294 console-bench-llvm.o: /usr/local/include/faust/gui/PathBuilder.h /usr/local/include/faust/dsp/llvm-dsp.h
295 console-bench-llvm.o: /usr/local/include/faust/gui/meta.h /usr/local/include/faust/misc.h
296 console-bench.o: /usr/local/include/faust/audio/coreaudio-dsp.h /usr/local/include/faust/audio/audio.h
297 console-bench.o: /usr/local/include/faust/dsp/dsp.h /usr/local/include/faust/dsp/dsp-bench.h
298 console-bench.o: /usr/local/include/faust/gui/MapUI.h /usr/local/include/faust/gui/UI.h
299 console-bench.o: /usr/local/include/faust/gui/PathBuilder.h /usr/local/include/faust/dsp/llvm-dsp.h
300 console-bench.o: /usr/local/include/faust/gui/meta.h /usr/local/include/faust/misc.h
301 coreaudio-gtk-bench.o: /usr/local/include/faust/audio/coreaudio-dsp.h /usr/local/include/faust/audio/audio.h
302 coreaudio-gtk-bench.o: /usr/local/include/faust/dsp/dsp.h /usr/local/include/faust/dsp/dsp-bench.h
303 coreaudio-gtk-bench.o: /usr/local/include/faust/gui/MapUI.h /usr/local/include/faust/gui/UI.h
304 coreaudio-gtk-bench.o: /usr/local/include/faust/gui/PathBuilder.h /usr/local/include/faust/misc.h
305 coreaudio-gtk-bench.o: /usr/local/include/faust/gui/meta.h
306 coreaudio-gtk-llvm-bench.o: /usr/local/include/faust/audio/coreaudio-dsp.h /usr/local/include/faust/audio/audio.h
307 coreaudio-gtk-llvm-bench.o: /usr/local/include/faust/dsp/dsp.h /usr/local/include/faust/dsp/dsp-bench.h
308 coreaudio-gtk-llvm-bench.o: /usr/local/include/faust/gui/MapUI.h /usr/local/include/faust/gui/UI.h
309 coreaudio-gtk-llvm-bench.o: /usr/local/include/faust/gui/PathBuilder.h /usr/local/include/faust/dsp/llvm-dsp.h
310 coreaudio-gtk-llvm-bench.o: /usr/local/include/faust/gui/meta.h /usr/local/include/faust/misc.h