mirror of
https://github.com/nasa/trick.git
synced 2024-12-18 20:57:55 +00:00
Added formating to the core makefile. Trick compilation is now visually broken into sections.
This commit is contained in:
parent
6e0fcbd947
commit
5e8cb8649f
29
Makefile
29
Makefile
@ -148,7 +148,10 @@ MAKE_TRAVERSAL_NEWLINE := | sed '/^make.*: Leaving directory/a\ '
|
||||
# DEFAULT TARGET
|
||||
# 1 Build Trick-core and Trick Data-products.
|
||||
all: no_dp dp
|
||||
@ echo ; echo "[32mTrick compilation complete:[00m" ; date
|
||||
@ echo -e "\n\e[32m#####################################\e[0m"
|
||||
@ echo -e "\e[32mTrick has been successfully compiled.\e[34m"
|
||||
@date
|
||||
@ echo -e "\e[32m#####################################\e[0m\n"
|
||||
|
||||
ifeq ($(USE_JAVA), 1)
|
||||
all: java
|
||||
@ -157,35 +160,45 @@ endif
|
||||
#-------------------------------------------------------------------------------
|
||||
# 1.1 Build Trick-core
|
||||
no_dp: $(TRICK_LIB) $(TRICK_SWIG_LIB)
|
||||
@ echo ; echo "Trick libs compiled:" ; date
|
||||
@ echo -e "\e[32mTrick libraries compiled:\e[34m" ; date ; echo -e "\e[0m"
|
||||
|
||||
# 1.1.1 Build libTrick.a
|
||||
$(TRICK_LIB): $(SIM_SERV_DIRS) $(UTILS_DIRS) | $(TRICK_LIB_DIR)
|
||||
@ echo -e "\e[34m[---Building $@---]\e[0m"
|
||||
ar crs $@ $(SIM_SERV_OBJS) $(UTILS_OBJS)
|
||||
@ echo ""
|
||||
|
||||
ifeq ($(USE_ER7_UTILS), 1)
|
||||
ER7_UTILS_LIB = $(TRICK_LIB_DIR)/liber7_utils.a
|
||||
no_dp: $(ER7_UTILS_LIB)
|
||||
|
||||
$(ER7_UTILS_LIB): $(ER7_UTILS_DIRS) | $(TRICK_LIB_DIR)
|
||||
@ echo -e "\e[34m[---Building $@---]\e[0m"
|
||||
ar crs $@ $(ER7_UTILS_OBJS)
|
||||
@ echo ""
|
||||
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)
|
||||
@ echo -e "\e[34m[---Building $@---]\e[0m"
|
||||
@ $(MAKE) -C $@ trick
|
||||
@ echo ""
|
||||
|
||||
# 1.1.1.2 Compile the objects in the specified utils directories.
|
||||
.PHONY: $(UTILS_DIRS)
|
||||
$(UTILS_DIRS): icg_sim_serv
|
||||
@ echo -e "\e[34m[---Building $@---]\e[0m"
|
||||
@ $(MAKE) -C $@ trick
|
||||
@ echo ""
|
||||
|
||||
# 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
|
||||
$(ER7_UTILS_DIRS): make_er7_makefiles icg_sim_serv
|
||||
@ echo -e "\e[34m[---Building $@---]\e[0m"
|
||||
@ $(MAKE) -C $@ trick
|
||||
@ echo ""
|
||||
|
||||
.PHONY: make_er7_makefiles
|
||||
make_er7_makefiles:
|
||||
@ -201,11 +214,15 @@ endif
|
||||
# header files.
|
||||
.PHONY: icg_sim_serv
|
||||
icg_sim_serv: $(ICG_EXE)
|
||||
@ echo -e "\e[34m[---Generating Interface Code---]\e[0m"
|
||||
${TRICK_HOME}/bin/trick-ICG -s -m ${TRICK_CXXFLAGS} ${TRICK_SYSTEM_CXXFLAGS} ${TRICK_HOME}/include/trick/files_to_ICG.hh
|
||||
@ echo ""
|
||||
|
||||
# 1.1.1.4.1 Build the Interface Code Generator (ICG) executable.
|
||||
$(ICG_EXE) :
|
||||
@ echo -e "\e[34m[---Building Interface Code Generator---]\e[0m"
|
||||
$(MAKE) -C trick_source/codegen/Interface_Code_Gen
|
||||
@ echo ""
|
||||
|
||||
# 1.1.1.5 Create Trick Library directory.
|
||||
$(TRICK_LIB_DIR):
|
||||
@ -213,17 +230,23 @@ $(TRICK_LIB_DIR):
|
||||
|
||||
# 1.1.2 Build libTrick_pyip.a (Swig Lib)
|
||||
$(TRICK_SWIG_LIB): $(SWIG_DIRS) | $(TRICK_LIB_DIR)
|
||||
@ echo -e "\e[34m[---Building $@---]\e[0m"
|
||||
ar crs $@ $(SWIG_OBJS)
|
||||
@ echo ""
|
||||
|
||||
.PHONY: $(SWIG_DIRS)
|
||||
$(SWIG_DIRS): icg_sim_serv $(TRICK_LIB_DIR)
|
||||
@ echo -e "\e[34m[---Building $@---]\e[0m"
|
||||
@ $(MAKE) -C $@ trick
|
||||
@ echo ""
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# 1.2 Build Trick's Data-products Applications.
|
||||
.PHONY: dp
|
||||
dp: ${TRICK_HOME}/trick_source/trick_utils/units
|
||||
@ echo -e "\e[34m[---Building Data-Products Applications---]\e[0m"
|
||||
@ $(MAKE) -C ${TRICK_HOME}/trick_source/data_products
|
||||
@ echo ""
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# 1.3 Build Trick's Java Tools
|
||||
@ -258,7 +281,7 @@ premade:
|
||||
################################################################################
|
||||
# This target runs Trick's Unit-tests and simulation-tests.
|
||||
test: unit_test sim_test
|
||||
@ echo "All tests completed sucessfully"
|
||||
@ echo -e "\e[33mAll unit tests completed sucessfully.\e[0m"
|
||||
|
||||
.PHONY: $(UNIT_TEST_DIRS)
|
||||
$(UNIT_TEST_DIRS):
|
||||
|
@ -23,21 +23,23 @@ all: $(LIBDIRS) $(APPDIRS)
|
||||
always_make:
|
||||
|
||||
docs: always_make
|
||||
@echo "===== Making DOCS ====="
|
||||
@ echo -e "\e[34m[---Making Documentation---]\e[0m"
|
||||
doxygen DPX.doxygen
|
||||
|
||||
testing: $(LIBDIRS)
|
||||
@echo "===== Making TESTING ====="
|
||||
@ echo -e "\e[34m[---Building TESTING---]\e[0m"
|
||||
$(MAKE) -C TESTING
|
||||
@ echo ""
|
||||
|
||||
$(LIBDIRS):
|
||||
@ echo ; echo "==: Compile $@"
|
||||
@ echo -e "\e[34m[---Building $@---]\e[0m"
|
||||
@ $(MAKE) -C $@
|
||||
@ echo ""
|
||||
|
||||
$(APPDIRS): $(LIBDIRS)
|
||||
@echo "===== Making APPS ====="
|
||||
@ echo ; echo "==: Compile $@"
|
||||
@ echo -e "\e[34m[---Building $@---]\e[0m"
|
||||
@ $(MAKE) -C $@
|
||||
@ echo ""
|
||||
|
||||
clean:
|
||||
@ for i in $(LIBDIRS) ; do \
|
||||
|
@ -22,17 +22,19 @@ APPDIRS = DPX \
|
||||
Apps/ExternalPrograms
|
||||
|
||||
all: $(LIBDIRS) $(APPDIRS)
|
||||
@ echo "[32m== Trick data_products make complete ==[00m"
|
||||
@ echo -e "\e[32mTrick data-products compiled:\e[34m" ; date ; echo -e "\e[0m"
|
||||
|
||||
.PHONY: $(LIBDIRS) $(APPDIRS)
|
||||
|
||||
$(LIBDIRS):
|
||||
@ echo ; echo "==: Compile data_products/$@"
|
||||
@ echo -e "\e[34m[---Building $@---]\e[0m"
|
||||
@ $(MAKE) -C $@
|
||||
@ echo ""
|
||||
|
||||
$(APPDIRS): $(LIBDIRS)
|
||||
@ echo ; echo "==: Compile data_products/$@"
|
||||
@ echo -e "\e[34m[---Building $@---]\e[0m"
|
||||
@ $(MAKE) -C $@
|
||||
@ echo ""
|
||||
|
||||
real_clean: clean
|
||||
|
||||
|
@ -24,13 +24,13 @@ RESOURCES = $(subst src/,,$(shell find src/trick -name resources))
|
||||
RESOURCES += $(subst src/,,$(shell find src/trick -name jaxb.index))
|
||||
|
||||
all: ${DIST_DIR}/trick.jar resources
|
||||
@echo "[32mJava build successful[0m"
|
||||
@ echo -e "\n\e[32mTrick GUIs compiled:\e[34m" ; date ; echo -e "\e[0m"
|
||||
|
||||
${DEST_DIR} ${DIST_DIR} ${RESOURCES_DIR} ${DOCS_API_DIR}:
|
||||
mkdir -p $@
|
||||
|
||||
${DIST_DIR}/trick.jar: compile ${DIST_DIR}
|
||||
@echo "[36mCreating jar file...[0m"
|
||||
@echo -e "\e[34m[---Creating Trick JAR---]\e[0m"
|
||||
@jar cf ${DIST_DIR}/trick.jar -C ${DEST_DIR} .
|
||||
@cd ${SRC_DIR} && jar uf ${DIST_DIR}/trick.jar ${RESOURCES}
|
||||
|
||||
@ -38,7 +38,7 @@ external_jars:
|
||||
@ $(MAKE) -C $(LIB_DIR)
|
||||
|
||||
compile: ${DEST_DIR} external_jars
|
||||
@echo "[36mBuilding Trick GUIs...[0m"
|
||||
@echo -e "\e[34m[---Building Trick GUIs---]\e[0m"
|
||||
@${JAVAC} ${JAVAC_FLAGS} -classpath ${CLASS_PATH} -d ${DEST_DIR} -sourcepath ${SRC_DIR} ${SRC_FILES}
|
||||
|
||||
resources: ${RESOURCES_DIR}/trick_icon.png
|
||||
|
Loading…
Reference in New Issue
Block a user