tec_uname.csh 2.48 KB
Newer Older
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
112
113
114
115
116
117
118
119
120
#!/bin/csh

# ########################
# Tecmake Configuration
# ########################

setenv TECTOOLS_HOME /home/tecgraf
setenv TECMAKE_HOME /home/tecgraf/tecmake
setenv TECMAKE_MAKE make

# ########################
# System Identification
# ########################

# Base Defintion
setenv TEC_SYSNAME	`uname -s`
setenv TEC_SYSVERSION	`uname -r|cut -f1 -d.`
setenv TEC_SYSMINOR	`uname -r|cut -f2 -d.`
setenv TEC_SYSARCH	`uname -m`

# Fixes
switch ( $TEC_SYSNAME )
case SunOS:
	setenv TEC_SYSARCH	`uname -p`
	breaksw
case IRIX:
	setenv TEC_SYSARCH	`uname -p`
	breaksw
case FreeBSD:
	setenv TEC_SYSMINOR	`uname -r|cut -f2 -d.|cut -f1 -d-`
	breaksw
case AIX:
	setenv TEC_SYSVERSION	`uname -v`
	setenv TEC_SYSMINOR	`uname -r`
	setenv TEC_SYSARCH	'ppc'
	breaksw
case Darwin:
	setenv TEC_SYSARCH	`uname -p`
	breaksw
endsw

if ($TEC_SYSARCH == 'i686' || $TEC_SYSARCH == 'i386') then
	setenv TEC_SYSARCH	'x86'
endif
if ($TEC_SYSARCH == 'powerpc') then
	setenv TEC_SYSARCH	'ppc'
endif
if ($TEC_SYSARCH == 'x86_64') then
	setenv TEC_SYSARCH	'x64'
endif

# Compose
setenv TEC_SYSRELEASE	$TEC_SYSVERSION.$TEC_SYSMINOR
setenv TEC_UNAME	$TEC_SYSNAME$TEC_SYSVERSION$TEC_SYSMINOR

# Linux 2.4 and GCC 3.x
if ($TEC_UNAME == 'Linux24') then
  set GCCVER=`gcc -dumpversion|cut -f1 -d.`
  if ($GCCVER == '3') then
	  setenv TEC_UNAME	$TEC_UNAME'g3'
  endif
  unset GCCVER
endif

# Linux 2.6 and GCC 4.x
if ($TEC_UNAME == 'Linux26') then
  set GCCVER=`gcc -dumpversion|cut -f1 -d.`
  if ($GCCVER == '4') then
	  setenv TEC_UNAME	$TEC_UNAME'g4'
  endif
  unset GCCVER
endif

# Linux and PowerPC
if ($TEC_SYSNAME == 'Linux') then
  if ($TEC_SYSARCH == 'ppc') then
	  setenv TEC_UNAME	$TEC_UNAME'ppc'
  endif
endif

# 64-bits Linux
if ($TEC_SYSARCH == 'x64') then
	setenv BUILD_64	Yes
	setenv TEC_UNAME	$TEC_UNAME'_64'
endif

if ($TEC_SYSARCH == 'ia64') then
	setenv BUILD_64	Yes
	setenv TEC_UNAME $TEC_UNAME'_ia64'
endif

# Solaris and Intel
if ($TEC_SYSNAME == 'SunOS') then
  if ($TEC_SYSARCH == 'x86') then
	  setenv TEC_UNAME	$TEC_UNAME'x86'
  endif
endif

# Darwin and Intel
if ($TEC_SYSNAME == 'Darwin') then
  if ($TEC_SYSARCH == 'x86') then
	  setenv TEC_UNAME	$TEC_UNAME'x86'
  endif
endif

# #####################
# Environment Variables
# #####################

foreach produto ( cd im iup lua lua52 )
	set PROD=`echo $produto|tr \[a-z\] \[A-Z\]`
	setenv $PROD $TECTOOLS_HOME/$produto
	unset PROD
end

setenv LUA51 $TECTOOLS_HOME/lua5.1
#If the Lua executables are not in the above folder tree
#setenv LUA_BIN /usr/local/bin

setenv CDDIR $CD/etc