File: cc_make_examples.sh

package info (click to toggle)
epr-api 2.3~dev20150708-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,128 kB
  • sloc: ansic: 14,310; sh: 194; makefile: 146; xml: 125
file content (54 lines) | stat: -rw-r--r-- 1,056 bytes parent folder | download | duplicates (7)
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
#!/bin/bash

if [ ! -f "../../bin" ]
then
    mkdir ../../bin
fi

if [ -f "../../bin/write_bands" ]
then
    rm ../../bin/write_bands
fi

if [ -f "../../bin/write_bitmask" ]
then
    rm ../../bin/write_bitmask
fi

if [ -f "../../bin/write_ndvi" ]
then
    rm ../../bin/write_ndvi
fi

cc -lm ../../src/*.c ../../src/examples/write_bands.c -o ../../bin/write_bands
cc -lm ../../src/*.c ../../src/examples/write_bitmask.c -o ../../bin/write_bitmask
cc -lm ../../src/*.c ../../src/examples/write_ndvi.c -o ../../bin/write_ndvi

if [ ! -f "../../bin/write_bands" ]
then
    echo ""
    echo "Error:"
    echo "--> write_bands could not be compiled"
else
    echo "--> write_bands compiled successful"
fi

if [ ! -f "../../bin/write_bitmask" ]
then
    echo ""
    echo "Error:"
    echo "--> write_bitmask could not be compiled"
else
    echo "--> write_bitmask compiled successful"
fi

if [ ! -f "../../bin/write_ndvi" ]
then
    echo ""
    echo "Error:"
    echo "--> write_ndvi could not be compiled"
else
    echo "--> write_ndvi compiled successful"
fi