Limit the header files copied to those necessary for installaion of C-API interface to the library.
Install list maintained in the C-API makefile.
Signed-off-by: Mike Leach mike.leach@linaro.org --- decoder/build/linux/makefile | 8 ++++---- decoder/build/linux/rctdl_c_api_lib/makefile | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+), 4 deletions(-)
diff --git a/decoder/build/linux/makefile b/decoder/build/linux/makefile index 969cd24..24152d3 100644 --- a/decoder/build/linux/makefile +++ b/decoder/build/linux/makefile @@ -61,7 +61,7 @@ export OCSD_SOURCE=$(OCSD_ROOT)/source
export OCSD_TESTS=$(OCSD_ROOT)/tests
-UAPI_INCLUDE=$(OCSD_INCLUDE)/$(LIB_BASE_NAME) +export LIB_UAPI_INC_DIR=opencsd
# tools export MASTER_CC=$(CROSS_COMPILE)gcc @@ -72,7 +72,7 @@ INSTALL=install
# installation directory INSTALL_LIB_DIR=/usr/lib/ -INSTALL_INCLUDE_DIR=/usr/include/ +export INSTALL_INCLUDE_DIR=/usr/include/
# compile flags MASTER_CC_FLAGS := -c -Wall -DLINUX @@ -135,7 +135,7 @@ libs: $(LIB_BASE_NAME)_lib $(LIB_CAPI_NAME)_lib install: libs $(INSTALL) --mode=644 $(LIB_TARGET_DIR)/lib$(LIB_BASE_NAME).so $(INSTALL_LIB_DIR)/ $(INSTALL) --mode=644 $(LIB_TARGET_DIR)/lib$(LIB_CAPI_NAME).so $(INSTALL_LIB_DIR)/ - cp -dR $(UAPI_INCLUDE) $(INSTALL_INCLUDE_DIR)/ + cd $(OCSD_ROOT)/build/linux/rctdl_c_api_lib && make install_inc
################################ # build OpenCSD trace decode library @@ -193,4 +193,4 @@ clean_tests: clean_install: rm -f $(INSTALL_LIB_DIR)/lib$(LIB_BASE_NAME).so rm -f $(INSTALL_LIB_DIR)/lib$(LIB_CAPI_NAME).so - rm -rf $(INSTALL_INCLUDE_DIR)/$(LIB_BASE_NAME) + rm -rf $(INSTALL_INCLUDE_DIR)/$(LIB_UAPI_INC_DIR) diff --git a/decoder/build/linux/rctdl_c_api_lib/makefile b/decoder/build/linux/rctdl_c_api_lib/makefile index 1b8cf90..4f70dc9 100644 --- a/decoder/build/linux/rctdl_c_api_lib/makefile +++ b/decoder/build/linux/rctdl_c_api_lib/makefile @@ -52,6 +52,8 @@ CPP_INCLUDES= \ OBJECTS=$(BUILD_DIR)/ocsd_c_api.o \ $(BUILD_DIR)/ocsd_c_api_custom_obj.o
+INST_INC_SRC=$(OCSD_INCLUDE)/$(LIB_UAPI_INC_DIR) +INST_INC_DST=$(INSTALL_INCLUDE_DIR)/$(LIB_UAPI_INC_DIR)
all: build_dir $(OBJECTS) mkdir -p $(LIB_TARGET_DIR) @@ -80,3 +82,24 @@ clean: rm -f $(DEPS) rm -f $(LIB_TARGET_DIR)/$(LIB_NAME).a rm -f $(LIB_TARGET_DIR)/$(LIB_NAME).so + +#### 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/. + +