build: Update for install tool usage.
Export install symbol from master makefile.
Use install tool to set header file permissions when installing.
Ensure header files have 0644 permissions
Signed-off-by: Robert Walker <robert.walker@arm.com>
diff --git a/decoder/build/linux/makefile b/decoder/build/linux/makefile
index 15d0da9..330829b 100644
--- a/decoder/build/linux/makefile
+++ b/decoder/build/linux/makefile
@@ -68,7 +68,7 @@
export MASTER_CPP=$(CROSS_COMPILE)g++
export MASTER_LINKER=$(CROSS_COMPILE)g++
export MASTER_LIB=$(CROSS_COMPILE)ar
-INSTALL=install
+export INSTALL=install
# installation directory
INSTALL_LIB_DIR=/usr/lib/
diff --git a/decoder/build/linux/rctdl_c_api_lib/makefile b/decoder/build/linux/rctdl_c_api_lib/makefile
index 4f70dc9..fb54d3a 100644
--- a/decoder/build/linux/rctdl_c_api_lib/makefile
+++ b/decoder/build/linux/rctdl_c_api_lib/makefile
@@ -85,21 +85,21 @@
#### install the necessary include files for the c-api library on linux
install_inc:
- mkdir -p $(INST_INC_DST)/
- cp -d $(INST_INC_SRC)/trc_gen_elem_types.h $(INST_INC_DST)/.
- cp -d $(INST_INC_SRC)/ocsd_if_types.h $(INST_INC_DST)/.
- cp -d $(INST_INC_SRC)/trc_pkt_types.h $(INST_INC_DST)/.
- mkdir -p $(INST_INC_DST)/ptm
- cp -d $(INST_INC_SRC)/ptm/trc_pkt_types_ptm.h $(INST_INC_DST)/ptm/.
- mkdir -p $(INST_INC_DST)/stm
- cp -d $(INST_INC_SRC)/stm/trc_pkt_types_stm.h $(INST_INC_DST)/stm/.
- mkdir -p $(INST_INC_DST)/etmv3
- cp -d $(INST_INC_SRC)/etmv3/trc_pkt_types_etmv3.h $(INST_INC_DST)/etmv3/.
- mkdir -p $(INST_INC_DST)/etmv4
- cp -d $(INST_INC_SRC)/etmv4/trc_pkt_types_etmv4.h $(INST_INC_DST)/etmv4/.
- mkdir -p $(INST_INC_DST)/c_api
- cp -d $(INST_INC_SRC)/c_api/ocsd_c_api_types.h $(INST_INC_DST)/c_api/.
- cp -d $(INST_INC_SRC)/c_api/opencsd_c_api.h $(INST_INC_DST)/c_api/.
- cp -d $(INST_INC_SRC)/c_api/ocsd_c_api_custom.h $(INST_INC_DST)/c_api/.
+ $(INSTALL) -d --mode=0755 $(INST_INC_DST)/
+ $(INSTALL) --mode=0644 $(INST_INC_SRC)/trc_gen_elem_types.h $(INST_INC_DST)/
+ $(INSTALL) --mode=0644 $(INST_INC_SRC)/ocsd_if_types.h $(INST_INC_DST)/
+ $(INSTALL) --mode=0644 $(INST_INC_SRC)/trc_pkt_types.h $(INST_INC_DST)/
+ $(INSTALL) -d --mode=0755 $(INST_INC_DST)/ptm
+ $(INSTALL) --mode=0644 $(INST_INC_SRC)/ptm/trc_pkt_types_ptm.h $(INST_INC_DST)/ptm/
+ $(INSTALL) -d --mode=0755 $(INST_INC_DST)/stm
+ $(INSTALL) --mode=0644 $(INST_INC_SRC)/stm/trc_pkt_types_stm.h $(INST_INC_DST)/stm/
+ $(INSTALL) -d --mode=0755 $(INST_INC_DST)/etmv3
+ $(INSTALL) --mode=0644 $(INST_INC_SRC)/etmv3/trc_pkt_types_etmv3.h $(INST_INC_DST)/etmv3/
+ $(INSTALL) -d --mode=0755 $(INST_INC_DST)/etmv4
+ $(INSTALL) --mode=0644 $(INST_INC_SRC)/etmv4/trc_pkt_types_etmv4.h $(INST_INC_DST)/etmv4/
+ $(INSTALL) -d --mode=0755 $(INST_INC_DST)/c_api
+ $(INSTALL) --mode=0644 $(INST_INC_SRC)/c_api/ocsd_c_api_types.h $(INST_INC_DST)/c_api/
+ $(INSTALL) --mode=0644 $(INST_INC_SRC)/c_api/opencsd_c_api.h $(INST_INC_DST)/c_api/
+ $(INSTALL) --mode=0644 $(INST_INC_SRC)/c_api/ocsd_c_api_custom.h $(INST_INC_DST)/c_api/