#Variables
include $(SCT_DAQ_ROOT)/build/Makefile.include
#Commands
include $(SCT_DAQ_ROOT)/build/Makefile.commands

SRCS := $(shell find -name "*.java")
JARS := GuiComponents.jar
JAVAFLAGS += -d classes
JARMANIFEST := MANIFEST.MF

#Phony Targets
.PHONY: all c++ java install clean distclean

all: c++ java
distclean: clean
clean:
	-rm -f built -r classes *.jar
install: $(ShareLibDir)/$(JARS)
java: classes $(JARS) install
c++:

#Real targets
classes:
	$(MKDIR)

#Need to replace $'s with \$'s to prevent substitution - arrghhh!!!
$(JARS): built $(JARMANIFEST)
	$(JARCMD) -C classes .

built: $(SRCS)
	$(JAVACMD) && touch $@

$(ShareLibDir)/$(JARS): $(JARS)
	$(CPCMD)

