resource: install examples 04/34504/3
authorPhilippe Coval <philippe.coval@open.eurogiciel.org>
Mon, 26 Jan 2015 14:28:45 +0000 (15:28 +0100)
committerPhilippe Coval <philippe.coval@open.eurogiciel.org>
Thu, 29 Jan 2015 10:57:52 +0000 (11:57 +0100)
Change-Id: I907e35ed731730ec0d3c90dcb2a58750c8f1c2da
Forwarded: https://gerrit.iotivity.org/gerrit/#/c/254/
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
resource/makefile

index a710781..ce1666e 100644 (file)
@@ -36,6 +36,7 @@ CEREAL_DIR:= $(DEPEND_DIR)/cereal
 
 OUT_DIR          := $(ROOT_DIR)/$(BUILD)
 OBJ_DIR          := $(OUT_DIR)/obj
+DEST_LIB_DIR?=${DESTDIR}/opt/iotivity
 
 CXX_FLAGS.debug     := -g3 -std=c++0x -Wall -pthread -O0
 CXX_FLAGS.release   := -std=c++0x -Wall -pthread -O3
@@ -127,3 +128,9 @@ clean_legacy:
        -rm -f -v $(OBJ_DIR)/liboc.a $(OBJ_DIR)/*.o
        cd csdk && $(MAKE) clean
        cd csdk && $(MAKE) deepclean
+
+install: examples/$(BUILD)
+       for file in $</* ; do \
+       install -d $(DEST_LIB_DIR)/examples ; \
+       install $${file} $(DEST_LIB_DIR)/examples/ ; \
+       done