#!/bin/bash
-. ./functions.sh
+. ./wvtest.sh
-touch config.omk-default
+WVSTART "Static library"
+cat > 'funca.c' <<EOF
+#include <mylib.h>
+int funca(int a) {return a+1;}
+EOF
+cat > 'funcb.c' <<EOF
+#include <mylib.h>
+int funcb(int b) {return b*2;}
+EOF
+cat > 'mylib.h' <<EOF
+int funca(int a);
+int funcb(int b);
+EOF
+cat > 'test.c' <<EOF
+#include <mylib.h>
+int main() {
+ funca(10);
+ funcb(20);
+ return 0;
+}
+EOF
+cat > 'Makefile.omk' <<EOF
+lib_LIBRARIES = mylib
+mylib_SOURCES = funca.c funcb.c
+include_HEADERS = mylib.h
+
+bin_PROGRAMS = test
+test_SOURCES = test.c
+test_LIBS = mylib
+EOF
needs_valid_CC
WVPASS make
+WVPASS test -f _compiled/lib/libmylib.a
+++ /dev/null
-cat > 'funcb.c' <<EOF
-#include <mylib.h>
-
-int funcb(int b)
-{
- return b*2;
-}
-EOF
-cat > 'test.c' <<EOF
-#include <stdio.h>
-#include <mynumber.h>
-int main()
-{
- printf("NUMBER is %d\n", NUMBER);
- return 0;
-}
-EOF
-cat > 'Makefile.omk' <<EOF
-lib_LIBRARIES = mylib
-mylib_SOURCES = funca.c funcb.c
-include_HEADERS = mylib.h
-EOF
-cat > 'funca.c' <<EOF
-#include <mylib.h>
-
-int funca(int a)
-{
- return a+1;
-}
-EOF
-cat > 'mylib.h' <<EOF
-#ifndef MYLIB_H
-#define MYLIB_H
-
-int funca(int a);
-int funcb(int b);
-
-
-#endif
-EOF
exit 0;;
esac
-. ./functions.sh
+. ./wvtest.sh
-touch config.omk-default
+WVSTART "Shared library"
+
+cat > 'funca.c' <<EOF
+#include <mylib.h>
+int funca(int a) {return a+1;}
+EOF
+cat > 'funcb.c' <<EOF
+#include <mylib.h>
+int funcb(int b) {return funca(b*2);}
+EOF
+cat > 'mylib.h' <<EOF
+int funca(int a);
+int funcb(int b);
+EOF
+cat > 'test.c' <<EOF
+#include <stdio.h>
+#include <mylib.h>
+int main()
+{
+ printf("result is %d\n", funcb(1));
+ return 0;
+}
+EOF
+cat > 'Makefile.omk' <<EOF
+shared_LIBRARIES = a b
+a_SOURCES = funca.c
+b_SOURCES = funcb.c
+b_LIBS = a
+
+include_HEADERS = mylib.h
+
+bin_PROGRAMS = test
+test_SOURCES = test.c
+test_LIBS = a b
+EOF
+needs_valid_CC
WVPASS make
+++ /dev/null
-cat > 'funcb.c' <<EOF
-#include <mylib.h>
-
-int funcb(int b)
-{
- return funca(b*2);
-}
-EOF
-cat > 'test.c' <<EOF
-#include <stdio.h>
-#include <mylib.h>
-int main()
-{
- printf("result is %d\n", funcb(1));
- return 0;
-}
-EOF
-cat > 'Makefile.omk' <<EOF
-shared_LIBRARIES = a b
-a_SOURCES = funca.c
-b_SOURCES = funcb.c
-b_LIBS = a
-
-include_HEADERS = mylib.h
-
-bin_PROGRAMS = test
-test_SOURCES = test.c
-test_LIBS = a b
-EOF
-cat > 'funca.c' <<EOF
-#include <mylib.h>
-
-int funca(int a)
-{
- return a+1;
-}
-EOF
-cat > 'mylib.h' <<EOF
-#ifndef MYLIB_H
-#define MYLIB_H
-
-int funca(int a);
-int funcb(int b);
-
-
-#endif
-EOF
+++ /dev/null
-python: rules not in ['sdcc', 'rtems', 'sysless-keil51', 'sysless-keil16x']