File: make.sh

package info (click to toggle)
unpaper 0.3-1
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 956 kB
  • ctags: 200
  • sloc: ansic: 4,131; makefile: 41; sh: 15
file content (29 lines) | stat: -rwxr-xr-x 768 bytes parent folder | download
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
# Simple makefile to build/install unpaper.
#
# Usage: make.sh [install]

INST_DIR=/usr/local/bin

if [[ "$1" == "install" ]]; then
  # must be root here
  if [[ "`whoami`" != "root" ]]; then
    echo "You should be root to copy 'unpaper' to '$INST_DIR'. Or try manually if you know what you are doing."
    exit
  fi
  if [[ ! -x unpaper ]]; then
    # not compiled yet
    ./make.sh
  fi
  echo "installing to $INST_DIR/unpaper"
  cp -v unpaper $INST_DIR
  exit
fi

# $CFLAGS may contain specific processor architecture information
# or optimization flags, e.g.:
# "-O3 -funroll-all-loops -fomit-frame-pointer -ftree-vectorize".

# -lm is required to link the math-libary which provides sin(), cos() etc.

echo "compiling"
gcc ${CFLAGS} -lm -o unpaper src/unpaper.c