]> rtime.felk.cvut.cz Git - omk.git/blob - tests/shlibs.files
dcf2b866d148dbf530987a9dfe24a7fc6af6e7b2
[omk.git] / tests / shlibs.files
1 cat > 'funcb.c' <<EOF
2 #include <mylib.h>
3
4 int funcb(int b)
5 {
6         return funca(b*2);
7 }
8 EOF
9 cat > 'test.c' <<EOF
10 #include <stdio.h>
11 #include <mylib.h>
12 int main()
13 {
14         printf("result is %d\n", funcb(1));
15         return 0;
16 }
17 EOF
18 cat > 'Makefile.omk' <<EOF
19 shared_LIBRARIES = a b
20 a_SOURCES = funca.c
21 b_SOURCES = funcb.c
22 b_LIBS = a
23
24 include_HEADERS = mylib.h
25
26 bin_PROGRAMS = test
27 test_SOURCES = test.c
28 test_LIBS = a b
29 EOF
30 cat > 'funca.c' <<EOF
31 #include <mylib.h>
32
33 int funca(int a)
34 {
35         return a+1;
36 }
37 EOF
38 cat > 'mylib.h' <<EOF
39 #ifndef MYLIB_H
40 #define MYLIB_H
41
42 int funca(int a);
43 int funcb(int b);
44
45
46 #endif
47 EOF