summaryrefslogtreecommitdiffstats
path: root/examples/librados/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
commite6918187568dbd01842d8d1d2c808ce16a894239 (patch)
tree64f88b554b444a49f656b6c656111a145cbbaa28 /examples/librados/Makefile
parentInitial commit. (diff)
downloadceph-e6918187568dbd01842d8d1d2c808ce16a894239.tar.xz
ceph-e6918187568dbd01842d8d1d2c808ce16a894239.zip
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'examples/librados/Makefile')
-rw-r--r--examples/librados/Makefile39
1 files changed, 39 insertions, 0 deletions
diff --git a/examples/librados/Makefile b/examples/librados/Makefile
new file mode 100644
index 000000000..a97d640eb
--- /dev/null
+++ b/examples/librados/Makefile
@@ -0,0 +1,39 @@
+
+CXX?=g++
+CXX_FLAGS+=-Wno-unused-parameter -Wall -Wextra -Werror -g
+CXX_LIBS?=-lrados -lradosstriper
+CXX_INC?=$(LOCAL_LIBRADOS_INC)
+CXX_CC=$(CXX) $(CXX_FLAGS) $(CXX_INC) $(LOCAL_LIBRADOS)
+
+CC?=gcc
+CC_FLAGS=-Wno-unused-parameter -Wall -Wextra -Werror -g
+CC_INC=$(LOCAL_LIBRADOS_INC)
+CC_LIBS?=-lrados
+CC_CC=$(CC) $(CC_FLAGS) $(CC_INC) $(LOCAL_LIBRADOS)
+
+# Relative path to the Ceph source:
+CEPH_SRC_HOME?=../../src
+CEPH_BLD_HOME?=../../build
+
+LOCAL_LIBRADOS?=-L$(CEPH_BLD_HOME)/lib/ -Wl,-rpath,$(CEPH_BLD_HOME)/lib
+LOCAL_LIBRADOS_INC?=-I$(CEPH_SRC_HOME)/include
+
+all: hello_world_cpp hello_radosstriper_cpp hello_world_c
+
+# Build against the system librados instead of the one in the build tree:
+all-system: LOCAL_LIBRADOS=
+all-system: LOCAL_LIBRADOS_INC=
+all-system: all
+
+hello_world_cpp: hello_world.cc
+ $(CXX_CC) -o hello_world_cpp hello_world.cc $(CXX_LIBS)
+
+hello_radosstriper_cpp: hello_radosstriper.cc
+ $(CXX_CC) -o hello_radosstriper_cpp hello_radosstriper.cc $(CXX_LIBS)
+
+hello_world_c: hello_world_c.c
+ $(CC_CC) -o hello_world_c hello_world_c.c $(CC_LIBS)
+
+clean:
+ rm -f hello_world_cpp hello_radosstriper_cpp hello_world_c
+