File: build-solaris.sh

package info (click to toggle)
ldns 1.7.0-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 6,416 kB
  • sloc: ansic: 43,318; python: 7,675; sh: 3,642; pascal: 2,351; perl: 2,188; makefile: 1,439; xml: 518
file content (50 lines) | stat: -rw-r--r-- 984 bytes parent folder | download | duplicates (5)
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
#!/bin/ksh
#
# $Id$


PREFIX=/opt/ldns
OPENSSL=/usr/sfw
SUDO=sudo

MAKE_PROGRAM=gmake
MAKE_ARGS="-j 4"

OBJ32=obj32
OBJ64=obj64

SRCDIR=`pwd`


test -d $OBJ32 && $SUDO rm -fr $OBJ32
mkdir $OBJ32

export CFLAGS=""
export LDFLAGS="-L${OPENSSL}/lib -R${OPENSSL}/lib"

(cd $OBJ32; \
${SRCDIR}/configure --with-ssl=${OPENSSL} --prefix=${PREFIX} --libdir=${PREFIX}/lib; \
$MAKE_PROGRAM $MAKE_ARGS)

if [ `isainfo -k` = amd64 ]; then
	test -d $OBJ64 && $SUDO rm -fr $OBJ64
	mkdir $OBJ64

	export CFLAGS="-m64"
	export LDFLAGS="-L${OPENSSL}/lib/amd64 -R${OPENSSL}/lib/amd64"

	(cd $OBJ64; \
	${SRCDIR}/configure --with-ssl=${OPENSSL} --prefix=${PREFIX} --libdir=${PREFIX}/lib/amd64; \
	$MAKE_PROGRAM $MAKE_ARGS)
fi

# optionally install
#
if [ x$1 = xinstall ]; then
	(cd $OBJ32; $SUDO $MAKE_PROGRAM install-h)
	(cd $OBJ32; $SUDO $MAKE_PROGRAM install-doc)
	(cd $OBJ32; $SUDO $MAKE_PROGRAM install-lib)
	if [ `isainfo -k` = amd64 ]; then
		(cd $OBJ64; $SUDO $MAKE_PROGRAM install-lib)
	fi
fi