Remove unused directories and files in video_in_hal
[staging/basesystem.git] / service / system / config / library / system_manager_config / last2order / 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 # ==== Customization ================
18 #Directory path located XMLs for conversion
19 CONFXML_DIR_PATH ?= $(SDKTARGETSYSROOT)/usr/agl/conf/sm_last2order
20
21 #path to order file
22 ORDER_DEF_PATH ?= $(SDKTARGETSYSROOT)/usr/agl/include/agl_wakeup_order.h
23
24 #path to be installed CFO file
25 CONF_INSTALL_DIR ?= $(SDKTARGETSYSROOT)/usr/agl/conf/systemmanager
26
27 # ==================================
28
29 HOST_CPP = cpp
30 MKL_LAST2ORDER = mklast2ordertbl.pl
31
32 #path located last2order tools
33 TOOLPATH = ./tool
34
35 VPATH = $(CONFXML_DIR_PATH) $(TOOLPATH)
36
37 XMLFILES = $(shell cd $(CONFXML_DIR_PATH); ls *.xml)
38 XMLTMPFILES = $(XMLFILES:%.xml=%.xml.pped)
39 CFOFILES = $(XMLFILES:%.xml=%.cfo)
40
41 _all:$(CFOFILES)
42
43 install:install-pre install-cfo 
44
45 install-pre:
46         install -d -m 775  $(DESTDIR)/usr/agl/conf/sm_last2order;\
47         install -m 644 -t  $(DESTDIR)/usr/agl/conf/systemmanager sm_last2order.cfo 
48
49 install-cfo:_all
50         set -e ;\
51         install -d -m 775 $(CONF_INSTALL_DIR) ;\
52         for cfofile in $(CFOFILES); do \
53                 install -m 644 -t $(CONF_INSTALL_DIR) $$cfofile; \
54         done
55
56 %.cfo:%.xml.pped $(MKL_LAST2ORDER)
57         ln -fs $(TOOLPATH)/$(MKL_LAST2ORDER) 
58         ./$(MKL_LAST2ORDER) $< $@ 
59
60 %.xml.pped:%.xml 
61         $(HOST_CPP) -P -include $(ORDER_DEF_PATH) $< > $@
62
63 clean:clean_local
64 clean-sub:clean_local
65
66 clean_local:
67         rm -f *.cfo *.pped *.pl
68
69 .PHONY:install-cfo _all
70
71 include ../../../../system_service.mk