mirror of
https://github.com/nasa/trick.git
synced 2024-12-24 07:16:41 +00:00
#603 restored 'make print-%' in sim directory
This commit is contained in:
parent
be6f9dc855
commit
d764a67709
@ -100,6 +100,7 @@ ICG:
|
||||
$(PRINT_ICG)
|
||||
$(ECHO_CMD)${TRICK_HOME}/bin/trick-ICG -m ${TRICK_ICGFLAGS} ${TRICK_CXXFLAGS} ${TRICK_SYSTEM_CXXFLAGS} S_source.hh
|
||||
|
||||
|
||||
force_ICG:
|
||||
$(PRINT_ICG)
|
||||
$(ECHO_CMD)${TRICK_HOME}/bin/trick-ICG -f -m ${TRICK_ICGFLAGS} ${TRICK_CXXFLAGS} ${TRICK_SYSTEM_CXXFLAGS} S_source.hh
|
||||
@ -135,6 +136,11 @@ convert_swig: build/S_library_swig
|
||||
S_define_exp:
|
||||
$(TRICK_CC) -E -C -xc++ ${TRICK_SFLAGS} $(TRICK_SYSTEM_SFLAGS) S_define > $@
|
||||
|
||||
# prints the value of a makefile variable, example invocation "make print-TRICK_CXXFLAGS"
|
||||
# This rule is used by trick-config
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
|
||||
help:
|
||||
@echo -e "\
|
||||
Simulation make options:\n\
|
||||
@ -142,7 +148,8 @@ Simulation make options:\n\
|
||||
make sie - Builds the S_sie.resource file.\n\
|
||||
make clean - Removes all object files in simulation directory\n\
|
||||
make spotless - Performs a clean\n\
|
||||
make apocalypse - Performs a clean"
|
||||
make apocalypse - Performs a clean\n\
|
||||
make print-<variable> - Prints a makefile or environment variable"
|
||||
|
||||
CLEAN_TARGETS = tidy clean spotless distclean apocalypse
|
||||
ifeq ($(findstring ${MAKECMDGOALS},$(CLEAN_TARGETS)),)
|
||||
|
@ -1,126 +0,0 @@
|
||||
include ${TRICK_HOME}/share/trick/makefiles/Makefile.common
|
||||
|
||||
ifndef TRICK_VERBOSE_BUILD
|
||||
PRINT_CP = $(info $(call COLOR,Running) configuration_processor)
|
||||
PRINT_ICG = $(info $(call COLOR,Running) ICG)
|
||||
PRINT_S_DEF_DEPS = $(info $(call COLOR,Tracing) S_define)
|
||||
PRINT_CONVERT_SWIG = $(info $(call COLOR,Running) convert_swig)
|
||||
PRINT_MAKEFILE_SRC = $(info $(call COLOR,Writing) Makefile_src)
|
||||
PRINT_MAKEFILE_SWIG = $(info $(call COLOR,Writing) Makefile_swig)
|
||||
endif
|
||||
|
||||
.NOTPARALLEL:
|
||||
|
||||
export TRICK_ICG_EXCLUDE
|
||||
|
||||
# Use /bin/bash as the shell so we can use PIPESTATUS
|
||||
SHELL = /bin/bash
|
||||
|
||||
all test: $(TRICK_STATIC_LIB) S_source.hh \
|
||||
build/Makefile_io_src \
|
||||
build/Makefile_src \
|
||||
build/Makefile_swig \
|
||||
build/convert_swig_last_run
|
||||
@$(MAKE) --no-print-directory -f build/Makefile_src $@ 2>&1 | tee build/MAKE_out ; exit $${PIPESTATUS[0]}
|
||||
|
||||
build:
|
||||
@mkdir $@
|
||||
|
||||
debug: all
|
||||
debug: TRICK_CPFLAGS += --debug
|
||||
|
||||
$(TRICK_STATIC_LIB):
|
||||
$(info Cannot find $@. Please build Trick for this platform.)
|
||||
@exit -1
|
||||
|
||||
# CP creates S_source.hh required for ICG and SWIG processing
|
||||
S_source.hh build/S_define.lib_deps: S_define | build
|
||||
$(PRINT_CP)
|
||||
$(ECHO_CMD)${TRICK_HOME}/$(LIBEXEC)/trick/configuration_processor $(TRICK_CPFLAGS)
|
||||
$(PRINT_S_DEF_DEPS)
|
||||
$(ECHO_CMD)$(TRICK_CPPC) $(TRICK_SFLAGS) $(TRICK_SYSTEM_SFLAGS) -M -MT S_source.hh -MF build/S_define.deps -x c++ S_define
|
||||
|
||||
# Automatic and manual ICG rules
|
||||
build/Makefile_io_src: | S_source.hh build
|
||||
$(PRINT_ICG)
|
||||
$(ECHO_CMD)${TRICK_HOME}/bin/trick-ICG -m ${TRICK_ICGFLAGS} ${TRICK_CXXFLAGS} ${TRICK_SYSTEM_CXXFLAGS} S_source.hh
|
||||
|
||||
ICG:
|
||||
$(PRINT_ICG)
|
||||
$(ECHO_CMD)${TRICK_HOME}/bin/trick-ICG -m ${TRICK_ICGFLAGS} ${TRICK_CXXFLAGS} ${TRICK_SYSTEM_CXXFLAGS} S_source.hh
|
||||
|
||||
force_ICG:
|
||||
$(PRINT_ICG)
|
||||
$(ECHO_CMD)${TRICK_HOME}/bin/trick-ICG -f -m ${TRICK_ICGFLAGS} ${TRICK_CXXFLAGS} ${TRICK_SYSTEM_CXXFLAGS} S_source.hh
|
||||
|
||||
# Create makefile for source code
|
||||
build/Makefile_src: | build/Makefile_io_src build/S_define.lib_deps
|
||||
$(PRINT_MAKEFILE_SRC)
|
||||
$(ECHO_CMD)${TRICK_HOME}/$(LIBEXEC)/trick/make_makefile_src $?
|
||||
|
||||
# Create makefile for SWIG code
|
||||
build/Makefile_swig: | build/Makefile_io_src
|
||||
$(PRINT_MAKEFILE_SWIG)
|
||||
$(ECHO_CMD)${TRICK_HOME}/$(LIBEXEC)/trick/make_makefile_swig $?
|
||||
|
||||
# Automatic and manual convert_swig rules
|
||||
build/convert_swig_last_run: | build/Makefile_swig
|
||||
$(PRINT_CONVERT_SWIG)
|
||||
$(ECHO_CMD)${TRICK_HOME}/$(LIBEXEC)/trick/convert_swig ${TRICK_CONVERT_SWIG_FLAGS}
|
||||
@touch $@
|
||||
|
||||
convert_swig:
|
||||
$(PRINT_CONVERT_SWIG)
|
||||
$(ECHO_CMD)${TRICK_HOME}/$(LIBEXEC)/trick/convert_swig ${TRICK_CONVERT_SWIG_FLAGS}
|
||||
@touch build/convert_swig_last_run
|
||||
|
||||
# prints the value of a makefile variable, example invocation "make print-TRICK_CXXFLAGS"
|
||||
# This rule is used by trick-config
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
|
||||
# Force S_define_exp to be remade each time this rule runs
|
||||
.PHONY: S_define_exp
|
||||
|
||||
S_define_exp:
|
||||
$(TRICK_CC) -E -C -xc++ ${TRICK_SFLAGS} $(TRICK_SYSTEM_SFLAGS) S_define > $@
|
||||
|
||||
# Pass these options
|
||||
sie:
|
||||
@if [ -f build/Makefile_src ] ; then $(MAKE) --no-print-directory -f build/Makefile_src $@ ; else echo "No build/Makefile_src found" ; fi
|
||||
|
||||
help:
|
||||
@echo -e "\
|
||||
Simulation make options:\n\
|
||||
make [debug] [TRICK_VERBOSE_BUILD=1] - Makes everything: S_main and S_sie.resource\n\
|
||||
make sie - Builds the S_sie.resource file.\n\
|
||||
make clean - Removes all object files in simulation directory\n\
|
||||
make spotless - Performs a clean\n\
|
||||
make apocalypse - Performs a clean"
|
||||
|
||||
tidy:
|
||||
-rm -f S_source.hh S_sie.resource
|
||||
-rm -f S_main* T_main*
|
||||
-rm -f build/Makefile_*
|
||||
-rm -f S_default.dat
|
||||
|
||||
clean: tidy
|
||||
-rm -f DP_Product/DP_rt_frame DP_Product/DP_rt_itimer
|
||||
-rm -f DP_Product/DP_rt_jobs DP_Product/DP_rt_timeline DP_Product/DP_mem_stats
|
||||
-rm -rf build trick
|
||||
|
||||
spotless: clean
|
||||
|
||||
distclean: clean
|
||||
-rm -f makefile
|
||||
|
||||
apocalypse: distclean
|
||||
@echo "[31mI love the smell of napalm in the morning[0m"
|
||||
|
||||
CLEAN_RULES_DEFINED = 1
|
||||
|
||||
# Dependencies for the above rules generated by configuration_process, ICG, make_makefile and make_makefile_swig
|
||||
-include build/S_define.deps
|
||||
-include build/Makefile_ICG
|
||||
-include build/Makefile_convert_swig
|
||||
-include build/Makefile_src_deps
|
Loading…
Reference in New Issue
Block a user