]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
examples: fix link order in librados example Makefile 17842/head
authorMahati Chamarthy <mahati.chamarthy@gmail.com>
Wed, 20 Sep 2017 14:09:55 +0000 (19:39 +0530)
committerMahati Chamarthy <mahati.chamarthy@intel.com>
Mon, 25 Sep 2017 13:50:58 +0000 (19:20 +0530)
The library link order in librados example Makefile is incorrect
and as a result 'make' throws an error. This change fixes the order.

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@intel.com>
examples/librados/Makefile
examples/librados/hello_world.readme

index 533a4c64711f19747cf6f192964e1acbbc1d1366..90fe7ecb55d1bdef7105345635970e2e7e7153ca 100644 (file)
@@ -3,13 +3,13 @@ CXX?=g++
 CXX_FLAGS?=-std=c++11 -Wall -Wextra -Werror -g
 CXX_LIBS?=-lboost_system -lrados -lradosstriper
 CXX_INC?=$(LOCAL_LIBRADOS_INC)
-CXX_CC=$(CXX) $(CXX_FLAGS) $(CXX_INC) $(LOCAL_LIBRADOS) $(CXX_LIBS)
+CXX_CC=$(CXX) $(CXX_FLAGS) $(CXX_INC) $(LOCAL_LIBRADOS)
 
 CC?=gcc
 CC_FLAGS=-Wall -Wextra -Werror -g
 CC_INC=$(LOCAL_LIBRADOS_INC)
 CC_LIBS?=-lrados
-CC_CC=$(CC) $(CC_FLAGS) $(CC_INC) $(LOCAL_LIBRADOS) $(CC_LIBS)
+CC_CC=$(CC) $(CC_FLAGS) $(CC_INC) $(LOCAL_LIBRADOS)
 
 # Relative path to the Ceph source:
 CEPH_SRC_HOME?=../../src
@@ -26,13 +26,13 @@ all-system: LOCAL_LIBRADOS_INC=
 all-system: all
 
 hello_world_cpp: hello_world.cc
-       $(CXX_CC) -o 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_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_CC) -o hello_world_c hello_world_c.c $(CC_LIBS)
 
 clean:
        rm -f hello_world_cpp hello_radosstriper_cpp hello_world_c
index d438f932e47f3d9692572e6546bbb511f4fdb67e..afa1cb32e8fa4321b0ffdbc9b9a85af2752cdbad 100644 (file)
@@ -6,7 +6,7 @@ build tree (ie. using relative paths). If you would like to build the examples a
 your system librados and headers, use "make all-system".
 
 And executed using
-./librados_hello_world -c ../../src/ceph.conf
+./hello_world_cpp -c ../../src/ceph.conf
 (or whatever path to a ceph.conf is appropriate to you, or
 by explicitly specifying monitors, user id, and keys).