add default scoring config for armv7 arch 41/203341/1
authorwansuyoo <wansu.yoo@samsung.com>
Fri, 12 Apr 2019 01:35:27 +0000 (10:35 +0900)
committerwansuyoo <wansu.yoo@samsung.com>
Fri, 12 Apr 2019 01:38:07 +0000 (10:38 +0900)
create makefile for compile scoring for arm
add config at libedge-orchestration package

Change-Id: I49785089fca0134c806774f769359126e61a129a
Signed-off-by: wansuyoo <wansu.yoo@samsung.com>
Makefile
packaging/edge-orchestration.spec
src/CMain/Makefile
src/CMain/lib/liborchestration.a
src/libedge-orchestration/Makefile
src/scoringmgr/mock/myscoring/Makefile [new file with mode: 0644]

index b25175d..eb14db9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -41,6 +41,13 @@ LIBPKG_LIB_DIR               := $(LIBPKG_DIR)/lib
 LIBPKG_INC_DIR         := $(LIBPKG_DIR)/inc
 LIBPKG_SAMPLE_DIR      := $(LIBPKG_DIR)/sample
 
+# Default scoring
+LIBSCORE_SAMPLE                        := myscoring
+LIBSCORE_SAMPLE_LIBRARY        := libmyscoring.so
+LIBSCORE_SAMPLE_VER            := 1.0.1
+LIBSCORE_SAMPLE_CONF   := myscoring.conf
+LIBSCORE_SAMPLE_DIR            := $(BASE_DIR)/src/scoringmgr/mock/myscoring
+
 
 
 .DEFAULT_GOAL := help
@@ -67,6 +74,7 @@ build-dbus-client:
        $(MAKE) -C $(LIBPKG_DIR)
        ls -al $(LIBPKG_LIB_DIR)
        ls -al $(LIBPKG_INC_DIR)
+       $(MAKE) -C $(LIBSCORE_SAMPLE_DIR)
 
 ## install output files for packaing
 install:
@@ -89,6 +97,11 @@ install:
        install -m 644 $(LIBPKG_LIB_DIR)/$(LIBPKG_LIB_FILE) $(DESTDIR)/usr/lib
        install -m 644 $(LIBPKG_INC_DIR)/$(LIBPKG_HEADER_FILE) $(DESTDIR)/usr/include/$(PKG_NAME)
 
+       install -d $(DESTDIR)/etc/$(PKG_NAME)/$(LIBSCORE_SAMPLE)
+       install -m 644 $(LIBSCORE_SAMPLE_DIR)/$(LIBSCORE_SAMPLE_CONF) $(DESTDIR)/etc/$(PKG_NAME)/$(LIBSCORE_SAMPLE)/
+#      install -m 644 $(LIBSCORE_SAMPLE_DIR)/$(LIBSCORE_SAMPLE_LIBRARY) $(DESTDIR)/etc/$(PKG_NAME)/$(LIBSCORE_SAMPLE)/
+       install -m 644 $(LIBSCORE_SAMPLE_DIR)/$(LIBSCORE_SAMPLE_LIBRARY).$(LIBSCORE_SAMPLE_VER) $(DESTDIR)/etc/$(PKG_NAME)/$(LIBSCORE_SAMPLE)/
+
 ## go test and coverage
 test:
        $(GOCOVER) test $(PKG_DIRS) > coverage.out
index 05b5e16..9bc0b5e 100755 (executable)
@@ -92,6 +92,9 @@ export BASE_DIR=.
 systemctl daemon-reload
 systemctl restart %{name}
 
+%post -n libedge-orchestration
+ln -s %{_sysconfdir}/%{name}/myscoring/libmyscoring.so.1.0.1 %{_sysconfdir}/%{name}/myscoring/libmyscoring.so
+
 %files
 %manifest %{name}.manifest
 %license LICENSE.Apache-2.0
@@ -101,14 +104,16 @@ systemctl restart %{name}
 %{_unitdir}/multi-user.target.wants/%{name}.service
 %{_datadir}/dbus-1/system-services/org.tizen.orchestration.service
 %{_sysconfdir}/dbus-1/system.d/org.tizen.orchestration.conf
-%dir %{_sysconfdir}/%{name}
+#%dir %{_sysconfdir}/%{name}
 
 %files -n libedge-orchestration
 %manifest lib%{name}.manifest
 %license LICENSE.Apache-2.0
 %defattr(-,root,root,-)
 %{_libdir}/liborchestration-client.so
+# orchestration sample
 %{_bindir}/orchestration_sample
+%{_sysconfdir}/%{name}/myscoring/*
 
 %files -n libedge-orchestration-devel
 %manifest lib%{name}.manifest
index 3676751..b8c497d 100755 (executable)
@@ -15,7 +15,6 @@ SRC_FILES             := \
 OBJ_FILES              := *.o
 
 # Build parameter
-CC             := gcc
 CFLAGS := -g -Wall -Werror -fPIE -pie
 
 all: clean build
index 87654b9..c54a8d8 100644 (file)
Binary files a/src/CMain/lib/liborchestration.a and b/src/CMain/lib/liborchestration.a differ
index 347cba3..866d20d 100755 (executable)
@@ -14,7 +14,7 @@ SRC_FILES             := \
 OBJ_FILES              := *.o
 
 # Build parameters
-CC             := gcc
+
 
 default: all
 
diff --git a/src/scoringmgr/mock/myscoring/Makefile b/src/scoringmgr/mock/myscoring/Makefile
new file mode 100644 (file)
index 0000000..6aa3218
--- /dev/null
@@ -0,0 +1,28 @@
+#
+# Makefile
+#
+
+# Target parameters
+LIBRARY_FILE   := libmyscoring.so
+LIBRARY_VER            := 1.0.1
+SRC_FILES              := \
+                       myscoring.c
+CONF_FILE              := myscoring.conf
+OBJ_FILES              := *.o
+
+# Build parameter
+
+all: clean build
+
+build:
+       $(CC) -fPIC -c $(SRC_FILES)
+       $(CC) -shared -o $(LIBRARY_FILE).$(LIBRARY_VER) $(OBJ_FILES) -lm
+#      ln -s $(LIBRARY_FILE).$(LIBRARY_VER) $(LIBRARY_FILE)
+       -rm -f $(OBJ_FILES)
+
+clean:
+       -rm -f $(OBJ_FILES)
+       -rm -f $(LIBRARY_FILE).$(LIBRARY_VER)
+       -rm -f $(LIBRARY_FILE)
+
+.PHONY: build clean
\ No newline at end of file