mirror of
https://github.com/nasa/trick.git
synced 2025-01-29 15:43:57 +00:00
Merge pull request #640 from nasa/swig-flags
#618 add TRICK_SWIG_FLAGS, TRICK_SYSTEM_SWIG_FLAGS, TRICK_SWIG_CFLAGS, TRICK_SYSTEM_SWIG_CFLAGS...
This commit is contained in:
commit
d42f75c507
@ -169,12 +169,12 @@ sub write_makefile_swig() {
|
||||
print PY_LINK_LIST "build/init_swig_modules.o\n" ;
|
||||
print PY_LINK_LIST "build/top.o\n" ;
|
||||
|
||||
print MAKEFILE "SWIG_CFLAGS := -I../include \${PYTHON_INCLUDES} -Wno-shadow -Wno-missing-field-initializers
|
||||
print MAKEFILE "TRICK_SYSTEM_SWIG_CFLAGS := -I../include \${PYTHON_INCLUDES} -Wno-shadow -Wno-missing-field-initializers
|
||||
|
||||
ifeq (\$(IS_CC_CLANG), 1)
|
||||
SWIG_CFLAGS += -Wno-self-assign -Wno-sometimes-uninitialized -Wno-deprecated-register
|
||||
TRICK_SYSTEM_SWIG_CFLAGS += -Wno-self-assign -Wno-sometimes-uninitialized -Wno-deprecated-register
|
||||
else
|
||||
SWIG_CFLAGS += -Wno-unused-but-set-variable
|
||||
TRICK_SYSTEM_SWIG_CFLAGS += -Wno-unused-but-set-variable
|
||||
endif
|
||||
|
||||
ifndef TRICK_VERBOSE_BUILD
|
||||
@ -231,8 +231,8 @@ SWIG_SRC = \$(subst .i,.cpp,\$(SWIG_I)) $swig_src_dir/top.cpp
|
||||
|
||||
\$(SWIG_SRC) : %.cpp: %.i | \$(SWIG_I)
|
||||
\t\$(PRINT_SWIG)
|
||||
\t\@echo \$(SWIG) \$(TRICK_INCLUDE) \$(TRICK_DEFINES) \$(TRICK_VERSIONS) \$(SWIG_FLAGS) -c++ -python -includeall -ignoremissing -w201,303,325,362,389,401,451 -outdir trick -o \$@ \$< >> \$(MAKE_OUT)
|
||||
\t\$(ECHO_CMD)\$(SWIG) \$(TRICK_INCLUDE) \$(TRICK_DEFINES) \$(TRICK_VERSIONS) \$(SWIG_FLAGS) -c++ -python -includeall -ignoremissing -w201,303,325,362,389,401,451 -outdir trick -o \$@ \$< 2>&1 | \$(TEE) -a \$(MAKE_OUT) ; exit \$\${PIPESTATUS[0]}
|
||||
\t\@echo \$(SWIG) \$(TRICK_INCLUDE) \$(TRICK_DEFINES) \$(TRICK_VERSIONS) \$(TRICK_SWIG_FLAGS) -c++ -python -includeall -ignoremissing -w201,303,325,362,389,401,451 -outdir trick -o \$@ \$< >> \$(MAKE_OUT)
|
||||
\t\$(ECHO_CMD)\$(SWIG) \$(TRICK_INCLUDE) \$(TRICK_DEFINES) \$(TRICK_VERSIONS) \$(TRICK_SWIG_FLAGS) -c++ -python -includeall -ignoremissing -w201,303,325,362,389,401,451 -outdir trick -o \$@ \$< 2>&1 | \$(TEE) -a \$(MAKE_OUT) ; exit \$\${PIPESTATUS[0]}
|
||||
|
||||
# SWIG_OBJECTS =================================================================
|
||||
|
||||
@ -240,8 +240,8 @@ SWIG_OBJECTS = \$(subst .cpp,.o,\$(SWIG_SRC)) $swig_src_dir/init_swig_modules.o
|
||||
|
||||
\$(SWIG_OBJECTS): %.o: %.cpp
|
||||
\t\$(PRINT_COMPILE_SWIG)
|
||||
\t\@echo \$(TRICK_CPPC) \$(TRICK_CXXFLAGS) \$(TRICK_SYSTEM_CXXFLAGS) \$(SWIG_CFLAGS) -Wno-unused-parameter -c -o \$@ \$< >> \$(MAKE_OUT)
|
||||
\t\$(ECHO_CMD)\$(TRICK_CPPC) \$(TRICK_CXXFLAGS) \$(TRICK_SYSTEM_CXXFLAGS) \$(SWIG_CFLAGS) -Wno-unused-parameter -c -o \$@ \$< 2>&1 | \$(TEE) -a \$(MAKE_OUT) ; exit \$\${PIPESTATUS[0]}
|
||||
\t\@echo \$(TRICK_CPPC) \$(TRICK_CXXFLAGS) \$(TRICK_SYSTEM_CXXFLAGS) \$(TRICK_SWIG_CFLAGS) \$(TRICK_SYSTEM_SWIG_CFLAGS) \$-Wno-unused-parameter -c -o \$@ \$< >> \$(MAKE_OUT)
|
||||
\t\$(ECHO_CMD)\$(TRICK_CPPC) \$(TRICK_CXXFLAGS) \$(TRICK_SYSTEM_CXXFLAGS) \$(TRICK_SWIG_CFLAGS) \$(TRICK_SYSTEM_SWIG_CFLAGS) -Wno-unused-parameter -c -o \$@ \$< 2>&1 | \$(TEE) -a \$(MAKE_OUT) ; exit \$\${PIPESTATUS[0]}
|
||||
|
||||
\$(S_MAIN): \$(SWIG_OBJECTS)
|
||||
|
||||
|
@ -50,7 +50,8 @@ export TRICK_HOST_CPU := $(shell $(TRICK_HOME)/bin/trick-gte TRICK_HOST_CPU)
|
||||
export TRICK_EXEC_LINK_LIBS := ${PTHREAD_LIBS} $(PYTHON_LIB) $(UDUNITS_LDFLAGS) $(PLATFORM_LIBS) -lm -ldl
|
||||
export TRICK_LIBS := ${RPATH} -L${TRICK_LIB_DIR} -ltrick -ltrick_pyip -ltrick_comm -ltrick_math -ltrick_units -ltrick_mm
|
||||
export TRICK_SYSTEM_LDFLAGS := $(TRICK_SYSTEM_LDFLAGS)
|
||||
export SWIG_FLAGS := $(SWIG_FLAGS)
|
||||
export TRICK_SWIG_FLAGS := $(TRICK_SWIG_FLAGS)
|
||||
export TRICK_SWIG_CFLAGS := $(TRICK_SWIG_CFLAGS)
|
||||
|
||||
IO_SRC_DIR := io_src/
|
||||
OBJ_DIR := object_${TRICK_HOST_CPU}
|
||||
|
@ -128,7 +128,7 @@ $(SWIG_OBJECTS): %.o: %.cpp
|
||||
|
||||
$(SWIG_OBJECTS:.o=.cpp): %.cpp: %.i | $(TRICKIFY_PYTHON_DIR) $(SWIG_OBJECTS:.o=.i)
|
||||
$(info $(call COLOR,SWIGing) $<)
|
||||
@$(SWIG) $(TRICK_INCLUDE) $(TRICK_DEFINES) $(TRICK_VERSIONS) $(SWIG_FLAGS) -c++ -python -includeall -ignoremissing -w201,303,325,362,389,401,451 -outdir $(TRICKIFY_PYTHON_DIR) -o $@ $<
|
||||
@$(SWIG) $(TRICK_INCLUDE) $(TRICK_DEFINES) $(TRICK_VERSIONS) $(TRICK_SWIG_FLAGS) -c++ -python -includeall -ignoremissing -w201,303,325,362,389,401,451 -outdir $(TRICKIFY_PYTHON_DIR) -o $@ $<
|
||||
|
||||
define create_convert_swig_rule
|
||||
build/%_py.i: /%.$1
|
||||
|
Loading…
x
Reference in New Issue
Block a user