2015-02-26 15:02:31 +00:00
|
|
|
|
|
|
|
|
|
# Makefile to build Trick
|
|
|
|
|
|
|
|
|
|
# Make Targets
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
# default - Compile Trick-core and Trick Data-products Libraries and Applications.
|
|
|
|
|
# 'no_dp' - Compile Trick-core only.
|
|
|
|
|
# 'dp' - Compile Data-products only.
|
|
|
|
|
# 'java' - Compile Java GUI Applications
|
|
|
|
|
# 'javadoc' - Generate Java Documentation.
|
|
|
|
|
# 'doxygen' - Generate HTML User's Guide.
|
|
|
|
|
# 'test' - Run Unit-tests and Simulation Tests.
|
|
|
|
|
|
|
|
|
|
export TRICK_HOME = $(CURDIR)
|
|
|
|
|
|
|
|
|
|
# Include the build configuration information.
|
2015-06-01 15:28:29 +00:00
|
|
|
|
include $(TRICK_HOME)/share/trick/makefiles/Makefile.common
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
# Specify the contents of: libtrick.a
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
TRICK_LIB = $(TRICK_LIB_DIR)/libtrick.a
|
|
|
|
|
SIM_SERV_DIRS = \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/ExternalApplications \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/Clock \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/CheckPointAgent \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/CheckPointRestart \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/Collect \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/CommandLineArguments \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/DataRecord \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/DebugPause \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/EchoJobs \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/Environment \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/EventManager \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/Executive \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/FrameLog \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/JITInputFile \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/JSONVariableServer \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/Integrator \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/UnitTest \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/MasterSlave \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/MemoryManager \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/Message \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/MonteCarlo \
|
Integrate MonteCarloGenerate capability from EG CML and associated TrickOps enhancements (#1415)
* Provide MonteCarloGenerate capability
Intermediate commit, this squash represents all of Isaac Reaves' work
during his Fall 2022 Pathways internship tour
[skip ci]
* TrickOps: Add phase, [min-max] range, and overhaul YAML verification
* Add new "phase:" mechanism to TrickOps Runs and Builds to support
project-specific constraints on build and run ordering
- phase defaults to zero if not specified and must be between -1000
and 1000 if given.
- jobs can now optionally be requested by their phase or phase range
- See trickops/README.md for details
* Add [min-max] notation capability to run: entries and compare: entries
- [min-max] ranges provide definition of a set of runs using a common
numbering scheme in the YAML file, greatly reducing YAML file size
for monte-carlo and other zero-padded run numbering use cases
- See trickops/README.md for details
* YAML parsing changes
- Overhaul the logic which verifies YAML files for the expected
TrickOps format. This is now done in TrickWorkflowYamlVerifier and
provides much more robust error checking than previous approach
- .yaml_requirements.yml now provides the required types, ranges, and
default values as applicable to expected entries in YAML files
- valgrind: is now an sub-option to run: entries, not its own section
Users should now list their runs normallly and define their flags in
in that run's valgrind: subsection
- parallel_safety is now a per-sim parameter and not global. Users
should move their global config to the sim layer
- self.config_errors is now a list of errors. Users should now
check for empty list when using instead of True/False
* Robustify the get_koviz_report_jobs unit test to work whether koviz
exists on PATH or not
* Adjust trickops.py to use the new phase and range features
- Make it more configurable on the command-line via argparse
- Move SIM_mc_generation tests into test_sims.yml
[skip ci]
* Code review and cleanup from PR #1389
Documentation:
* Adjust documentation to fit suggested symlinked approach. Also
cleaned up duplicate images and old documentation.
* Moved the verification section out of markdown and into a PDF since it
heavily leverages formatting not available in markdown.
* Clarify a couple points on the Darwin Trick install guide
* Update wiki to clarify that data recording strings is not supported
MCG Code:
* Replace MonteCarloVariableRandomNormal::is_near_equal with new
Trick::dbl_is_near from trick team
MCG Testing:
* Reduce the set of SIM_mc_generation comparisons. After discussion
the trick team, we are choosing to remove all comparisons to
verif_data/ which contain random-generated numbers since
these tests cannot pass across all supported trick platforms.
* Fix the wrong rule on exlcuding -Werror for Darwin builds
of SIM_mc_generation
* Remove data recording of strings in SIM_mc_generation
Trickops:
* Replace build_command with build_args per discussion w/ Trick team
Since we only support arguments to trick-CP, replace the build_command
yaml entry with build_args
* Disable var server connection by default in SingleRun if TrickWorkflow.quiet
is True
* Guard against multiple Job starts
* Remove SimulationJob inheritance layer since old monte-carlo wasn't
and never will be supported by TrickOps
* Ignore IOError raise from variable_server that looks like "The remote
endpoint has closed the connection". This appears to occur when
SingleRun jobs attempt to connect to the var server for a sim that
terminates very early
[skip ci]
* Adjust phasing of old/new MCG initialize functions
* Clarify failure message in generate_dispersions if new/old MC are both
used.
* Adjust the phasing order of MCG intialize method to be before
legacy MC initialized. Without this, monte-carlo dry run completes with
success before the check in generate_dispersions() can run
* Add -Wno-stringop-truncation to S_override.mk for SIM_mc_generation
since gcc 8+ warns about SWIG generated content in top.cpp
* Introduce MonteCarloGenerationHelper python class
This new class provides an easy-to-use interface for MCG sim-module
users:
1. Run generation
2. Getting an sbatch array job suitable for SLURM
3. Getting a list of SingleRun() instances for generated runs, to be
executed locally if desired
---------
Co-authored-by: Dan Jordan <daniel.d.jordan@nasa.gov>
2023-03-06 15:25:50 +00:00
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/MonteCarloGeneration \
|
2015-02-26 15:02:31 +00:00
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/RealtimeInjector \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/RealtimeSync \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/ScheduledJobQueue \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/Scheduler \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/Sie \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/SimObject \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/SimTime \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/ThreadBase \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/Timer \
|
2016-05-05 19:49:49 +00:00
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/UdUnits \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/UnitsMap \
|
2015-02-26 15:02:31 +00:00
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/VariableServer \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/Zeroconf \
|
2015-06-01 15:28:29 +00:00
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/include \
|
2015-06-02 15:25:40 +00:00
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/mains
|
2016-02-10 15:32:53 +00:00
|
|
|
|
ifeq ($(USE_ER7_UTILS), 0)
|
|
|
|
|
SIM_SERV_DIRS += ${TRICK_HOME}/trick_source/sim_services/Integrator/trick_algorithms
|
|
|
|
|
endif
|
2015-06-01 15:28:29 +00:00
|
|
|
|
|
2015-02-26 15:02:31 +00:00
|
|
|
|
SIM_SERV_OBJS = $(addsuffix /object_$(TRICK_HOST_CPU)/*.o ,$(SIM_SERV_DIRS))
|
2015-06-30 22:57:26 +00:00
|
|
|
|
SIM_SERV_OBJS := $(filter-out ${TRICK_HOME}/trick_source/sim_services/MemoryManager/%, $(SIM_SERV_OBJS))
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
|
|
|
|
ER7_UTILS_DIRS = \
|
|
|
|
|
${ER7_UTILS_HOME}/integration/abm4 \
|
|
|
|
|
${ER7_UTILS_HOME}/integration/beeman \
|
|
|
|
|
${ER7_UTILS_HOME}/integration/core \
|
|
|
|
|
${ER7_UTILS_HOME}/integration/euler \
|
|
|
|
|
${ER7_UTILS_HOME}/integration/mm4 \
|
|
|
|
|
${ER7_UTILS_HOME}/integration/nl2 \
|
|
|
|
|
${ER7_UTILS_HOME}/integration/position_verlet \
|
|
|
|
|
${ER7_UTILS_HOME}/integration/rk2_heun \
|
|
|
|
|
${ER7_UTILS_HOME}/integration/rk2_midpoint \
|
|
|
|
|
${ER7_UTILS_HOME}/integration/rk4 \
|
|
|
|
|
${ER7_UTILS_HOME}/integration/rkf45 \
|
|
|
|
|
${ER7_UTILS_HOME}/integration/rkf78 \
|
|
|
|
|
${ER7_UTILS_HOME}/integration/rkg4 \
|
2016-01-29 16:13:56 +00:00
|
|
|
|
${ER7_UTILS_HOME}/integration/rkn4 \
|
2015-02-26 15:02:31 +00:00
|
|
|
|
${ER7_UTILS_HOME}/integration/symplectic_euler \
|
|
|
|
|
${ER7_UTILS_HOME}/integration/velocity_verlet \
|
|
|
|
|
${ER7_UTILS_HOME}/interface \
|
|
|
|
|
${ER7_UTILS_HOME}/math \
|
|
|
|
|
${ER7_UTILS_HOME}/trick/integration
|
2016-02-10 15:32:53 +00:00
|
|
|
|
ifeq ($(USE_ER7_UTILS_CHECKPOINTHELPER), 1)
|
|
|
|
|
ER7_UTILS_DIRS += ${ER7_UTILS_HOME}/CheckpointHelper
|
|
|
|
|
endif
|
2015-02-26 15:02:31 +00:00
|
|
|
|
ER7_UTILS_OBJS = $(addsuffix /object_$(TRICK_HOST_CPU)/*.o ,$(ER7_UTILS_DIRS))
|
|
|
|
|
|
2015-06-24 20:58:17 +00:00
|
|
|
|
UTILS_DIRS := \
|
2023-02-01 21:54:31 +00:00
|
|
|
|
${TRICK_HOME}/trick_source/trick_utils/compareFloatingPoint \
|
2015-02-26 15:02:31 +00:00
|
|
|
|
${TRICK_HOME}/trick_source/trick_utils/interpolator \
|
|
|
|
|
${TRICK_HOME}/trick_source/trick_utils/trick_adt \
|
|
|
|
|
${TRICK_HOME}/trick_source/trick_utils/comm \
|
|
|
|
|
${TRICK_HOME}/trick_source/trick_utils/shm \
|
|
|
|
|
${TRICK_HOME}/trick_source/trick_utils/math \
|
2018-10-25 20:14:52 +00:00
|
|
|
|
${TRICK_HOME}/trick_source/trick_utils/units \
|
2023-01-11 15:27:30 +00:00
|
|
|
|
${TRICK_HOME}/trick_source/trick_utils/unicode \
|
|
|
|
|
${TRICK_HOME}/trick_source/trick_utils/var_binary_parser
|
|
|
|
|
|
2015-06-24 20:58:17 +00:00
|
|
|
|
UTILS_OBJS := $(addsuffix /object_$(TRICK_HOST_CPU)/*.o ,$(UTILS_DIRS))
|
|
|
|
|
|
|
|
|
|
# filter out the directories that make their own libraries
|
|
|
|
|
UTILS_OBJS := $(filter-out ${TRICK_HOME}/trick_source/trick_utils/comm/%, $(UTILS_OBJS))
|
|
|
|
|
UTILS_OBJS := $(filter-out ${TRICK_HOME}/trick_source/trick_utils/math/%, $(UTILS_OBJS))
|
|
|
|
|
UTILS_OBJS := $(filter-out ${TRICK_HOME}/trick_source/trick_utils/units/%, $(UTILS_OBJS))
|
2023-01-11 15:27:30 +00:00
|
|
|
|
UTILS_OBJS := $(filter-out ${TRICK_HOME}/trick_source/trick_utils/var_binary_parser/%, $(UTILS_OBJS))
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
# Specify the contents of: libtrick_pyip.a
|
|
|
|
|
# This library contains the SWIG generated interface-code between Trick and Python.
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
TRICK_SWIG_LIB = $(TRICK_LIB_DIR)/libtrick_pyip.a
|
|
|
|
|
|
|
|
|
|
SWIG_DIRS = \
|
|
|
|
|
${TRICK_HOME}/trick_source/sim_services/InputProcessor \
|
|
|
|
|
${TRICK_HOME}/trick_source/trick_swig
|
|
|
|
|
|
|
|
|
|
SWIG_OBJS = $(addsuffix /object_$(TRICK_HOST_CPU)/*.o ,$(SWIG_DIRS))
|
|
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
# Specify where to find units tests.
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2015-03-02 22:19:38 +00:00
|
|
|
|
UNIT_TEST_DIRS := \
|
2015-02-26 15:02:31 +00:00
|
|
|
|
$(wildcard ${TRICK_HOME}/trick_source/sim_services/*/test) \
|
2019-11-21 18:34:46 +00:00
|
|
|
|
$(wildcard ${TRICK_HOME}/trick_source/trick_utils/*/test)
|
2016-02-10 15:32:53 +00:00
|
|
|
|
ifeq ($(USE_ER7_UTILS), 0)
|
2015-03-02 22:19:38 +00:00
|
|
|
|
UNIT_TEST_DIRS := $(filter-out %Integrator/test,$(UNIT_TEST_DIRS))
|
|
|
|
|
endif
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
2019-11-20 20:50:10 +00:00
|
|
|
|
# DPX test excluded from releases because of size
|
|
|
|
|
DPX_UNIT_TEST_DIR = ${TRICK_HOME}/trick_source/data_products/DPX/test/unit_test
|
|
|
|
|
|
2015-02-26 15:02:31 +00:00
|
|
|
|
# The name of the ICG executable indicates the operating system, and the machine
|
|
|
|
|
# hardware on which it is built. This allows pre-build ICG binaries to be
|
|
|
|
|
# distributed in the installation package. The reason for distributing pre-built
|
|
|
|
|
# ICG binaries is because the user's machine may not have the requisite clang
|
|
|
|
|
# libraries.
|
2015-06-01 15:28:29 +00:00
|
|
|
|
ICG_EXE := ${TRICK_HOME}/bin/trick-ICG
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
# RULES
|
|
|
|
|
################################################################################
|
|
|
|
|
# DEFAULT TARGET
|
|
|
|
|
# 1 Build Trick-core and Trick Data-products.
|
2020-02-05 20:31:58 +00:00
|
|
|
|
all: no_dp dp
|
2018-03-02 14:59:26 +00:00
|
|
|
|
@ echo ; echo "[32mTrick compilation complete:[00m" ; date
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
2016-08-03 14:45:22 +00:00
|
|
|
|
ifeq ($(USE_JAVA), 1)
|
|
|
|
|
all: java
|
|
|
|
|
endif
|
|
|
|
|
|
2021-09-29 23:00:33 +00:00
|
|
|
|
ifeq ($(USE_CIVETWEB), 1)
|
|
|
|
|
all: civetweb
|
2020-02-05 20:31:58 +00:00
|
|
|
|
endif
|
2021-08-18 18:15:10 +00:00
|
|
|
|
|
2015-02-26 15:02:31 +00:00
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
# 1.1 Build Trick-core
|
2015-06-01 15:28:29 +00:00
|
|
|
|
no_dp: $(TRICK_LIB) $(TRICK_SWIG_LIB)
|
2018-03-02 14:59:26 +00:00
|
|
|
|
@ echo ; echo "Trick libs compiled:" ; date
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
|
|
|
|
# 1.1.1 Build libTrick.a
|
|
|
|
|
$(TRICK_LIB): $(SIM_SERV_DIRS) $(UTILS_DIRS) | $(TRICK_LIB_DIR)
|
|
|
|
|
ar crs $@ $(SIM_SERV_OBJS) $(UTILS_OBJS)
|
2015-06-29 14:52:18 +00:00
|
|
|
|
|
2016-02-10 15:32:53 +00:00
|
|
|
|
ifeq ($(USE_ER7_UTILS), 1)
|
2015-06-29 14:52:18 +00:00
|
|
|
|
ER7_UTILS_LIB = $(TRICK_LIB_DIR)/liber7_utils.a
|
|
|
|
|
no_dp: $(ER7_UTILS_LIB)
|
|
|
|
|
|
|
|
|
|
$(ER7_UTILS_LIB): $(ER7_UTILS_DIRS) | $(TRICK_LIB_DIR)
|
|
|
|
|
ar crs $@ $(ER7_UTILS_OBJS)
|
2015-02-26 15:02:31 +00:00
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
# 1.1.1.1 Compile the objects in the specified sim_services directories.
|
|
|
|
|
.PHONY: $(SIM_SERV_DIRS)
|
|
|
|
|
$(SIM_SERV_DIRS): icg_sim_serv $(TRICK_LIB_DIR)
|
|
|
|
|
@ $(MAKE) -C $@ trick
|
|
|
|
|
|
|
|
|
|
# 1.1.1.2 Compile the objects in the specified utils directories.
|
|
|
|
|
.PHONY: $(UTILS_DIRS)
|
|
|
|
|
$(UTILS_DIRS): icg_sim_serv
|
|
|
|
|
@ $(MAKE) -C $@ trick
|
|
|
|
|
|
|
|
|
|
# 1.1.1.3 Compile the objects in the specified er7_utils directories.
|
|
|
|
|
.PHONY: $(ER7_UTILS_DIRS)
|
|
|
|
|
$(ER7_UTILS_DIRS): TRICK_CXXFLAGS += -Wno-unused-parameter
|
2019-06-21 17:52:03 +00:00
|
|
|
|
$(ER7_UTILS_DIRS): icg_sim_serv
|
2015-02-26 15:02:31 +00:00
|
|
|
|
@ $(MAKE) -C $@ trick
|
|
|
|
|
|
|
|
|
|
# 1.1.1.4 Generate interface code (using ICG) for the specified sim_services
|
|
|
|
|
# header files.
|
|
|
|
|
.PHONY: icg_sim_serv
|
2020-10-22 19:14:39 +00:00
|
|
|
|
# Replace -isystem with -I so ICG doesn't skip Trick headers
|
|
|
|
|
icg_sim_serv: TRICK_SYSTEM_CXXFLAGS := $(subst -isystem,-I,$(TRICK_SYSTEM_CXXFLAGS))
|
2020-02-05 20:31:58 +00:00
|
|
|
|
icg_sim_serv: $(ICG_EXE)
|
2019-10-25 18:21:39 +00:00
|
|
|
|
${ICG_EXE} -sim_services -m ${TRICK_CXXFLAGS} ${TRICK_SYSTEM_CXXFLAGS} ${TRICK_HOME}/include/trick/files_to_ICG.hh
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
|
|
|
|
# 1.1.1.4.1 Build the Interface Code Generator (ICG) executable.
|
|
|
|
|
$(ICG_EXE) :
|
2015-06-01 15:28:29 +00:00
|
|
|
|
$(MAKE) -C trick_source/codegen/Interface_Code_Gen
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
|
|
|
|
# 1.1.1.5 Create Trick Library directory.
|
|
|
|
|
$(TRICK_LIB_DIR):
|
|
|
|
|
@ mkdir $@
|
|
|
|
|
|
|
|
|
|
# 1.1.2 Build libTrick_pyip.a (Swig Lib)
|
|
|
|
|
$(TRICK_SWIG_LIB): $(SWIG_DIRS) | $(TRICK_LIB_DIR)
|
|
|
|
|
ar crs $@ $(SWIG_OBJS)
|
|
|
|
|
|
|
|
|
|
.PHONY: $(SWIG_DIRS)
|
|
|
|
|
$(SWIG_DIRS): icg_sim_serv $(TRICK_LIB_DIR)
|
|
|
|
|
@ $(MAKE) -C $@ trick
|
|
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
# 1.2 Build Trick's Data-products Applications.
|
|
|
|
|
.PHONY: dp
|
|
|
|
|
dp: ${TRICK_HOME}/trick_source/trick_utils/units
|
|
|
|
|
@ $(MAKE) -C ${TRICK_HOME}/trick_source/data_products
|
|
|
|
|
|
2019-10-23 16:58:19 +00:00
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
#
|
|
|
|
|
|
2019-10-25 18:21:39 +00:00
|
|
|
|
#-------------------------------------------------------------------------------
|
2021-08-18 18:15:10 +00:00
|
|
|
|
# 1.2 Build Trick's CivetWeb webserver.
|
2019-10-25 18:21:39 +00:00
|
|
|
|
|
2021-08-18 18:15:10 +00:00
|
|
|
|
.PHONY: civetweb
|
|
|
|
|
civetweb: ${TRICK_LIB_DIR}/libtrickCivet.a
|
2019-10-25 18:21:39 +00:00
|
|
|
|
|
2021-09-29 23:00:33 +00:00
|
|
|
|
${TRICK_LIB_DIR}/libtrickCivet.a:
|
2021-08-18 18:15:10 +00:00
|
|
|
|
$(MAKE) -C ${TRICK_HOME}/trick_source/web/CivetServer
|
2019-10-25 18:21:39 +00:00
|
|
|
|
|
2015-02-26 15:02:31 +00:00
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
# 1.3 Build Trick's Java Tools
|
2020-02-05 20:31:58 +00:00
|
|
|
|
|
2020-02-12 18:38:34 +00:00
|
|
|
|
JAVA_BUILD_DIR = ${TRICK_HOME}/libexec/trick/java/build
|
|
|
|
|
|
2020-02-05 20:31:58 +00:00
|
|
|
|
ifeq (${TRICK_OFFLINE}, 0)
|
2020-02-12 18:38:34 +00:00
|
|
|
|
java: ${JAVA_BUILD_DIR}
|
|
|
|
|
|
|
|
|
|
${JAVA_BUILD_DIR}:
|
2015-02-26 15:02:31 +00:00
|
|
|
|
@ $(MAKE) -C ${TRICK_HOME}/trick_source/java
|
|
|
|
|
|
|
|
|
|
.PHONY: javadoc
|
|
|
|
|
javadoc:
|
|
|
|
|
@ $(MAKE) -C ${TRICK_HOME}/trick_source/java $@
|
2020-02-05 20:31:58 +00:00
|
|
|
|
else
|
|
|
|
|
JAVA_SOURCE_DIR = ${TRICK_HOME}/trick-offline
|
|
|
|
|
JARS = DP Dre JXPlot MM MTV QP Sie SimControl SimSniffer TrickView trick-java-${TRICK_VERSION}
|
|
|
|
|
JAR_TARGETS = $(foreach JAR, $(JARS), ${JAVA_BUILD_DIR}/$(JAR).jar)
|
|
|
|
|
|
|
|
|
|
define JAR_FUN
|
|
|
|
|
$${JAVA_BUILD_DIR}/$(1).jar: $${JAVA_SOURCE_DIR}/$(1).jar | $${JAVA_BUILD_DIR}
|
|
|
|
|
cp $$< $$@
|
|
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
$(foreach JAR,$(JARS),$(eval $(call JAR_FUN,$(JAR))))
|
|
|
|
|
|
|
|
|
|
${JAVA_BUILD_DIR}:
|
|
|
|
|
mkdir -p ${TRICK_HOME}/libexec/trick/java/build
|
|
|
|
|
|
|
|
|
|
java: ${JAR_TARGETS}
|
|
|
|
|
@echo offline mode: java code copied successfully
|
|
|
|
|
|
|
|
|
|
endif
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
# 1.4 This target builds the Trick Documentation.
|
|
|
|
|
.PHONY: doxygen
|
|
|
|
|
doxygen:
|
|
|
|
|
@ $(MAKE) -C $@
|
|
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
# 1.5 Some Trick source is auto-generated as part of the Trick's build process. When
|
|
|
|
|
# Trick is distributed to the user community, we can't be certain that everyone's
|
|
|
|
|
# machine will have the approriate versions of the code generations tool. So rather
|
|
|
|
|
# than just hope, we go ahead and pre-generate the necessary source files, and
|
|
|
|
|
# include those in the distribution package.
|
|
|
|
|
# This target pre-generates these source files, that are necessary for creating
|
|
|
|
|
# a distribution package.
|
|
|
|
|
premade:
|
|
|
|
|
@ $(MAKE) -C ${TRICK_HOME}/trick_source/sim_services/MemoryManager premade
|
|
|
|
|
@ $(MAKE) -C ${TRICK_HOME}/trick_source/sim_services/CheckPointAgent premade
|
|
|
|
|
@ $(MAKE) -C ${TRICK_HOME}/trick_source/java
|
|
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
# TESTING
|
|
|
|
|
################################################################################
|
2023-02-07 21:35:22 +00:00
|
|
|
|
|
2015-02-26 15:02:31 +00:00
|
|
|
|
# This target runs Trick's Unit-tests and simulation-tests.
|
2015-03-02 22:19:38 +00:00
|
|
|
|
test: unit_test sim_test
|
2018-03-02 14:59:26 +00:00
|
|
|
|
@ echo "All tests completed sucessfully"
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
|
|
|
|
.PHONY: $(UNIT_TEST_DIRS)
|
|
|
|
|
$(UNIT_TEST_DIRS):
|
|
|
|
|
@ $(MAKE) -C $@ test
|
|
|
|
|
|
2019-11-20 20:50:10 +00:00
|
|
|
|
unit_test: $(UNIT_TEST_DIRS) $(DPX_UNIT_TEST_DIR)
|
|
|
|
|
|
|
|
|
|
# DPX test excluded from releases because of size
|
|
|
|
|
.PHONY: $(DPX_UNIT_TEST_DIR)
|
|
|
|
|
$(DPX_UNIT_TEST_DIR):
|
|
|
|
|
@ if [ -d ${DPX_UNIT_TEST_DIR} ]; then $(MAKE) -C $@ test; fi
|
|
|
|
|
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
|
|
|
|
sim_test:
|
2022-11-17 21:43:29 +00:00
|
|
|
|
@ $(MAKE) -f test_overrides.mk sim_test
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
2021-08-18 18:15:10 +00:00
|
|
|
|
pytest:
|
|
|
|
|
make -C share/trick/pymods/trick
|
|
|
|
|
|
2023-01-11 15:27:30 +00:00
|
|
|
|
COVERAGE_DIRS = trick_source/sim_services \
|
|
|
|
|
trick_source/trick_utils/var_binary_parser \
|
|
|
|
|
trick_source/trick_utils/unicode \
|
|
|
|
|
trick_source/trick_utils/units \
|
|
|
|
|
trick_source/trick_utils/interpolator \
|
|
|
|
|
trick_source/trick_utils/comm \
|
|
|
|
|
trick_source/trick_utils/SAIntegrator
|
|
|
|
|
|
|
|
|
|
extra-coverage-builds:
|
|
|
|
|
@ $(MAKE) test -C trick_source/trick_utils/SAIntegrator
|
|
|
|
|
|
|
|
|
|
code-coverage: test extra-coverage-builds
|
|
|
|
|
lcov --capture $(addprefix --directory , $(COVERAGE_DIRS)) --output-file coverage_large.info
|
|
|
|
|
lcov --remove coverage_large.info '/Library/*' '/usr/*' '*/io_src/*' '*/test/*' '*/unittest/*' -o coverage.info
|
2022-10-13 19:23:16 +00:00
|
|
|
|
rm coverage_large.info
|
|
|
|
|
lcov --list coverage.info
|
2021-08-18 18:15:10 +00:00
|
|
|
|
|
2015-03-02 22:19:38 +00:00
|
|
|
|
#requirements:
|
|
|
|
|
# @ $(MAKE) -C trick_test/requirements_docs install
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
# CLEAN Targets
|
|
|
|
|
################################################################################
|
|
|
|
|
|
2018-03-02 14:59:26 +00:00
|
|
|
|
|
2020-10-23 20:45:32 +00:00
|
|
|
|
clean: clean_sim_serv clean_utils clean_swig clean_dp clean_ICG clean_java clean_sim_serv_xml
|
2015-02-26 15:02:31 +00:00
|
|
|
|
@/bin/rm -rf $(TRICK_BIN_DIR)
|
|
|
|
|
@/bin/rm -rf $(TRICK_LIB_DIR)
|
|
|
|
|
|
2016-02-10 15:32:53 +00:00
|
|
|
|
ifeq ($(USE_ER7_UTILS), 1)
|
2015-06-25 19:40:18 +00:00
|
|
|
|
clean: clean_er7_utils
|
2015-02-26 15:02:31 +00:00
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
clean_sim_serv:
|
|
|
|
|
@for i in $(SIM_SERV_DIRS) ; do \
|
2018-03-02 14:59:26 +00:00
|
|
|
|
$(MAKE) -C $$i real_clean ; \
|
2015-02-26 15:02:31 +00:00
|
|
|
|
done
|
2018-03-02 14:59:26 +00:00
|
|
|
|
@ $(MAKE) -C ${TRICK_HOME}/trick_source/sim_services/mains real_clean
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
2019-06-21 17:52:03 +00:00
|
|
|
|
clean_er7_utils:
|
2015-02-26 15:02:31 +00:00
|
|
|
|
@for i in $(ER7_UTILS_DIRS) ; do \
|
2018-03-02 14:59:26 +00:00
|
|
|
|
$(MAKE) -C $$i real_clean ; \
|
2015-02-26 15:02:31 +00:00
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
clean_utils:
|
2015-06-26 14:35:49 +00:00
|
|
|
|
@for i in $(UTILS_DIRS) ; do \
|
2018-03-02 14:59:26 +00:00
|
|
|
|
$(MAKE) -C $$i real_clean ; \
|
2015-06-26 14:35:49 +00:00
|
|
|
|
done
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
2015-03-03 15:41:08 +00:00
|
|
|
|
clean_swig:
|
2015-02-26 15:02:31 +00:00
|
|
|
|
@for i in $(SWIG_DIRS) ; do \
|
2018-03-02 14:59:26 +00:00
|
|
|
|
$(MAKE) -C $$i real_clean ; \
|
2015-02-26 15:02:31 +00:00
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
clean_ICG :
|
2018-03-02 14:59:26 +00:00
|
|
|
|
$(MAKE) -C ${TRICK_HOME}/trick_source/codegen/Interface_Code_Gen clean
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
|
|
|
|
clean_unit_test:
|
|
|
|
|
@/bin/rm -rf ${TRICK_HOME}/trick_test/*.xml
|
|
|
|
|
@ for i in $(UNIT_TEST_DIRS) ; do \
|
|
|
|
|
$(MAKE) -C $$i clean ; \
|
|
|
|
|
done
|
|
|
|
|
|
2017-11-28 15:05:07 +00:00
|
|
|
|
clean_doxygen:
|
2018-03-02 14:59:26 +00:00
|
|
|
|
@ $(MAKE) -C ${TRICK_HOME}/doxygen clean
|
|
|
|
|
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
|
|
|
|
clean_dp:
|
2018-03-02 14:59:26 +00:00
|
|
|
|
@ $(MAKE) clean -C ${TRICK_HOME}/trick_source/data_products
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
|
|
|
|
clean_java:
|
2018-03-02 14:59:26 +00:00
|
|
|
|
@ $(MAKE) -C ${TRICK_HOME}/trick_source/java clean
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
2020-10-23 20:45:32 +00:00
|
|
|
|
clean_sim_serv_xml:
|
|
|
|
|
@/bin/rm -rf ${TRICK_HOME}/share/trick/xml/*
|
|
|
|
|
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
|
|
|
|
# FIXME: Seems to me that the for loop below should be removed and that the
|
|
|
|
|
# 'clean' target in trick_sims/makefile should be doing this. --Penn
|
2015-03-02 22:19:38 +00:00
|
|
|
|
clean_test: clean_unit_test
|
2015-02-26 15:02:31 +00:00
|
|
|
|
-@ $(MAKE) -C trick_sims clean
|
2016-02-23 16:46:38 +00:00
|
|
|
|
-@ $(MAKE) -C test clean
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
|
|
|
|
clean_gui: clean_java
|
|
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
# INSTALL Targets
|
|
|
|
|
################################################################################
|
|
|
|
|
|
2016-06-20 18:40:45 +00:00
|
|
|
|
ER7_HEADERS := $(addprefix $(PREFIX)/include/, $(filter er7_utils/%, $(shell cd trick_source && find er7_utils -name \*.hh)))
|
|
|
|
|
|
|
|
|
|
${ER7_HEADERS} : ${PREFIX}/include/% : trick_source/%
|
2016-08-17 22:03:36 +00:00
|
|
|
|
@ mkdir -p ${@D}
|
|
|
|
|
install -m 0644 $? $@
|
2016-06-20 18:40:45 +00:00
|
|
|
|
|
|
|
|
|
install: ${ER7_HEADERS}
|
2017-11-17 17:39:17 +00:00
|
|
|
|
@if [ ! -d ${TRICK_LIB_DIR} ]; then \
|
2017-11-21 20:55:39 +00:00
|
|
|
|
make; \
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
@if [ ${PREFIX} = "/usr/local" ]; then \
|
|
|
|
|
if [[ $EUID -ne 0 ]]; then \
|
|
|
|
|
echo -e "\n\e[31mInstalling Trick to /usr/local, the default installation location, requires super user privileges."; \
|
|
|
|
|
echo -e "Please log in as a super user to continue.\e[0m\n"; \
|
|
|
|
|
exit 1; \
|
|
|
|
|
fi; \
|
2017-11-17 17:39:17 +00:00
|
|
|
|
fi
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
2017-11-21 20:55:39 +00:00
|
|
|
|
cp -r bin include $(notdir ${TRICK_LIB_DIR}) libexec share ${PREFIX}
|
|
|
|
|
@echo -e "\n\e[32mTrick has been installed successfully to ${PREFIX}.\e[0m\n"
|
|
|
|
|
|
2015-02-26 15:02:31 +00:00
|
|
|
|
uninstall:
|
2016-06-20 18:40:45 +00:00
|
|
|
|
rm -f ${PREFIX}/bin/trick-CP
|
|
|
|
|
rm -f ${PREFIX}/bin/trick-ICG
|
2016-09-07 14:40:31 +00:00
|
|
|
|
rm -f ${PREFIX}/bin/trick-config
|
2016-06-20 18:40:45 +00:00
|
|
|
|
rm -f ${PREFIX}/bin/trick-dp
|
|
|
|
|
rm -f ${PREFIX}/bin/trick-dre
|
|
|
|
|
rm -f ${PREFIX}/bin/trick-gte
|
|
|
|
|
rm -f ${PREFIX}/bin/trick-gxplot
|
|
|
|
|
rm -f ${PREFIX}/bin/trick-jxplot
|
|
|
|
|
rm -f ${PREFIX}/bin/trick-killsim
|
|
|
|
|
rm -f ${PREFIX}/bin/trick-mm
|
|
|
|
|
rm -f ${PREFIX}/bin/trick-mtv
|
|
|
|
|
rm -f ${PREFIX}/bin/trick-qp
|
|
|
|
|
rm -f ${PREFIX}/bin/trick-sie
|
|
|
|
|
rm -f ${PREFIX}/bin/trick-simcontrol
|
|
|
|
|
rm -f ${PREFIX}/bin/trick-sniffer
|
|
|
|
|
rm -f ${PREFIX}/bin/trick-stripchart
|
|
|
|
|
rm -f ${PREFIX}/bin/trick-trk2ascii
|
|
|
|
|
rm -f ${PREFIX}/bin/trick-trk2csv
|
|
|
|
|
rm -f ${PREFIX}/bin/trick-tv
|
|
|
|
|
rm -f ${PREFIX}/bin/trick-version
|
2015-06-11 19:40:14 +00:00
|
|
|
|
rm -rf ${PREFIX}/include/trick
|
2016-06-20 18:40:45 +00:00
|
|
|
|
rm -rf ${PREFIX}/include/er7_utils
|
|
|
|
|
rm -f ${PREFIX}/$(notdir ${TRICK_LIB_DIR})/liber7_utils.a
|
|
|
|
|
rm -f ${PREFIX}/$(notdir ${TRICK_LIB_DIR})/libtrick.a
|
|
|
|
|
rm -f ${PREFIX}/$(notdir ${TRICK_LIB_DIR})/libtrick_comm.a
|
|
|
|
|
rm -f ${PREFIX}/$(notdir ${TRICK_LIB_DIR})/libtrick_math.a
|
|
|
|
|
rm -f ${PREFIX}/$(notdir ${TRICK_LIB_DIR})/libtrick_mm.a
|
|
|
|
|
rm -f ${PREFIX}/$(notdir ${TRICK_LIB_DIR})/libtrick_pyip.a
|
|
|
|
|
rm -f ${PREFIX}/$(notdir ${TRICK_LIB_DIR})/libtrick_units.a
|
2015-06-11 19:40:14 +00:00
|
|
|
|
rm -rf ${PREFIX}/libexec/trick
|
|
|
|
|
rm -rf ${PREFIX}/share/doc/trick
|
2016-06-20 18:40:45 +00:00
|
|
|
|
rm -f ${PREFIX}/share/man/man1/trick-CP.1
|
|
|
|
|
rm -f ${PREFIX}/share/man/man1/trick-ICG.1
|
|
|
|
|
rm -f ${PREFIX}/share/man/man1/trick-killsim.1
|
2015-06-11 19:40:14 +00:00
|
|
|
|
rm -rf ${PREFIX}/share/trick
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
# MISCELLANEOUS DEVELOPER UTILITY TARGETS #
|
|
|
|
|
################################################################################
|
|
|
|
|
# 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.
|
2020-10-22 19:14:39 +00:00
|
|
|
|
# Replace -isystem with -I so ICG doesn't skip Trick headers
|
|
|
|
|
ICG: TRICK_SYSTEM_CXXFLAGS := $(subst -isystem,-I,$(TRICK_SYSTEM_CXXFLAGS))
|
2020-02-05 20:31:58 +00:00
|
|
|
|
ICG: $(ICG_EXE)
|
2019-10-25 18:21:39 +00:00
|
|
|
|
$(ICG_EXE) -f -s -m -n ${TRICK_CXXFLAGS} ${TRICK_SYSTEM_CXXFLAGS} ${TRICK_HOME}/include/trick/files_to_ICG.hh
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
|
|
|
|
# This builds a tricklib share library.
|
2015-06-01 15:28:29 +00:00
|
|
|
|
trick_lib: $(SIM_SERV_DIRS) $(UTILS_DIRS) | $(TRICK_LIB_DIR)
|
2019-06-18 16:00:08 +00:00
|
|
|
|
${TRICK_CXX} $(SHARED_LIB_OPT) -o ${TRICK_LIB_DIR}/libtrick.so $(SIM_SERV_OBJS) $(UTILS_OBJS)
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
2015-03-03 22:06:02 +00:00
|
|
|
|
# For NASA/JSC developers include optional rules
|
|
|
|
|
-include Makefile_jsc_dirs
|