Standardize directory names

Reorganized.  Created a new top level include directory that will hold all of Trick's header files. Moved all of the Trick headers to this directory.  Created a libexec directory that holds all of the executables that users don't need to execute directly.  Changed all of the executables remaining in bin to start with "trick-".  In the sim_services directories changed all source files to find the Trick headers in their new location.  Since all of the include files are gone in sim_services, removed the src directories as well, moving all of the source files up a level.  Moved the makefiles, docs, man, and other architecture independent files into a top level share directory.  Renamed lib_${TRICK_HOST_CPU} to lib64 or lib depending on the platform we're currently on.

refs #63
This commit is contained in:
Alex Lin
2015-06-01 10:28:29 -05:00
parent f6fed320c4
commit 19025d77ad
1014 changed files with 7205 additions and 7870 deletions

View File

@ -12,8 +12,7 @@
#include "Utilities.hh"
// Provides units check capability.
// Found in "${TRICK_HOME}/trick_source/trick_utils/units/include"
#include "units_conv.h"
#include "trick/units_conv.h"
FieldDescription::FieldDescription(
std::string in_container_class ,

View File

@ -50,7 +50,7 @@ void HeaderSearchDirs::AddCompilerBuiltInSearchDirs () {
#endif
#endif
fp = popen("${TRICK_HOME}/bin/gte TRICK_CPPC" , "r") ;
fp = popen("${TRICK_HOME}/bin/trick-gte TRICK_CPPC" , "r") ;
fgets(line , sizeof(line) , fp) ;
pclose(fp) ;
std::string trick_cppc = std::string(line) ;
@ -118,7 +118,7 @@ void HeaderSearchDirs::AddTrickSearchDirs () {
char * trick_home = getenv("TRICK_HOME") ;
if ( trick_home != NULL ) {
std::string temp_dir = std::string(trick_home) + "/trick_source" ;
std::string temp_dir = std::string(trick_home) + "/include/trick" ;
char * resolved_path = almostRealPath(temp_dir.c_str() ) ;
#if (__clang_major__ == 3) && (__clang_minor__ >= 3)
hso.AddPath(resolved_path , clang::frontend::Quoted, false, true);

View File

@ -189,7 +189,7 @@ std::string PrintAttributes::createIOFileName(std::string header_file_name) {
if ( hsd.isPathInUserDir( dir_name ) ) {
if ( dir_name.length() >= 8 and ! dir_name.compare(dir_name.size() - 8 , dir_name.size() , "/include" )) {
if ( dir_name.length() < 20 or dir_name.compare(dir_name.size() - 20 , dir_name.size() , "sim_services/include" )) {
if ( dir_name.length() < 13 or dir_name.compare(dir_name.size() - 13 , dir_name.size() , "trick/include" )) {
dir_name.replace(dir_name.size() - 8 , dir_name.size() , "") ;
}
}

View File

@ -6,6 +6,7 @@
#include "FieldDescription.hh"
#include "ClassValues.hh"
#include "EnumValues.hh"
#include "Utilities.hh"
PrintFileContents10::PrintFileContents10() {}
@ -14,6 +15,8 @@ void PrintFileContents10::printIOHeader(std::ofstream & outfile , std::string he
if ( ! header_file_name.compare("S_source.hh") ) {
header_file_name = "../S_source.hh" ;
} else {
header_file_name = almostRealPath(header_file_name.c_str()) ;
}
outfile << "\n"
"/*\n"
@ -38,10 +41,10 @@ void PrintFileContents10::printIOHeader(std::ofstream & outfile , std::string he
" keywords are immune to this attack. Yes, it's evil! */\n"
"//#define private public\n"
"//#define protected public\n\n"
"#include \"sim_services/MemoryManager/include/MemoryManager.hh\"\n"
"#include \"sim_services/MemoryManager/include/attributes.h\"\n"
"#include \"sim_services/MemoryManager/include/parameter_types.h\"\n"
"#include \"sim_services/Units/include/UnitsMap.hh\"\n\n"
"#include \"trick/MemoryManager.hh\"\n"
"#include \"trick/attributes.h\"\n"
"#include \"trick/parameter_types.h\"\n"
"#include \"trick/UnitsMap.hh\"\n\n"
"#include \""
<< header_file_name <<
"\"\n\n" ;
@ -448,8 +451,8 @@ void PrintFileContents10::printClassMapHeader( std::ofstream & outfile , std::st
" */\n\n"
"#include <map>\n"
"#include <string>\n\n"
"#include \"sim_services/Sie/include/AttributesMap.hh\"\n"
"#include \"sim_services/MemoryManager/include/attributes.h\"\n\n"
"#include \"trick/AttributesMap.hh\"\n"
"#include \"trick/attributes.h\"\n\n"
"void " << function_name << "() {\n\n"
" Trick::AttributesMap * class_attribute_map = Trick::AttributesMap::attributes_map();\n\n" ;
}
@ -482,8 +485,8 @@ void PrintFileContents10::printEnumMapHeader( std::ofstream & outfile , std::str
" */\n\n"
"#include <map>\n"
"#include <string>\n\n"
"#include \"sim_services/Sie/include/EnumAttributesMap.hh\"\n"
"#include \"sim_services/MemoryManager/include/attributes.h\"\n\n"
"#include \"trick/EnumAttributesMap.hh\"\n"
"#include \"trick/attributes.h\"\n\n"
"void " << function_name << "() {\n"
" Trick::EnumAttributesMap * enum_attribute_map __attribute__((unused)) = Trick::EnumAttributesMap::attributes_map();\n\n" ;
}

View File

@ -24,7 +24,7 @@
#include "PrintAttributesFactory.hh"
#include "Utilities.hh"
#include "units_conv.h"
#include "trick/units_conv.h"
/* Command line arguments. These work better as globals, as suggested in llvm/CommandLine documentation */
llvm::cl::list< std::string > include_dirs("I", llvm::cl::Prefix, llvm::cl::desc("Include directory"),

View File

@ -1,6 +1,6 @@
# The config_${HOST_TYPE}.mk file provides LLVM_HOME
include ${TRICK_HOME}/makefiles/Makefile.common
include ${TRICK_HOME}/share/trick/makefiles/Makefile.common
RTTIFLAG := -fno-rtti
LLVM_VERSION := $(shell $(LLVM_HOME)/bin/$(LLVM_CONFIG) --version)
@ -21,14 +21,14 @@ ifeq ($(IS_CC_CLANG), 0)
CXXFLAGS += -DGCC_MAJOR=$(GCC_MAJOR) -DGCC_MINOR=$(GCC_MINOR)
endif
ICG := ICG_$(shell uname -s)_$(shell uname -m)
ICG := ${TRICK_HOME}/bin/trick-ICG
SOURCES = $(wildcard *.cpp)
OBJECTS = $(addprefix $(OBJ_DIR)/, $(subst .cpp,.o,$(SOURCES)))
# Include the units conversion source from trick_utils.
UNITS_CONV_SRC = ${TRICK_HOME}/trick_source/trick_utils/units/src/units_conv.c
UNITS_CONV_INCLUDE = -I${TRICK_HOME}/trick_source/trick_utils/units/include
UNITS_CONV_INCLUDE = -I${TRICK_HOME}/include
UNITS_CONV_OBJ = $(OBJ_DIR)/units_conv.o
ifeq ($(CLANG_MINOR_GTEQ5),1)