# file: GNUmakefile
#
# this make file builds the driver program using GNU make and
# the isip make template
# 

# define the default compiler
#
ISIP_JAVA_COMPILER = javac

# source files
#
ISIP_REQUIRE = JAVA JAVAC JAR SH 
ISIP_FILES = *.java

# driver program
#
ISIP_DRIVER_SCRIPT = isip_transform_builder.sh

# define compilation flags for the Java compiler
#
ISIP_JFLAGS =

# depenedencies
#
ISIP_DEPS = 

# define a resource install directive
#
ISIP_RESOURCE_INSTALL = copy-resources
ISIP_RESOURCE_CLEAN = delete-resources

# define the jarfile name
#
ISIP_JARFILE_NAME = transformBuilder.jar

IMAGES_ICONS_DIR = $(ISIP_DEVEL)/lib/images/isip_transform_builder/icons
IMAGES_SPECIAL_DIR = $(ISIP_DEVEL)/lib/images/isip_transform_builder/special
TEXT_DIR = $(ISIP_DEVEL)/lib/text/isip_transform_builder

# make template
#
include $(ISIP_DEVEL)/scripts/make/compile_java.make

# install the images and text files to the lib directory
#
copy-resources:
	echo "> installing the resource files"
	mkdir -p $(TEXT_DIR)
	cp -fr text/*.txt $(TEXT_DIR)

	echo "> installing the images"
	mkdir -p $(IMAGES_ICONS_DIR)
	cp -fr images/icons/*.gif $(IMAGES_ICONS_DIR)
	mkdir -p $(IMAGES_SPECIAL_DIR)
	cp -fr images/special/*.gif $(IMAGES_SPECIAL_DIR)

# delete the images and text files from the lib directory
#
delete-resources:
	echo "> deleting the resource files"
	-rm -fr $(TEXT_DIR)

	echo "> deleting the images"
	-rm -fr $(IMAGES_ICONS_DIR)
	-rm -fr $(IMAGES_SPECIAL_DIR)

#
# end of file
