From 08bff1f635f2d1e743bf510c6db93121fdaa647e Mon Sep 17 00:00:00 2001
From: Wook Song <wook16.song@samsung.com>
Date: Mon, 4 Nov 2019 14:29:44 +0900
-Subject: [PATCH 1/7] [API/Makefile] Revise Makefile for API
+Subject: [PATCH 1/5] [API/Makefile] Revise Makefile for API
This patch eliminates a trailing white space and a commented line, which
is not required anymore.
-From 913cb55389190009715255872901367714e54370 Mon Sep 17 00:00:00 2001
+From 07aa89394577ae953a99cc9b5e8b18da8f620c99 Mon Sep 17 00:00:00 2001
From: Wook Song <wook16.song@samsung.com>
Date: Mon, 4 Nov 2019 15:24:46 +0900
-Subject: [PATCH 2/7] [API/Makefile] Generalize Makefile
+Subject: [PATCH 2/5] [API/Makefile] Generalize Makefile
The current version of Makefile for API uses hard-coded install
prefix, library and include directories. In order to generalize the
Signed-off-by: Wook Song <wook16.song@samsung.com>
---
- api/src/Makefile | 59 ++++++++++++++++++++++++++++++++----------------
- 1 file changed, 39 insertions(+), 20 deletions(-)
+ api/src/Makefile | 57 +++++++++++++++++++++++++++++++-----------------
+ 1 file changed, 37 insertions(+), 20 deletions(-)
diff --git a/api/src/Makefile b/api/src/Makefile
-index fa69d07..2627a7a 100644
+index fa69d07..af78525 100644
--- a/api/src/Makefile
+++ b/api/src/Makefile
@@ -6,11 +6,18 @@ NO_BOOT ?= no
+LIBS += -lpthread -ldl
+
+ifndef LIBS_LIBUSB
-+ INCLUDES += -lusb-1.0
++ LIBS += -lusb-1.0
+else
-+ INCLUDES += ${LIBS_LIBUSB}
++ LIBS += ${LIBS_LIBUSB}
+endif
#Allow compiling without highclass
CFLAGS += -O2 -Wall -pthread -fPIC -MMD -MP
LDFLAGS += -shared
-@@ -82,15 +101,15 @@ get_mvcmd:
+@@ -82,15 +101,13 @@ get_mvcmd:
@./get_mvcmd.sh
basicinstall: $(OBJDIR)/$(OUT) get_mvcmd
+ ln -fs $(OUT) ${INSTALL_LIBDIR}/$(LIB_NAME).so
+ cp ../include/mvnc.h ${INSTALL_INCDIR}/mvnc2
+ cd ${INSTALL_INCDIR} && ln -fs mvnc2/mvnc.h mvnc.h
-+ mkdir -p ${INSTALL_LIBDIR}/mvnc
-+ cp mvnc/MvNCAPI-*.mvcmd ${INSTALL_LIBDIR}/mvnc/
mkdir -p ${DESTDIR}/etc/udev/rules.d/
cp 97-usbboot.rules ${DESTDIR}/etc/udev/rules.d/
-@@ -108,11 +127,11 @@ postinstall:
+@@ -108,11 +125,11 @@ postinstall:
install: basicinstall pythoninstall postinstall
uninstall:
-From 7f9e84aa8807bd74585844379a59bf3f0de362c5 Mon Sep 17 00:00:00 2001
+From cb903c6adc55fce0e0d8477571f17d222b967918 Mon Sep 17 00:00:00 2001
From: Wook Song <wook16.song@samsung.com>
Date: Mon, 4 Nov 2019 15:56:04 +0900
-Subject: [PATCH 3/7] [API/Makefile] Modifies Makefile to generate libmvnc.pc
+Subject: [PATCH 3/5] [API/Makefile] Modifies Makefile to generate libmvnc.pc
This patch modifies Makefile to generate libmvnc.pc from libmvnc.pc.in,
which is also added by this patch.
create mode 100644 api/src/libmvnc.pc.in
diff --git a/api/src/Makefile b/api/src/Makefile
-index 2627a7a..99b8a4b 100644
+index af78525..a072fdf 100644
--- a/api/src/Makefile
+++ b/api/src/Makefile
@@ -14,6 +14,7 @@ INCLUDE_LIBUSB := $(shell pkg-config libusb-1.0 --cflags)
cp $(OBJDIR)/$(OUT) ${INSTALL_LIBDIR}/
ln -fs $(OUT) ${INSTALL_LIBDIR}/$(LIB_NAME).so
cp ../include/mvnc.h ${INSTALL_INCDIR}/mvnc2
-@@ -142,3 +152,5 @@ clean:
+@@ -140,3 +150,5 @@ clean:
rm -rf $(OBJDIR)
rm -f $(LIB_NAME).so
if [ -d "mvnc" ]; then find mvnc/ -type f -delete ; fi
-From 59a625c637329400f222964910d9b27279a571e2 Mon Sep 17 00:00:00 2001
+From b8447c33754e25a88434a00a9868d54ce9615d20 Mon Sep 17 00:00:00 2001
From: Wook Song <wook16.song@samsung.com>
Date: Mon, 4 Nov 2019 16:07:34 +0900
-Subject: [PATCH 4/7] [API/Makefile] Add flag to skip ./get_mvcmd.sh when it is
+Subject: [PATCH 4/5] [API/Makefile] Add flag to skip ./get_mvcmd.sh when it is
set
In order to support build systems such as OBS and LaunchPad that do
Signed-off-by: Wook Song <wook16.song@samsung.com>
---
- api/src/Makefile | 7 +++++++
- 1 file changed, 7 insertions(+)
+ api/src/Makefile | 3 +++
+ 1 file changed, 3 insertions(+)
diff --git a/api/src/Makefile b/api/src/Makefile
-index 99b8a4b..ca1e85c 100644
+index a072fdf..bf4c9da 100644
--- a/api/src/Makefile
+++ b/api/src/Makefile
@@ -2,6 +2,7 @@ ARCH := $(shell uname -m)
basicinstall: $(OBJDIR)/$(OUT) get_mvcmd libmvnc_pkgconfig
mkdir -p ${INSTALL_INCDIR}
-@@ -118,8 +121,10 @@ basicinstall: $(OBJDIR)/$(OUT) get_mvcmd libmvnc_pkgconfig
- ln -fs $(OUT) ${INSTALL_LIBDIR}/$(LIB_NAME).so
- cp ../include/mvnc.h ${INSTALL_INCDIR}/mvnc2
- cd ${INSTALL_INCDIR} && ln -fs mvnc2/mvnc.h mvnc.h
-+ifeq ($(strip $(WITH_TIZEN)), no)
- mkdir -p ${INSTALL_LIBDIR}/mvnc
- cp mvnc/MvNCAPI-*.mvcmd ${INSTALL_LIBDIR}/mvnc/
-+endif
- mkdir -p ${DESTDIR}/etc/udev/rules.d/
- cp 97-usbboot.rules ${DESTDIR}/etc/udev/rules.d/
-
-@@ -141,7 +146,9 @@ uninstall:
- rm -f ${INSTALL_LIBDIR}/$(LIB_NAME).so
- rm -f ${INSTALL_INCDIR}/mvnc.h
- rm -f ${INSTALL_INCDIR}/mvnc2/mvnc.h
-+ifeq ($(strip $(WITH_TIZEN)), no)
- rm -f ${INSTALL_LIBDIR}/mvnc/MvNCAPI-*.mvcmd
-+endif
- rm -rf ${DESTDIR}$(PYTHON3DIST)/mvnc
- rm -rf ${DESTDIR}$(PYTHON2DIST)/mvnc
- rm -f ${DESTDIR}/etc/udev/rules.d/97-usbboot.rules
--
2.17.1