soft-off: Add pldm host soft off requester application.
Since the phosphor-softpoweroff is too tied up to IPMI, we need to
implement a new pldm host soft off requester application in parallel in
the pldm repo.
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I47534bb25c976a0004a1cd9f07d7590e605ce243
Signed-off-by: Chicago Duan <duanzhijia01@inspur.com>
diff --git a/meson.build b/meson.build
index 2451693..e2798e8 100644
--- a/meson.build
+++ b/meson.build
@@ -102,4 +102,8 @@
subdir('utilities')
endif
+if get_option('softoff').enabled()
+ subdir('softoff')
+endif
+
endif # pldm-only
diff --git a/meson_options.txt b/meson_options.txt
index aaacf38..ae236ad 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -6,3 +6,4 @@
option('libpldm-only', type: 'feature', description: 'Only build libpldm', value: 'disabled')
option('oem-ibm-dma-maxsize', type: 'integer', description: 'OEM-IBM: max DMA size', value: 16773120) #16MB - 4K
+option('softoff', type: 'feature', description: 'Build soft power off application', value: 'enabled')
diff --git a/softoff/main.cpp b/softoff/main.cpp
new file mode 100644
index 0000000..e56a008
--- /dev/null
+++ b/softoff/main.cpp
@@ -0,0 +1,8 @@
+#include "libpldm/platform.h"
+
+#include <iostream>
+
+int main()
+{
+ return 0;
+}
diff --git a/softoff/meson.build b/softoff/meson.build
new file mode 100644
index 0000000..09c9d2c
--- /dev/null
+++ b/softoff/meson.build
@@ -0,0 +1,9 @@
+deps = [ libpldm ]
+
+source = ['main.cpp']
+
+executable('pldm-softpoweroff',source,
+ implicit_include_directories: false,
+ dependencies: deps,
+ install: true,
+ install_dir: get_option('bindir'))