Alex Lin 19025d77ad Standardize directory names
Reorganized.  Created a new top level include directory that will hold all of Trick's header files. Moved all of the Trick headers to this directory.  Created a libexec directory that holds all of the executables that users don't need to execute directly.  Changed all of the executables remaining in bin to start with "trick-".  In the sim_services directories changed all source files to find the Trick headers in their new location.  Since all of the include files are gone in sim_services, removed the src directories as well, moving all of the source files up a level.  Moved the makefiles, docs, man, and other architecture independent files into a top level share directory.  Renamed lib_${TRICK_HOST_CPU} to lib64 or lib depending on the platform we're currently on.

refs #63
2015-06-09 08:44:42 -05:00

68 lines
2.0 KiB
Makefile
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Get JAVAC definition
include ${TRICK_HOME}/share/trick/makefiles/Makefile.common
JAVAC ?= javac
JAVAC_FLAGS = -g -Xlint:unchecked -Xlint:deprecation
SRC_DIR = src
SRC_FILES = $(shell find ${SRC_DIR} -type f -name \*.java)
BUILD_DIR = build
DEST_DIR = ${BUILD_DIR}/classes
LIB_DIR = ${TRICK_HOME}/libexec/trick/java/lib
DIST_DIR = ${TRICK_HOME}/libexec/trick/java/dist
RESOURCES_DIR = ${TRICK_HOME}/libexec/trick/java/resources
DOCS_API_DIR = docs/api
TEST_REPORTS_DIR = test/reports
empty :=
space := $(empty) $(empty)
CLASS_PATH = $(subst $(space),:,$(wildcard ${LIB_DIR}/*.jar))
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 "Java build successful"
${DEST_DIR} ${DIST_DIR} ${RESOURCES_DIR} ${DOCS_API_DIR}:
mkdir -p $@
${DIST_DIR}/trick.jar: compile ${DIST_DIR}
@echo "Creating jar file..."
@jar cf ${DIST_DIR}/trick.jar -C ${DEST_DIR} .
@cd ${SRC_DIR} && jar uf ${DIST_DIR}/trick.jar ${RESOURCES}
external_jars:
@ $(MAKE) -C $(LIB_DIR)
compile: ${DEST_DIR} external_jars
@echo "Building Trick GUIs..."
@${JAVAC} ${JAVAC_FLAGS} -classpath ${CLASS_PATH} -d ${DEST_DIR} -sourcepath ${SRC_DIR} ${SRC_FILES}
resources: ${RESOURCES_DIR}/trick_icon.png
${RESOURCES_DIR}/trick_icon.png: ${SRC_DIR}/trick/common/resources/trick_icon.png ${RESOURCES_DIR}
@cp $< $@
JAVA_DOC_LINKS = \
-link "http://docs.oracle.com/javase/6/docs/api/" \
-link "http://www.jdocs.com/swingx/1.0/overview-summary.html" \
-link "http://www.jfree.org/jfreechart/api/javadoc/" \
-link "http://junit.sourceforge.net/javadoc/"
docs: ${DOCS_API_DIR}
javadoc -d ${DOCS_API_DIR} -classpath ${CLASS_PATH} -sourcepath ${SRC_DIR} -windowtitle "Trick GUI API" ${JAVA_DOC_LINKS} trick ${SRC_FILES}
clean:
rm -rf ${BUILD_DIR}
rm -rf ${DIST_DIR}
rm -rf ${RESOURCES_DIR}
rm -rf ${TEST_REPORTS_DIR}
clean_obj:
rm -rf ${BUILD_DIR}
clean_docs:
rm -rf ${DOCS_API_DIR}