diff --git a/Makefile b/Makefile index efbc6888..8ca40250 100644 --- a/Makefile +++ b/Makefile @@ -57,8 +57,7 @@ SIM_SERV_DIRS = \ ${TRICK_HOME}/trick_source/sim_services/VariableServer \ ${TRICK_HOME}/trick_source/sim_services/Zeroconf \ ${TRICK_HOME}/trick_source/sim_services/include \ - ${TRICK_HOME}/trick_source/sim_services/mains \ - ${TRICK_HOME}/include/trick + ${TRICK_HOME}/trick_source/sim_services/mains SIM_SERV_OBJS = $(addsuffix /object_$(TRICK_HOST_CPU)/*.o ,$(SIM_SERV_DIRS)) @@ -477,16 +476,16 @@ ALTERNATIVES := $(shell which alternatives || which update-alternatives) install: set_alternatives .PHONY: set_alternatives set_alternatives: copy_files - - ${ALTERNATIVES} --install /usr/local/bin/CP trick ${PREFIX}/trick/trick-$(TRICK_VERSION)/bin/CP 10 \ - --slave /usr/local/bin/ICG ICG /usr/local/trick/trick-$(TRICK_VERSION)/bin/ICG \ - --slave /usr/local/bin/gte gte /usr/local/trick/trick-$(TRICK_VERSION)/bin/gte \ - --slave /usr/local/bin/kill_sim kill_sim /usr/local/trick/trick-$(TRICK_VERSION)/bin/kill_sim \ - --slave /usr/local/bin/sie sie /usr/local/trick/trick-$(TRICK_VERSION)/bin/sie \ - --slave /usr/local/bin/sim_control sim_control /usr/local/trick/trick-$(TRICK_VERSION)/bin/sim_control \ - --slave /usr/local/bin/sniffer sniffer /usr/local/trick/trick-$(TRICK_VERSION)/bin/sniffer \ - --slave /usr/local/bin/trick_dp trick_dp /usr/local/trick/trick-$(TRICK_VERSION)/bin/trick_dp \ - --slave /usr/local/bin/trick_version trick_version /usr/local/trick/trick-$(TRICK_VERSION)/bin/trick_version \ - --slave /usr/local/bin/tv tv /usr/local/trick/trick-$(TRICK_VERSION)/bin/tv + - ${ALTERNATIVES} --install /usr/local/bin/CP trick ${PREFIX}/trick/trick-$(TRICK_VERSION)/bin/trick-CP 10 \ + --slave /usr/local/bin/trick-ICG trick-ICG /usr/local/trick/trick-$(TRICK_VERSION)/bin/trick-ICG \ + --slave /usr/local/bin/trick-gte trick-gte /usr/local/trick/trick-$(TRICK_VERSION)/bin/trick-gte \ + --slave /usr/local/bin/trick-killsim trick-killsim /usr/local/trick/trick-$(TRICK_VERSION)/bin/trick-killsim \ + --slave /usr/local/bin/trick-sie trick-sie /usr/local/trick/trick-$(TRICK_VERSION)/bin/trick-sie \ + --slave /usr/local/bin/trick-sim_control trick-simcontrol /usr/local/trick/trick-$(TRICK_VERSION)/bin/trick-simcontrol \ + --slave /usr/local/bin/trick-sniffer trick-sniffer /usr/local/trick/trick-$(TRICK_VERSION)/bin/trick-sniffer \ + --slave /usr/local/bin/trick-dp trick-dp /usr/local/trick/trick-$(TRICK_VERSION)/bin/trick-dp \ + --slave /usr/local/bin/trick-version trick-version /usr/local/trick/trick-$(TRICK_VERSION)/bin/trick-version \ + --slave /usr/local/bin/trick-tv trick-tv /usr/local/trick/trick-$(TRICK_VERSION)/bin/trick-tv uninstall: remove_alternatives .PHONY: remove_alternatives @@ -506,7 +505,7 @@ stand_alone_utils: # ICG all sim_services files (for testing and debugging ICG). # The -f flag forces io_src files to be regenerated whether or not they need to be. ICG: $(ICG_EXE) - ${TRICK_HOME}/bin/ICG -f -s ${TRICK_CXXFLAGS} ${TRICK_HOME}/include/trick/files_to_ICG.hh + ${TRICK_HOME}/bin/trick-ICG -f -s ${TRICK_CXXFLAGS} ${TRICK_HOME}/include/trick/files_to_ICG.hh # This builds a tricklib share library. ifeq ($(USE_ER7_UTILS_INTEGRATORS), 1) diff --git a/include/trick/Makefile b/include/trick/Makefile deleted file mode 100644 index 9966330c..00000000 --- a/include/trick/Makefile +++ /dev/null @@ -1,13 +0,0 @@ - -include ${TRICK_HOME}/share/trick/makefiles/Makefile.common -include ${TRICK_HOME}/share/trick/makefiles/Makefile.tricklib --include Makefile_deps - -#ifeq ($(USE_ER7_UTILS_INTEGRATORS), 1) -#trick: -# $(MAKE) -C er7_algorithms -#else -#trick: -# $(MAKE) -C trick_algorithms -#endif - diff --git a/trick_source/codegen/Interface_Code_Gen/HeaderSearchDirs.cpp b/trick_source/codegen/Interface_Code_Gen/HeaderSearchDirs.cpp index 32cb3284..72e01a75 100644 --- a/trick_source/codegen/Interface_Code_Gen/HeaderSearchDirs.cpp +++ b/trick_source/codegen/Interface_Code_Gen/HeaderSearchDirs.cpp @@ -124,6 +124,16 @@ void HeaderSearchDirs::AddTrickSearchDirs () { hso.AddPath(resolved_path , clang::frontend::Quoted, false, true); #else hso.AddPath(resolved_path , clang::frontend::Quoted, true, false, true); +#endif + trick_include_dir = std::string(resolved_path) ; + free(resolved_path) ; + + temp_dir = std::string(trick_home) + "/trick_source" ; + resolved_path = almostRealPath(temp_dir.c_str() ) ; +#if (__clang_major__ == 3) && (__clang_minor__ >= 3) + hso.AddPath(resolved_path , clang::frontend::Quoted, false, true); +#else + hso.AddPath(resolved_path , clang::frontend::Quoted, true, false, true); #endif trick_source_dir = std::string(resolved_path) ; free(resolved_path) ; @@ -210,7 +220,9 @@ bool HeaderSearchDirs::isPathInUserDir (std::string in_dir ) { return false ; } } - if ( ! sim_services and ! in_dir.compare(0, trick_source_dir.size(), trick_source_dir)) { + if ( ! sim_services and + (! in_dir.compare(0, trick_source_dir.size(), trick_source_dir) or + ! in_dir.compare(0, trick_include_dir.size(), trick_include_dir)) ) { return false ; } diff --git a/trick_source/codegen/Interface_Code_Gen/HeaderSearchDirs.hh b/trick_source/codegen/Interface_Code_Gen/HeaderSearchDirs.hh index 87cb4ebb..fe6c60e1 100644 --- a/trick_source/codegen/Interface_Code_Gen/HeaderSearchDirs.hh +++ b/trick_source/codegen/Interface_Code_Gen/HeaderSearchDirs.hh @@ -92,6 +92,9 @@ class HeaderSearchDirs { /** ${TRICK_HOME}/trick_source resolved */ std::string trick_source_dir ; + /** ${TRICK_HOME}/include/trick resolved */ + std::string trick_include_dir ; + /** Adds all of the built-in system paths contained in the TRICK_CPPC compiler */ void AddCompilerBuiltInSearchDirs () ; diff --git a/trick_source/codegen/Interface_Code_Gen/PrintAttributes.cpp b/trick_source/codegen/Interface_Code_Gen/PrintAttributes.cpp index 4a3ddd4d..4f4ad869 100644 --- a/trick_source/codegen/Interface_Code_Gen/PrintAttributes.cpp +++ b/trick_source/codegen/Interface_Code_Gen/PrintAttributes.cpp @@ -193,7 +193,13 @@ std::string PrintAttributes::createIOFileName(std::string header_file_name) { dir_name.replace(dir_name.size() - 8 , dir_name.size() , "") ; } } - io_file_name = dir_name + "/io_src/" + base_name ; + // Put all of the sim_services io_files in ${TRICK_HOME}/trick_source/sim_services/include/io_src unless + // it is in er7_utils. The er7_utils io_files have duplicate file names so the overwrite each other + if ( sim_services_flag and (dir_name.find("er7_utils") == std::string::npos) ) { + io_file_name = std::string(getenv("TRICK_HOME")) + "/trick_source/sim_services/include/io_src/" + base_name ; + } else { + io_file_name = dir_name + "/io_src/" + base_name ; + } return io_file_name ; } diff --git a/trick_source/data_products/DPX/TESTING/DPC_TEST/makefile b/trick_source/data_products/DPX/TESTING/DPC_TEST/makefile index 50fd8453..d784228f 100644 --- a/trick_source/data_products/DPX/TESTING/DPC_TEST/makefile +++ b/trick_source/data_products/DPX/TESTING/DPC_TEST/makefile @@ -1,5 +1,5 @@ -include ${TRICK_HOME}/makefiles/Makefile.common +include ${TRICK_HOME}/share/trick/makefiles/Makefile.common ifneq ($(HDF5),) ifneq ($(HDF5),/usr) diff --git a/trick_source/data_products/DPX/TESTING/DPM_TEST/makefile b/trick_source/data_products/DPX/TESTING/DPM_TEST/makefile index 1e0fe493..1bae65f0 100644 --- a/trick_source/data_products/DPX/TESTING/DPM_TEST/makefile +++ b/trick_source/data_products/DPX/TESTING/DPM_TEST/makefile @@ -1,5 +1,5 @@ -include ${TRICK_HOME}/makefiles/Makefile.common +include ${TRICK_HOME}/share/trick/makefiles/Makefile.common SHELL = /bin/sh RM = rm -rf diff --git a/trick_source/data_products/DPX/TESTING/DS/makefile b/trick_source/data_products/DPX/TESTING/DS/makefile index cd24384a..399e0aac 100644 --- a/trick_source/data_products/DPX/TESTING/DS/makefile +++ b/trick_source/data_products/DPX/TESTING/DS/makefile @@ -1,5 +1,5 @@ -include ${TRICK_HOME}/makefiles/Makefile.common +include ${TRICK_HOME}/share/trick/makefiles/Makefile.common ifneq ($(HDF5),) ifneq ($(HDF5),/usr) diff --git a/trick_source/data_products/DPX/TESTING/DS_exercisor/makefile b/trick_source/data_products/DPX/TESTING/DS_exercisor/makefile index 9b0a38ef..9c9e9be6 100644 --- a/trick_source/data_products/DPX/TESTING/DS_exercisor/makefile +++ b/trick_source/data_products/DPX/TESTING/DS_exercisor/makefile @@ -1,5 +1,5 @@ -include ${TRICK_HOME}/makefiles/Makefile.common +include ${TRICK_HOME}/share/trick/makefiles/Makefile.common SHELL = /bin/sh RM = rm -rf diff --git a/trick_source/data_products/DPX/TESTING/TCDS/makefile b/trick_source/data_products/DPX/TESTING/TCDS/makefile index bb19f1e6..cc767736 100644 --- a/trick_source/data_products/DPX/TESTING/TCDS/makefile +++ b/trick_source/data_products/DPX/TESTING/TCDS/makefile @@ -1,5 +1,5 @@ -include ${TRICK_HOME}/makefiles/Makefile.common +include ${TRICK_HOME}/share/trick/makefiles/Makefile.common ifneq ($(HDF5),) ifneq ($(HDF5),/usr) diff --git a/trick_source/data_products/DPX/TESTING/UDS/makefile b/trick_source/data_products/DPX/TESTING/UDS/makefile index ed852fd8..c3144d8c 100644 --- a/trick_source/data_products/DPX/TESTING/UDS/makefile +++ b/trick_source/data_products/DPX/TESTING/UDS/makefile @@ -1,5 +1,5 @@ -include ${TRICK_HOME}/makefiles/Makefile.common +include ${TRICK_HOME}/share/trick/makefiles/Makefile.common ifneq ($(HDF5),) ifneq ($(HDF5),/usr) diff --git a/trick_source/sim_services/Integrator/trick_algorithms/Makefile b/trick_source/sim_services/Integrator/trick_algorithms/Makefile index c2bba323..7783604f 100644 --- a/trick_source/sim_services/Integrator/trick_algorithms/Makefile +++ b/trick_source/sim_services/Integrator/trick_algorithms/Makefile @@ -1,4 +1,4 @@ -include ${TRICK_HOME}/makefiles/Makefile.common -include ${TRICK_HOME}/makefiles/Makefile.tricklib +include ${TRICK_HOME}/share/trick/makefiles/Makefile.common +include ${TRICK_HOME}/share/trick/makefiles/Makefile.tricklib -include Makefile_deps