]> rtime.felk.cvut.cz Git - omk.git/blob - tests/shlibs
Don't exit when a test fails
[omk.git] / tests / shlibs
1 #!/bin/bash
2
3 case $OMK_RULES in
4     sdcc|rtems|sysless-keil51|sysless-keil16x)
5         exit 0;;
6 esac
7
8 . ./wvtest.sh
9
10 WVSTART "Shared library"
11
12 cat > 'funca.c' <<EOF
13 #include <mylib.h>
14 int funca(int a) {return a+1;}
15 EOF
16 cat > 'funcb.c' <<EOF
17 #include <mylib.h>
18 int funcb(int b) {return funca(b*2);}
19 EOF
20 cat > 'mylib.h' <<EOF
21 int funca(int a);
22 int funcb(int b);
23 EOF
24 cat > 'test.c' <<EOF
25 #include <stdio.h>
26 #include <mylib.h>
27 int main()
28 {
29         printf("result is %d\n", funcb(1));
30         return 0;
31 }
32 EOF
33 cat > 'Makefile.omk' <<EOF
34 shared_LIBRARIES = a b
35 a_SOURCES = funca.c
36 b_SOURCES = funcb.c
37 b_LIBS = a
38
39 include_HEADERS = mylib.h
40
41 bin_PROGRAMS = test
42 test_SOURCES = test.c
43 test_LIBS = a b
44 EOF
45 needs_valid_CC
46 WVPASS make