source: main/trunk/greenstone2/runtime-src/packages/security/CASCADE-MAKE/CMAKE.sh@ 28868

Last change on this file since 28868 was 28868, checked in by ak19, 10 years ago

Dr Bainbridge got CMake to compile. C/CXX/LD Flags need to be exported for CMAKE, and before the configure step.

  • Property svn:executable set to *
File size: 832 bytes
Line 
1#!/bin/bash
2
3cd $securitydir/$compiledir
4prefix=$installdir
5
6# If doing a make clean or distclean
7if [ "x$1" != "x" ]; then
8 make $1
9 exit 0
10fi
11
12# else, configure, make, make install
13# First need to set the C/CXX/LD FLAGS for configuring (and compiling)
14export CFLAGS="-I$prefix -I$prefix/include"
15export CXXFLAGS=$CFLAGS
16export LDFLAGS="-L$prefix/lib"
17
18# configure, but only if we haven't already
19if [ ! -e Makefile ] ; then
20 ./configure --prefix=$prefix \
21 --system-curl \
22 -- -DCURL_INCLUDE_DIR=$prefix/include -DCURL_LIBRARY=$prefix/lib/libcurl.so
23fi
24
25
26# make
27make
28if [ $? != 0 ] ; then
29 echo "Error encountered making $0"
30 exit 1
31fi
32
33# make install
34make install
35if [ $? != 0 ] ; then
36 echo "Error encountered when installing $0"
37 exit 1
38fi
39
40export CFLAGS=
41export CXXFLAGS=
42export LDFLAGS=
43
44cd $securitydir
Note: See TracBrowser for help on using the repository browser.