# BlinkenLightsInteractiveMovieProgram
# version 0.6 date 2005-03-10
# Copyright (C) 2004-2005: Stefan Schuermans <1stein@schuermans.info>
# Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html
# a blinkenarea.org project
# powered by eventphone.de

JAVAC=javac
JAR=jar
KEYTOOL=keytool
JARSIGNER=jarsigner
KEYPASS=BlinkenLightsInteractiveMovieProgram
JAVA=java

CLASS_FILES=BlinkenFileFilter.class BlinkenFrame.class BlinkenFrameDisplay.class \
            BlinkenFrameDisplayListener.class BlinkenFrameDisplayInterceptor.class \
            BlinkenFrameEditor.class BlinkenFrameEditorListener.class \
            BlinkenMovie.class Blimp.class

IMAGE_FILES=images/ColorPicker.png images/Dot.png images/Line.png \
            images/Rectangle.png images/FilledRectangle.png \
            images/Circle.png images/FilledCircle.png \
            images/Copy.png images/Paste.png \
            images/Invert.png images/MirrorHor.png images/RollLeft.png \
            images/Rotate90.png images/MirrorVer.png images/RollRight.png \
            images/Rotate180.png images/MirrorDiag.png images/RollUp.png \
            images/Rotate270.png images/MirrorDiag2.png images/RollDown.png \
            images/Undo.png images/Redo.png

.phony: all clean jar run

all: $(CLASS_FILES)

%.class: %.java
	$(JAVAC) $<

clean:
	rm -f $(CLASS_FILES) Blimp.jar

jar: Blimp.jar

Blimp.keystore:
	$(KEYTOOL) -genkey -alias Blimp -keystore Blimp.keystore -keypass $(KEYPASS) -storepass $(KEYPASS)

Blimp.jar: Blimp.mf Blimp.keystore $(CLASS_FILES) $(IMAGE_FILES)
	$(JAR) cmf Blimp.mf Blimp.jar $(CLASS_FILES) $(IMAGE_FILES)
	$(JARSIGNER) -keystore Blimp.keystore -storepass $(KEYPASS) Blimp.jar Blimp

run: $(CLASS_FILES)
	$(JAVA) Blimp