Initial cmake fixes
[dyninst.git] / scripts / dynsysname
1 #!/bin/bash
2
3 P=$1
4
5 # i386/Linux, x86-64/Linux, ppc/Linux, ppc64/Linux
6 if [ ${P/linux/} != ${P} ]; then
7 if [ ${P/i686/} != ${P} ]; then
8 PLATFORM=i386-unknown-linux2.4
9 fi
10 if [ ${P/i586/} != ${P} ]; then
11 PLATFORM=i386-unknown-linux2.4
12 fi
13 if [ ${P/i486/} != ${P} ]; then
14 PLATFORM=i386-unknown-linux2.4
15 fi
16 if [ ${P/i386/} != ${P} ]; then
17 PLATFORM=i386-unknown-linux2.4
18 fi
19 if [ ${P/x86_64/} != ${P} ]; then
20 PLATFORM=x86_64-unknown-linux2.4
21 fi
22 if [ ${P/ppc64/} != ${P} ]; then
23 PLATFORM=ppc64_linux
24 fi
25 if [ ${P/powerpc64/} != ${P} ]; then
26 PLATFORM=ppc64_linux
27 fi
28 if [ ${P/powerpc-/} != ${P} ]; then
29 PLATFORM=ppc32_linux
30 fi
31 if [ ${P/ppc-/} != ${P} ]; then
32 PLATFORM=ppc32_linux
33 fi
34 if [ ${P/aarch64-/} != ${P} ]; then
35 PLATFORM=aarch64-unknown-linux
36 fi
37 # Freebsd
38 elif [ ${P/freebsd/} != ${P} ]; then
39 if [ ${P/i686/} != ${P} ]; then
40 PLATFORM=i386-unknown-freebsd7.2
41 fi
42 if [ ${P/i586/} != ${P} ]; then
43 PLATFORM=i386-unknown-freebsd7.2
44 fi
45 if [ ${P/i486/} != ${P} ]; then
46 PLATFORM=i386-unknown-freebsd7.2
47 fi
48 if [ ${P/i386/} != ${P} ]; then
49 PLATFORM=i386-unknown-freebsd7.2
50 fi
51 if [ ${P/x86_64/} != ${P} ]; then
52 PLATFORM=amd64-unknown-freebsd7.2
53 fi
54
55
56 # VxWorks
57 elif [ ${P/vxworks/} != ${P} ]; then
58 if [ ${P/i686/} != ${P} ]; then
59 PLATFORM=i386-unknown-vxworks6.x
60 fi
61 if [ ${P/i586/} != ${P} ]; then
62 PLATFORM=i386-unknown-vxworks6.x
63 fi
64 if [ ${P/i486/} != ${P} ]; then
65 PLATFORM=i386-unknown-vxworks6.x
66 fi
67 if [ ${P/i386/} != ${P} ]; then
68 PLATFORM=i386-unknown-vxworks6.x
69 fi
70 if [ ${P/powerpc-/} != ${P} ]; then
71 PLATFORM=ppc32-unknown-vxworks6.x
72 fi
73 fi
74
75 echo $PLATFORM