Trick should not modify TRICK_CFLAGS and TRICK_CXXFLAGS

Well sims compiled, but I forgot to test if Trick itself
would compile.  It didn't.  Added TRICK_SYSTEM_CFLAGS and
TRICK_SYSTEM_CXXFLAGS where needed.

refs #90
This commit is contained in:
Alex Lin 2015-07-22 15:34:54 -05:00
parent 90c85c73fc
commit b3d1a1d162
4 changed files with 17 additions and 17 deletions

View File

@ -210,7 +210,7 @@ endif
# header files.
.PHONY: icg_sim_serv
icg_sim_serv: $(ICG_EXE)
${TRICK_HOME}/bin/trick-ICG -s -m ${TRICK_CXXFLAGS} ${TRICK_HOME}/include/trick/files_to_ICG.hh
${TRICK_HOME}/bin/trick-ICG -s -m ${TRICK_CXXFLAGS} ${TRICK_SYSTEM_CXXFLAGS} ${TRICK_HOME}/include/trick/files_to_ICG.hh
# 1.1.1.4.1 Build the Interface Code Generator (ICG) executable.
$(ICG_EXE) :
@ -398,7 +398,7 @@ uninstall:
# 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/trick-ICG -f -s -m ${TRICK_CXXFLAGS} ${TRICK_HOME}/include/trick/files_to_ICG.hh
${TRICK_HOME}/bin/trick-ICG -f -s -m ${TRICK_CXXFLAGS} ${TRICK_SYSTEM_CXXFLAGS} ${TRICK_HOME}/include/trick/files_to_ICG.hh
# This builds a tricklib share library.
ifeq ($(USE_ER7_UTILS_INTEGRATORS), 1)

View File

@ -94,7 +94,7 @@ $(TRICK_LIB_DIR):
#
$(IO_C_OBJS): $(OBJ_DIR)/%.o : $(IO_SRC_DIR)%.c | $(OBJ_DIR)
$(TRICK_CC) $(TRICK_CFLAGS) -c $< -o $@
$(TRICK_CC) $(TRICK_CFLAGS) $(TRICK_SYSTEM_CFLAGS) -c $< -o $@
$(IO_CPP_OBJS): TRICK_CXXFLAGS += -Wno-invalid-offsetof
ifeq ($(IS_CC_CLANG), 0)
@ -107,7 +107,7 @@ endif
$(IO_CPP_OBJS): $(OBJ_DIR)/%.o : $(IO_SRC_DIR)%.cpp | $(OBJ_DIR)
$(TRICK_CPPC) $(TRICK_CXXFLAGS) -c $< -o $@
$(TRICK_CPPC) $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS) -c $< -o $@
#
#
@ -115,26 +115,26 @@ $(IO_CPP_OBJS): $(OBJ_DIR)/%.o : $(IO_SRC_DIR)%.cpp | $(OBJ_DIR)
#
$(C_OBJS): $(OBJ_DIR)/%.o : $(SRC_DIR)%.c | $(OBJ_DIR)
$(CD_CMD) $(TRICK_CC) $(TRICK_CFLAGS) -c ${<F} -o $(UP_DIR)$@
$(CD_CMD) $(TRICK_CC) $(TRICK_CFLAGS) $(TRICK_SYSTEM_CFLAGS) -c ${<F} -o $(UP_DIR)$@
#
# CPP_OBJS
#
$(CPP_C_OBJS): $(OBJ_DIR)/%.o : $(SRC_DIR)%.C | $(OBJ_DIR)
$(CD_CMD) $(TRICK_CPPC) $(TRICK_CFLAGS) -c ${<F} -o $(UP_DIR)$@
$(CD_CMD) $(TRICK_CPPC) $(TRICK_CFLAGS) $(TRICK_SYSTEM_CFLAGS) -c ${<F} -o $(UP_DIR)$@
$(CPP_CC_OBJS): $(OBJ_DIR)/%.o : $(SRC_DIR)%.cc | $(OBJ_DIR)
$(CD_CMD) $(TRICK_CPPC) $(TRICK_CXXFLAGS) -c ${<F} -o $(UP_DIR)$@
$(CD_CMD) $(TRICK_CPPC) $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS) -c ${<F} -o $(UP_DIR)$@
$(CPP_CPP_OBJS): $(OBJ_DIR)/%.o : $(SRC_DIR)%.cpp | $(OBJ_DIR)
$(CD_CMD) $(TRICK_CPPC) $(TRICK_CXXFLAGS) -c ${<F} -o $(UP_DIR)$@
$(CD_CMD) $(TRICK_CPPC) $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS) -c ${<F} -o $(UP_DIR)$@
$(CPP_CXX_OBJS): $(OBJ_DIR)/%.o : $(SRC_DIR)%.cxx | $(OBJ_DIR)
$(CD_CMD) $(TRICK_CPPC) $(TRICK_CXXFLAGS) -c ${<F} -o $(UP_DIR)$@
$(CD_CMD) $(TRICK_CPPC) $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS) -c ${<F} -o $(UP_DIR)$@
$(CPP_CPLUS_OBJS): $(OBJ_DIR)/%.o : $(SRC_DIR)%.c++ | $(OBJ_DIR)
$(CD_CMD) $(TRICK_CPPC) $(TRICK_CXXFLAGS) -c ${<F} -o $(UP_DIR)$@
$(CD_CMD) $(TRICK_CPPC) $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS) -c ${<F} -o $(UP_DIR)$@
#
# LEX/YACC SOURCE
@ -155,10 +155,10 @@ $(Y_C_PREMADE) : $(SRC_DIR)%.tab.c_premade : $(SRC_DIR)%.y
$(YACC) -d -o $@ $<
$(L_OBJS) : $(OBJ_DIR)/%.lex.o : $(SRC_DIR)%.lex.c $(SRC_DIR)%.tab.h | $(OBJ_DIR)
$(CD_CMD) $(TRICK_CPPC) $(TRICK_CXXFLAGS) -c ${<F} -o $(UP_DIR)$@
$(CD_CMD) $(TRICK_CPPC) $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS) -c ${<F} -o $(UP_DIR)$@
$(Y_OBJS) : $(OBJ_DIR)/%.tab.o : $(SRC_DIR)%.tab.c | $(OBJ_DIR)
$(CD_CMD) $(TRICK_CPPC) $(TRICK_CXXFLAGS) -c ${<F} -o $(UP_DIR)$@
$(CD_CMD) $(TRICK_CPPC) $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS) -c ${<F} -o $(UP_DIR)$@
#
@ -166,7 +166,7 @@ $(Y_OBJS) : $(OBJ_DIR)/%.tab.o : $(SRC_DIR)%.tab.c | $(OBJ_DIR)
#
depend:
@ $(TRICK_CPPC) -MM $(TRICK_CXXFLAGS) $(C_SRC) $(CPP_SRC) >> $(DEPTEMPFILE)
@ $(TRICK_CPPC) -MM $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS) $(C_SRC) $(CPP_SRC) >> $(DEPTEMPFILE)
@ $(PERL) ${TRICK_HOME}/$(LIBEXEC)/trick/depend_cp $(DEPTEMPFILE) > $(DEPFILE)
@ $(RM) $(DEPTEMPFILE)
@ echo "Created dependency file $(DEPFILE)"

View File

@ -4,10 +4,10 @@ TRICK_CXXFLAGS += -I${TRICK_HOME}/trick_models
S_main: tc_server tc_client
tc_server: tc_server.c
${TRICK_CC} ${TRICK_CFLAGS} -I${TRICK_HOME}/trick_source -o $@ $< -L${TRICK_LIB_DIR} -ltrick_comm ${TRICK_EXEC_LINK_LIBS}
${TRICK_CC} ${TRICK_CFLAGS} ${TRICK_SYSTEM_CFLAGS} -I${TRICK_HOME}/trick_source -o $@ $< -L${TRICK_LIB_DIR} -ltrick_comm ${TRICK_EXEC_LINK_LIBS}
tc_client: tc_client.c
${TRICK_CC} ${TRICK_CFLAGS} -I${TRICK_HOME}/trick_source -o $@ $< -L${TRICK_LIB_DIR} -ltrick_comm ${TRICK_EXEC_LINK_LIBS}
${TRICK_CC} ${TRICK_CFLAGS} ${TRICK_SYSTEM_CFLAGS} -I${TRICK_HOME}/trick_source -o $@ $< -L${TRICK_LIB_DIR} -ltrick_comm ${TRICK_EXEC_LINK_LIBS}
clean: clean_tc_apps
spotless: clean_tc_apps

View File

@ -62,10 +62,10 @@ swig_${TRICK_HOST_CPU}:
mkdir $@
$(SWIG_OBJECT_FILES): $(OBJ_DIR)/%.o : swig_${TRICK_HOST_CPU}/%.cpp
$(TRICK_CPPC) $(TRICK_CXXFLAGS) -c $< -o $@
$(TRICK_CPPC) $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS) -c $< -o $@
$(OBJECT_FILES): $(OBJ_DIR)/%.o : %.cpp
$(TRICK_CPPC) $(TRICK_CXXFLAGS) -c $< -o $@
$(TRICK_CPPC) $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS) -c $< -o $@
$(SWIG_SRC_FILES): swig_${TRICK_HOST_CPU}/%_wrap.cpp : %.i
$(SWIG) $(SWIG_DEFS) -I${TRICK_HOME}/trick_source -I${TRICK_HOME}/include -I${TRICK_HOME} -c++ -python -includeall -ignoremissing -w201,362,389,451 -o $@ -outdir ${TRICK_HOME}/share/trick/swig $<