aed3c27ead6e18c2be6845b80637fd43488147b8
[staging/basesystem.git] / service / system / config / library / system_manager_config / xml / Makefile
1 #
2 # @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #
16
17 #HOST TOOLS
18 HOST_CPP = cpp
19 HOST_LAUNCH_XML2CFG = ./launch_xml2cfg.sh
20
21 CONF_DIR = $(SDKTARGETSYSROOT)/etc/basesystem
22 CONF_THREAD_H = $(SDKTARGETSYSROOT)/usr/include/basesystem/agl_thread.h
23
24 LAUNCH_XMLFILES = $(shell cd $(CONF_DIR)/sm_launch; ls *.xml)
25 LAUNCH_CFGFILES = $(LAUNCH_XMLFILES:%.xml=%.cfg)
26
27 INST_CONFDIR = $(SDKTARGETSYSROOT)/etc/basesystem/systemmanager
28
29 CLEAN_FILES = system_launcher_body.xml $(LAUNCH_CFGFILES)
30
31 VPATH = $(CONF_DIR)/sm_launch
32
33 install:install-pre install-cfg
34
35 install-pre:
36         install -d -m 775  $(DESTDIR)/etc/basesystem;\
37         install -d -m 775  $(DESTDIR)/etc/basesystem/sm_launch;\
38         install -d -m 775  $(DESTDIR)/etc/basesystem/systemmanager;\
39         install -m 644 -t  $(DESTDIR)/etc/basesystem/sm_launch sm_launch_agl.xml 
40
41 install-cfg:$(LAUNCH_CFGFILES)
42         set -e                                 ;\
43         install -d -m 775  $(INST_CONFDIR)     ;\
44         for cfgfile in $(LAUNCH_CFGFILES);do   \
45                 install -m 644 -t $(INST_CONFDIR) $$cfgfile;\
46         done                                  ;\
47
48 #Create CFG file
49 # %.cfg:%.xml  # defined in agl.mk
50
51 PHONY:install-cfg
52
53 include ../../../../system_service.mk