-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure
executable file
·58 lines (47 loc) · 1.08 KB
/
configure
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/sh
prefix="/usr/local"
mach=`uname -m`
for opt
do
case "$opt" in
--prefix=*)
prefix=${opt#*=}
;;
--help|-h)
echo "Usage: configure [options]"
echo ""
echo "Options:"
/usr/bin/printf " --help or -h "
echo "Display this help message"
/usr/bin/printf " --prefix=PREFIX "
echo "Top level install directory is PREFIX [$prefix]"
exit 1
;;
*)
;;
esac
done
case "$mach" in
amd64|x86_64) mach="amd64" ; target=0 ;;
i[34567]86) mach="i386" ; target=1 ;;
8080|i80|z80) mach="i80" ; target=2 ;;
*) mach="C" ; target=255 ;;
esac
/usr/bin/printf "Native backend: %s\n" $mach
/usr/bin/printf "Install prefix: %s\n" $prefix
/usr/bin/printf "Please run \`make' to build\n"
cat << EOF > Makefile
# bfc Makefile
CC = cc
CFLAGS = -g -O2 -DTARGET=$target
PROG = bfc
OBJS = amd64.o bfc.o c.o cg.o dput.o i386.o i80.o
all: \${OBJS}
\${CC} \${LDFLAGS} -o \${PROG} \${OBJS}
install:
install -m 755 \${PROG} $prefix/bin
clean:
rm -f \${PROG} \${OBJS}
distclean: clean
rm -f Makefile
EOF