SRCS:=$(shell find . -name "*.java")

OBJS:=${SRCS:.java=.class}

CXX=javac
CURDIR:=$(shell pwd | sed 's/.*\///')
CXXFLAGS=-deprecation

.PHONY: all clean msg

all: msg $(OBJS)

msg:
	@echo " ** These tools require the JDK 1.4 or higher.  1.3 should work, but isn't **"
	@echo " ** tested.  These files are _not_ necessary for development.  If errors   **"
	@echo " ** occur, you can remove the tools/mon/Makefile and continue without it.  **"

%.class: %.java
	$(if $(shell which $(CXX)), \
		@echo "Compiling $< into $@..."; $(CXX) $(CXXFLAGS) $<, \
		@printf "\n\n  ***** WARNING: You don't have java... skipping TekkotsuMon *****\n\n\n" \
	)

clean:
	rm -f $(OBJS) *~ 
