File: make.sh

package info (click to toggle)
librsb 1.2.0-rc7-6
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 38,188 kB
  • sloc: ansic: 429,415; f90: 84,255; sh: 12,894; objc: 686; makefile: 686; awk: 18; sed: 1
file content (33 lines) | stat: -rwxr-xr-x 676 bytes parent folder | download | duplicates (2)
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
#!/bin/bash
# Script to build the librsb example programs.

LIBRSB_CONFIG=${LIBRSB_CONFIG:-librsb-config}

for s in *.c
do
	p=${s/.c/}
	rm -f $p 
	CFLAGS=`${LIBRSB_CONFIG} --I_opts`
       	LDFLAGS=`${LIBRSB_CONFIG} --ldflags --extra_libs`
	CC=`${LIBRSB_CONFIG} --cc`
	cmd="$CC $CFLAGS $s $LDFLAGS -o $p"
	echo $cmd
	$cmd
done

if test x"yes" = x"yes" ; then
# activated if you have built the Fortran modules and installed them in the right path.
for s in *.F90
do
	p=${s/.F90/}
	rm -f $p 
	CFLAGS=`${LIBRSB_CONFIG} --I_opts`
       	LDFLAGS=`${LIBRSB_CONFIG} --ldflags --extra_libs`
	FC=`${LIBRSB_CONFIG} --fc`
	cmd="$FC $CFLAGS $s $LDFLAGS -o $p"
	echo $cmd
	$cmd
done
fi