Trick should not modify TRICK_CFLAGS and TRICK_CXXFLAGS

Created TRICK_SYSTEM_CFLAGS, TRICK_SYSTEM_CXXFLAGS, and TRICK_SYSTEM_SFLAGS
that Trick uses to add the Trick system includes, defines and other
compilation flags.  TRICK_CFLAGS and TRICK_CXXFLAGS are now in
full control of the user.

refs #90
This commit is contained in:
Alex Lin
2015-07-22 14:20:36 -05:00
parent d744eba557
commit 90c85c73fc
8 changed files with 49 additions and 43 deletions

View File

@ -417,18 +417,18 @@ void PrintAttributes::printIOMakefile() {
std::cout << "Creating/updating io_src Makefile" << std::endl ;
makefile_io_src.open("build/Makefile_io_src") ;
makefile_io_src << "TRICK_IO_CXXFLAGS := \\" << std::endl ;
makefile_io_src << "TRICK_SYSTEM_CXXFLAGS += \\" << std::endl ;
makefile_io_src << " -Wno-invalid-offsetof \\" << std::endl ;
makefile_io_src << " -Wno-old-style-cast \\" << std::endl ;
makefile_io_src << " -Wno-write-strings \\" << std::endl ;
makefile_io_src << " -Wno-unused-variable" << std::endl ;
makefile_io_src << std::endl ;
makefile_io_src << "ifeq ($(IS_CC_CLANG), 0)" << std::endl ;
makefile_io_src << " TRICK_IO_CXXFLAGS += -Wno-unused-local-typedefs" << std::endl ;
makefile_io_src << " TRICK_SYSTEM_CXXFLAGS += -Wno-unused-local-typedefs" << std::endl ;
makefile_io_src << " GCCVERSIONGTEQ48 := $(shell perl -e 'printf \"\%d\\n\", " <<
"($(GCC_MAJOR)>4)||(($(GCC_MAJOR)==4)&&($(GCC_MINOR)>=8)) ;' )" << std::endl ;
makefile_io_src << " ifeq ($(GCCVERSIONGTEQ48), 1)" << std::endl ;
makefile_io_src << " TRICK_IO_CXXFLAGS += -Wno-unused-but-set-variable" << std::endl ;
makefile_io_src << " TRICK_SYSTEM_CXXFLAGS += -Wno-unused-but-set-variable" << std::endl ;
makefile_io_src << " endif" << std::endl ;
makefile_io_src << "endif" << std::endl ;
makefile_io_src << std::endl ;
@ -457,7 +457,7 @@ void PrintAttributes::printIOMakefile() {
makefile_io_src << "$(IO_OBJ_FILES) : \%.o : \%.cpp" << std::endl ;
makefile_io_src << "\t$(PRINT_IO_COMPILE)" << std::endl ;
makefile_io_src << "\t$(ECHO_CMD)$(TRICK_CPPC) $(TRICK_CXXFLAGS) $(TRICK_IO_CXXFLAGS) -MMD -MP -c $< -o $@" << std::endl ;
makefile_io_src << "\t$(ECHO_CMD)$(TRICK_CPPC) $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS) -MMD -MP -c $< -o $@" << std::endl ;
makefile_io_src << std::endl ;
makefile_io_src << "-include $(IO_OBJ_FILES:.o=.d)" << std::endl ;
makefile_io_src << std::endl ;