2 # @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
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
8 # http://www.apache.org/licenses/LICENSE-2.0
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.
19 HOST_ORDER_XML2CFG = ./launch_order_xml2cfg.pl
21 CONF_DIR = $(SDKTARGETSYSROOT)/usr/agl/conf
22 CONF_WON_H = $(SDKTARGETSYSROOT)/usr/agl/include/agl_wakeup_order.h
24 LAUNCH_XMLFILES = $(shell cd $(CONF_DIR)/sm_launch; ls *.xml)
25 ORDER_XMLFILES = $(LAUNCH_XMLFILES:%.xml=%.order)
26 ORDER_CFGFILES = $(ORDER_XMLFILES:%.order=%.order.cfg)
28 INST_CONFDIR = $(SDKTARGETSYSROOT)/usr/agl/conf/systemmanager
30 CLEAN_FILES = launch_order_body.xml $(ORDER_CFGFILES)
32 VPATH = $(CONF_DIR)/sm_launch
35 install:install-pre install-cfg
38 install -m 644 -t $(DESTDIR)/usr/agl/conf/sm_launch system_launcher_main.xml
40 install-cfg:$(ORDER_CFGFILES)
42 install -d -m 775 $(INST_CONFDIR) ;\
43 for cfgfile in $(ORDER_CFGFILES);do \
44 install -m 644 -t $(INST_CONFDIR) $$cfgfile;\
48 %.order.cfg:%.order %.cfg
51 $(HOST_CPP) $(CPPFLAGS) -P -include $(CONF_WON_H) $< > launch_in.order; \
52 $(HOST_ORDER_XML2CFG) launch_in.order $(filter %.cfg,$+) > $@ ; \
53 rm -fr launch_in.order;
58 if [ ! -e $@ ] ; then \
64 include ../../../../system_service.mk