diff --git a/packages/base/amd64/oom_shim/Makefile b/packages/base/amd64/oom_shim/Makefile new file mode 100644 index 00000000..003238cf --- /dev/null +++ b/packages/base/amd64/oom_shim/Makefile @@ -0,0 +1 @@ +include $(ONL)/make/pkg.mk \ No newline at end of file diff --git a/packages/base/amd64/oom_shim/PKG.yml b/packages/base/amd64/oom_shim/PKG.yml new file mode 100644 index 00000000..d8f9b23f --- /dev/null +++ b/packages/base/amd64/oom_shim/PKG.yml @@ -0,0 +1,2 @@ +!include $ONL/packages/base/any/oom_shim/APKG.yml ARCH=amd64 TOOLCHAIN=x86_64-linux-gnu + diff --git a/packages/base/amd64/oom_shim/builds/Makefile b/packages/base/amd64/oom_shim/builds/Makefile new file mode 100644 index 00000000..a6c9d258 --- /dev/null +++ b/packages/base/amd64/oom_shim/builds/Makefile @@ -0,0 +1,3 @@ +include $(ONL)/make/config.amd64.mk +include $(ONL)/packages/base/any/oom_shim/builds/Makefile + diff --git a/packages/base/any/oom_shim/APKG.yml b/packages/base/any/oom_shim/APKG.yml new file mode 100644 index 00000000..e8490b9b --- /dev/null +++ b/packages/base/any/oom_shim/APKG.yml @@ -0,0 +1,32 @@ +############################################################ +# +# OOM SHIM +# +# Requires: ARCH, TOOLCHAIN +# +############################################################ +variables: + libdir: /lib/${TOOLCHAIN} + +common: + arch: $ARCH + version: 1.0.0 + copyright: Copyright 2016 Big Switch Networks + maintainer: support@bigswitch.com + + + +packages: + - name: oom_shim + version: 1.0.0 + summary: Open Optical Module Wrapper library around ONLP + provides: [ oom_shim ] + + files: + builds/$BUILD_DIR/${TOOLCHAIN}/liboom_shim.so : $libdir/ + + changelog: Initial code for 2016 OCP Demo + + + + diff --git a/packages/base/any/oom_shim/builds/Makefile b/packages/base/any/oom_shim/builds/Makefile new file mode 100644 index 00000000..8bc9a7f5 --- /dev/null +++ b/packages/base/any/oom_shim/builds/Makefile @@ -0,0 +1,9 @@ +include $(ONL)/make/any.mk + + +liboom_shim.so: + @$(CC) -o liboom_shim.so -shared -PIC liboom_shim.c + +.PHONY: deb +deb: + $(MAKE) -C deb diff --git a/packages/base/any/oom_shim/src/oom_shim.c b/packages/base/any/oom_shim/src/oom_shim.c new file mode 100644 index 00000000..5e866c30 --- /dev/null +++ b/packages/base/any/oom_shim/src/oom_shim.c @@ -0,0 +1,7 @@ +#include + +int test_func(int argc) +{ + + printf("Looks like it works...\n"); +}