-
Notifications
You must be signed in to change notification settings - Fork 144
/
Copy pathBuildProxy
executable file
·111 lines (98 loc) · 1.99 KB
/
BuildProxy
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#!/bin/sh
x=`uname`
y=`uname -m`
PLAT=$x.$y
ATOMICLIB=""
ATOMICFILE=" ../CommonUtilitiesLib/atomic.c"
echo $PLAT
case $PLAT in
Linux.ppc)
echo "Configuring for a Linux PPC platform"
CPLUS='egcs'
CCOMP=egcs
LINKER='egcs'
MACHDEFINES=-D__linuxppc__
PTHREADLIB=-lpthread
DLLIB=-ldl
if [ -f /usr/include/socketbits.h ]; then
NEED_SOCKETBITS=1
export NEED_SOCKETBITS
fi
;;
Linux.i586 | \
Linux.i686)
echo "Configuring for a Linux x86 platform"
CPLUS='egcs'
CCOMP=egcs
LINKER='egcs'
MACHDEFINES=-D__linux__
DLLIB=-ldl
PTHREADLIB=-lpthread
if [ -f /usr/include/socketbits.h ]; then
NEED_SOCKETBITS=1
export NEED_SOCKETBITS
fi
;;
Linux.mips)
echo "Configuring for a Linux MIPS (Qube) platform"
CPLUS='gcc'
CCOMP=gcc
LINKER='gcc'
MACHDEFINES="-D__linux__ -fhandle-exceptions"
DLLIB=-ldl
PTHREADLIB=-lpthread
SHARED=-shared
MODULE_LIBS=
if [ -f /usr/include/socketbits.h ]; then
NEED_SOCKETBITS=1
export NEED_SOCKETBITS
fi
;;
FreeBSD.i386)
echo "Configuring for a FreeBSD platform"
CPLUS=gcc
CCOMP=gcc
LINKER="gcc"
PTHREADLIB=-pthread
DLLIB=
MACHDEFINES="-D__FreeBSD__ -fhandle-exceptions"
;;
# SunOS.sun4m | \
# SunOS.sun4u)
SunOS.*)
echo "Configuring for a Solaris platform"
CPLUS=gcc
CCOMP=gcc
LINKER="gcc"
PTHREADLIB=-lpthread
DLLIB="-ldl -lsocket -lnsl"
MACHDEFINES="-D__solaris__"
;;
*)
echo "I don't know your platform. I'll assume this is a Linux x86 platform."
echo "Please edit the BuildServer script & PlatformHeader.h to add your platform."
CPLUS='egcs'
CCOMP=egcs
LINKER='egcs'
MACHDEFINES=-D__linux__
DLLIB=-ldl
PTHREADLIB=-lpthread
if [ -f /usr/include/socketbits.h ]; then
NEED_SOCKETBITS=1
export NEED_SOCKETBITS
fi
;;
esac
echo Building for $PLAT with $CPLUS
export CPLUS
export CCOMP
export LINKER
export MACHDEFINES
export PTHREADLIB
export DLLIB
export ATOMICLIB
export ATOMICFILE
if [ ATOMICLIB != "" ]; then
ranlib ../libatomic.a
fi
make -f Makefile.POSIX