File: build

package info (click to toggle)
libsfml 2.6.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 10,164 kB
  • sloc: cpp: 48,245; ansic: 17,428; objc: 687; sh: 199; xml: 30; makefile: 14
file content (30 lines) | stat: -rw-r--r-- 796 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
#!/bin/sh
# autopkgtest check: Build and run a simple program against SFML

set -e

# Require $AUTOPKGTEST_TMP for temporary build files
if [ -z "$AUTOPKGTEST_TMP" ]
then
	echo "Required envvar \"$AUTOPKGTEST_TMP\"is not set" >&2
	exit 1
fi

cp debian/tests/sfml_test.cpp "$AUTOPKGTEST_TMP"
cd "$AUTOPKGTEST_TMP"

# Build programs - once with raw libraries and once with pkg-config
g++ -Wall -Werror -o sfml_test1 sfml_test.cpp -lsfml-network -lsfml-system
echo "build1: OK"
g++ -Wall -Werror -o sfml_test2 sfml_test.cpp $(pkg-config --cflags --libs sfml-all)
echo "build2: OK"
g++ -Wall -Werror -o sfml_test3 sfml_test.cpp $(pkg-config --cflags --libs sfml-network sfml-system)
echo "build3: OK"

# Run them
./sfml_test1
echo "run1: OK"
./sfml_test2
echo "run2: OK"
./sfml_test3
echo "run3: OK"