
goal: webCDcreator.jar

%.class: %.java
	javac $<

webCDcreator.jar: \
	BurnDialog.class \
	BurnSession.class \
	CDcreator.class \
	CloseSession.class \
	Command.class \
	CommandError.class \
	Config.class \
	Connect.class \
	DirTreeNode.class \
	HelpWin.class \
	Log.class \
	LogWin.class \
	MainWin.class \
	Messages.properties \
	Messages_de.properties \
	NewSession.class \
	OpenSession.class \
	Options.class \
	OptionsDialog.class \
	PutDialog.class \
	PutFiles.class \
	PutTracks.class \
	QueueDialog.class \
	SecFile.class \
	SessionSizeView.class \
	TypesDialog.class \
	Version.class
	jar cf webCDcreator.jar *.class *.properties icons/ \
		doc/index.html doc/de/manual.html doc/en/manual.html \
		netscape/security/*.class

test: webCDcreator.jar
	java CDcreator server=localhost port=12411

4netscape: webCDcreator.jar
	rm /tmp/webCDcreator/ -rf
	mkdir -p /tmp/webCDcreator/doc/de/ \
		/tmp/webCDcreator/doc/en/
	cp -a *.class *.properties icons/ \
		/tmp/webCDcreator/
	cp -a doc/index.html /tmp/webCDcreator/doc/
	cp -a doc/de/manual.html /tmp/webCDcreator/doc/de/manual.html
	cp -a doc/en/manual.html /tmp/webCDcreator/doc/en/manual.html
	signtool -k "${certificate}" \
		-Z 4netscape/webCDcreator.jar /tmp/webCDcreator/
	rm /tmp/webCDcreator/ -rf

4plugin: webCDcreator.jar
	jarsigner -signedjar 4plugin/webCDcreator.jar \
		webCDcreator.jar ${certificate}
	make -C 4plugin Policy.class

4pluginRSA: webCDcreator.jar
	rm /tmp/webCDcreator/ -rf
	mkdir -p /tmp/webCDcreator/doc/de/ \
		/tmp/webCDcreator/doc/en/ \
		/tmp/webCDcreator/netscape/security/
	cp -a *.class *.properties icons/ \
		/tmp/webCDcreator/
	cp -a doc/index.html /tmp/webCDcreator/doc/
	cp -a doc/de/manual.html /tmp/webCDcreator/doc/de/manual.html
	cp -a doc/en/manual.html /tmp/webCDcreator/doc/en/manual.html
	cp -a netscape/security/*.class \
		/tmp/webCDcreator/netscape/security/
	signtool -k "${certificate}" \
		-Z 4pluginRSA/webCDcreator.jar /tmp/webCDcreator/
	rm /tmp/webCDcreator/ -rf

clean:
	rm -f *~ *.o *.so *.class .nfs* core doc/*~ doc/de/*~ doc/en/*~
	make -C netscape/security clean
	make -C 4netscape clean
	make -C 4plugin clean
	make -C 4pluginRSA clean

maintainer-clean: clean
	rm -f *.jar *.zip
	make -C 4netscape maintainer-clean
	make -C 4plugin maintainer-clean
	make -C 4pluginRSA maintainer-clean
