6 WVSTART "Compile a single source C program"
8 int main() { return 0; }
10 cat > 'Makefile.omk' <<'EOF' # OMK manual includes this file - do not modify it
17 WVSTART "Compile a multiple source C program"
18 cat > 'func.c' <<< "void func() { }"
19 cat > 'test.c' <<< "void func(); int main() { func(); return 0; }"
20 cat > 'Makefile.omk' <<'EOF'
22 test_SOURCES = test.c func.c
27 WVSTART "Two programs sharing a source"
28 cat > 'func.c' <<< "void func() { }"
29 cat > 'p1.c' <<< "void func(); int main() { func(); return 0; }"
30 cat > 'p2.c' <<< "void func(); int main() { func(); return 0; }"
31 cat > 'Makefile.omk' <<'EOF'
33 p1_SOURCES = p1.c func.c
34 p2_SOURCES = p2.c func.c
40 WVSTART "Generated sources"
41 cat > 'Makefile.omk' <<'EOF'
46 echo "int main() { return 0; }" > $@
51 WVSTART "Compile a single source C program twice"
52 cat > 'test.c' <<'EOF'
53 int main() { return 0; }
55 cat > 'Makefile.omk' <<'EOF' # OMK manual includes this file - do not modify it