blob: 4b7c95c7b727bb92197848f0bc9c19aae8e67445 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# Copyright 2005, 2007 Nanorex, Inc. See LICENSE file for details.
CFLAGS=-Wall -O2 -pg
test: testsqrt
./testsqrt
testsqrt: testsqrt.c interp_sqrt.c
gcc $(CFLAGS) testsqrt.c -o testsqrt -lrt -lm
interp_sqrt.c: interp.py
python interp.py c sqrt static_inline
indent -i4 -br -ce interp_ugly.c -o interp.c
mv interp.c interp_sqrt.c
clean:
rm -f *.o *~ interp*.c gmon.out testsqrt *.pyc
# doing a profile is incompatible with "static_inline"
profile:
make clean
make testsqrt
./testsqrt
gprof testsqrt
|