4
# aimk - Architecture Independent MaKefile
6
# Originally aimk comes from the PVM distribution
9
##########################################################################
11
# The Contents of this file are made available subject to the terms of
12
# the Sun Industry Standards Source License Version 1.2
14
# Sun Microsystems Inc., March, 2001
17
# Sun Industry Standards Source License Version 1.2
18
# =================================================
19
# The contents of this file are subject to the Sun Industry Standards
20
# Source License Version 1.2 (the "License"); You may not use this file
21
# except in compliance with the License. You may obtain a copy of the
22
# License at http://gridengine.sunsource.net/Gridengine_SISSL_license.html
24
# Software provided under this License is provided on an "AS IS" basis,
25
# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
26
# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
27
# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
28
# See the License for the specific provisions governing your rights and
29
# obligations concerning the Software.
31
# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
33
# Copyright: 2001 by Sun Microsystems, Inc.
35
# All Rights Reserved.
37
##########################################################################
42
if (! $?SGE_ROOT) then
43
echo Please set your SGE_ROOT environment variable before calling aimk
48
if (! $?KRB_HOME) then
49
#set KRB_HOME = /krb5/
50
set KRB_HOME = /usr/local/
53
# common compiler and linker settings
55
unsetenv LD_LIBRARY_PATH
57
set ARCH = `$SGE_ROOT/util/arch`
59
set MAKEFILE = ../Makefile
66
set STATIC = "-static -nostartfiles"
72
while ($#argv >= 1 && $?found)
78
echo ' -nomk dont call make - echo architecture and exit'
79
echo ' -debug compile with "-g" option'
80
echo ' -cc force usage of "cc" as compiler'
81
echo ' -gcc force usage of "gcc" as compiler'
82
echo ' -gss compile with the Kerberos GSSAPI libraries'
87
set argv = ($argv[2-])
90
set argv = ($argv[2-])
91
set DEBUG_FLAG = "$DEBUG_FLAG -g"
94
set argv = ($argv[2-])
98
set argv = ($argv[2-])
102
set argv = ($argv[2-])
103
set CFLAGS = "-DKERBEROS -I$KRB_HOME/include/gssapi -I$KRB_HOME/include $CFLAGS"
104
set LFLAGS = "-L$KRB_HOME/lib $LFLAGS"
105
set LIBS = "$LIBS -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err"
108
set argv = ($argv[2-])
109
set CFLAGS = "-DDCE -I/usr/include/dce $CFLAGS"
110
set LIBS = "$LIBS -ldce -threads"
125
set CFLAGS = "-DAIX41 -DUSE_STDARG $DEBUG_FLAG $CFLAGS"
126
set LFLAGS = "$DEBUG_FLAG $LFLAGS"
131
set CFLAGS = "-DCRAY $DEBUG_FLAG $CFLAGS"
132
set LFLAGS = "$DEBUG_FLAG $LFLAGS"
137
if ( $CC == gcc ) then
138
set CFLAGS = "-Wall -Wstrict-prototypes -DIRIX5 $DEBUG_FLAG $CFLAGS"
140
set CFLAGS = "-DIRIX5 $DEBUG_FLAG $CFLAGS"
142
set LFLAGS = "$DEBUG_FLAG $LFLAGS"
147
set CFLAGS = "-DIRIX6 $DEBUG_FLAG $CFLAGS"
148
set LFLAGS = "$DEBUG_FLAG $LFLAGS"
150
set DTOR = "/usr/lib/crt1.o"
151
set DTOR = "/usr/lib/crtn.o"
152
set STATIC = "-nostartfiles"
156
if ( $CC == gcc ) then
157
set CFLAGS = "-Wall -Wstrict-prototypes -DHPUX $DEBUG_FLAG $CFLAGS"
159
set CFLAGS = "-Aa -D_HPUX_SOURCE -DHPUX $DEBUG_FLAG $CFLAGS"
161
set LFLAGS = "$DEBUG_FLAG $LFLAGS"
166
if ( $CC == gcc ) then
167
set CFLAGS = "-O -Wall -Wstrict-prototypes -DHP10 $DEBUG_FLAG $CFLAGS"
169
set CFLAGS = "-Ae -O -DHP10 $DEBUG_FLAG $CFLAGS"
171
set LFLAGS = "$DEBUG_FLAG $LFLAGS"
178
set CFLAGS = "-O -Wall -DLINUX $DEBUG_FLAG $CFLAGS"
179
set LFLAGS = "$DEBUG_FLAG $LFLAGS"
181
set START_FILE = "/usr/lib/crti.o /usr/lib/crtbegin.o"
182
set CTOR = "/usr/lib/crti.o /usr/lib/crtbegin.o"
183
set DTOR = "/usr/lib/crtend.o /usr/lib/crtn.o"
189
if ( $CC == gcc ) then
190
set CFLAGS = "-Wall -Wstrict-prototypes -D_BSD -DALPHA $DEBUG_FLAG $CFLAGS"
192
set CFLAGS = "-std1 -warnprotos -D_BSD -DALPHA $DEBUG_FLAG $CFLAGS -Olimit 1500"
194
set LFLAGS = "$DEBUG_FLAG $LFLAGS"
199
if ( $CC == gcc ) then
200
set CFLAGS = "-Wall -Wstrict-prototypes -DAIX32 $DEBUG_FLAG $CFLAGS"
202
set CFLAGS = "-DAIX32 -DUSE_STDARG $DEBUG_FLAG $CFLAGS"
204
set LFLAGS = "$DEBUG_FLAG $LFLAGS"
210
if ( $CC == gcc ) then
211
set CFLAGS = "-DSOLARIS -O -Wall $DEBUG_FLAG $CFLAGS"
213
set CFLAGS = "-std1 -DSOLARIS -O $DEBUG_FLAG $CFLAGS"
215
set LIBS = "$LIBS -lresolv -lsocket -lnsl"
216
set STATIC = "-nostartfiles"
221
set CFLAGS = "-Wall -Wstrict-prototypes -DSUN4 $DEBUG_FLAG $CFLAGS"
222
set LFLAGS = "-static $DEBUG_FLAG $LFLAGS"
228
echo "ERROR: Architecture not yet supported by CODINE-aimk"
232
#----------------------------------------
238
if ( ! -d $ARCH ) then
239
echo "INFO: Architecture directory $ARCH doesn't exist. Making"
243
echo making in $ARCH/ for $ARCH
247
$MAKE -f $MAKEFILE.security "CC=$CC" "CFLAGS=$CFLAGS" "LFLAGS=$LFLAGS" \
248
"SDIR=$SDIR" "LIBS=$LIBS" \
249
"RANLIB=$RANLIB" "STATIC=$STATIC" "ARCH=$ARCH" \
250
"START_FILE=$START_FILE" \
251
"CTOR=$CTOR" "DTOR=$DTOR" $argv