# Set the directories of the application and the root application.
APPPATH = d:/data/isolde/tamot/parser
APPDIRS = $(APPPATH)/FSParser:$(APPPATH)/slider:$(APPPATH)/domainModel:$(APPPATH)
APP = Loader # controller

# Set the path to the java executables
JAVABIN = c:/progra~1/java/bin
JAVA = $(JAVABIN)/java
JAVAC = $(JAVABIN)/javac -classpath .

# Collect the .java source files
empty =
comma = ,
space = $(empty) $(empty)
dirs = $(subst :,$(space),$(APPDIRS))
SRCS = $(foreach dir,$(dirs),$(wildcard $(dir)/*.java))

# Now, given these sources we want to compute the class file names
CLASSES = $(addsuffix .class, $(basename $(SRCS)))

# Now we can compute our dependencies
all:  $(CLASSES)
#	Makejar
	$(JAVA) $(APP)

# Basic rule for .java files, substitute for windows path separator
%.class:%.java $(APPPATH)/Makefile
	$(JAVAC) $(subst /,\\,$<)

clean: 
	rm $(CLASSES)

