# makefile
# This is the makefile for DOS
#
# If you want to run LTOOLSgui, please set JAVAC and JAR

#########################################################################
# Needed for LTOOLSgui, the graphical user interface for LREAD
# JAVA compiler (tested with JDK 1.2.2)
# (paths and CLASSPATH must have been setup correctly)
JAVAC=javac -O
JAR=jar
#
##########################################################################

####no user configurable items below this line############################

all:            ltoolsgui

ltoolsgui:	
		@if exist *.jar 	del *.jar
		@if exist *.class 	del *.class
                $(JAVAC) LTOOLSapplet.java
                $(JAR)   -cf LTOOLSgui.jar  *.class
                @if exist ..\..\bin\LTOOLSgui.jar del ..\..\bin\LTOOLSgui.jar
                @copy LTOOLSgui.jar 	..\..\bin
                @copy LTOOLSgui.jar 	..\..\bin.unx
                @copy LTOOLSgui*.htm 	..\..\bin
                @copy LTOOLSgui*.htm 	..\..\bin.unx
                @copy LTOOLSapp*.htm 	..\..\bin
                @copy LTOOLSapp*.htm 	..\..\bin.unx
                @copy LTOOLSgui.bat 	..\..\bin
                @copy LTOOLSgui.sh 	..\..\bin.unx\LTOOLSgui
                @copy runit.bat     	..\..\bin
                @copy edit.bat		..\..\bin
		@copy .java.policy	..\..\bin
		@copy .java.policy  ..\..\bin.unx
                @if not exist ..\..\bin\images mkdir ..\..\bin\images
                @if not exist ..\..\bin.unx\images mkdir ..\..\bin.unx\images
                @if not exist ..\..\bin\temp mkdir ..\..\bin\temp
                @if not exist ..\..\bin.unx\temp mkdir ..\..\bin.unx\temp
                @copy images\*.gif ..\..\bin\images
                @copy images\*.gif ..\..\bin.unx\images

exe:
                sj -O -obj -link lreadgui.exe -main lreadgui @lreadgui.lnk

clean:
		@if exist *.obj   del *.obj
		@if exist *.sym   del *.sym
		@if exist *.bak   del *.bak
		@if exist *.exe   del *.exe
                @if exist *.class del *.class
                @if exist *.jar   del *.jar
                @if exist zzz.*   del zzz.*
                @if exist ..\..\bin\zzz.*   del ..\..\bin\zzz.*
