# CLEANOBJS : objets à supprimer au clean # SOURCES : sources à compiler # MAIN : object principal a executer JAVAC=javac -d $(TOP_DIR)/classes -classpath classes:jline-0.9.9.jar:${CLASSPATH} JAVA=java -classpath classes:jline-0.9.9.jar:${CLASSPATH} JAVADOC=javadoc .PHONY: all compile clean CLASS=$(SOURCES:.java=.class) vpath %.class $(TOP_DIR)/classes all: compile @mkdir -p $(TOP_DIR)/classes @for dir in ${SUBDIRS} ; do ( $(MAKE) -C $$dir ) ; done clean: rm -rf $(TOP_DIR)/classes $(TOP_DIR)/docs @for f in ${CLEANOBJS} ; do ( rm -f $$f ) ; done %.class: %.java @if test $< -nt $(shell echo $$PWD | sed s/sources/classes/)/$@; then echo "Compiling" $<; $(JAVAC) $<; fi compile: $(CLASS)