# Last edited on 2013-01-05 01:49:13 by stolfilocal .PHONY: \ all \ all-classes package-classes \ test-detection \ clean tarball # all: all-classes all: test-detection # ---------------------------------------------------------------------- # Java compilation PACKAGES := \ JKernelMachines \ Segmentation \ kruskal \ main \ structures \ thog \ utils \ xml \ SOURCES := ${wildcard ${addsuffix /*.java,${PACKAGES}}} CLASSES := ${subst .java,.class,${SOURCES}} all-classes: for dir in ${PACKAGES} ; do \ ( cd $$dir && make -f ../Makefile package-classes ) ; \ done package-classes: javac -classpath '..:../JKernelMachines/colt.jar' -encoding "UTF-8" ${wildcard *.java} # ---------------------------------------------------------------------- # Test of sliding window detector THOG_IN_IMAGE := data/dPICT0073.jpg THOG_THRESHOLD := 0.5 THOG_CLASSIFIER := data/hog.obj THOG_PARAMS := data/1_7_9.txt THOG_OUT_IMAGE := out/dPICT0073 test-detection: all-classes ${CLASSES} mkdir -p out debug -rm -f out/*.png debug/*.png java -ea main.detection ${THOG_IN_IMAGE} ${THOG_THRESHOLD} ${THOG_CLASSIFIER} ${THOG_PARAMS} ${THOG_OUT_IMAGE} # ---------------------------------------------------------------------- # Cleanup # "make clean" removes derived files and test outputs: clean: /bin/rm -f .dummy *.class *.did /bin/rm -f out/* # ---------------------------------------------------------------------- # Archiving # "make tarball" creates a tar-gzip of everything useful: TARBALL_NAME := java-FloatImage-js TODAY := ${shell date '+%Y-%m-%d-%H%M%S'} THIS_DIR := Detector tarball: ( cd .. && tar -cvzf ${TARBALL_NAME}-${TODAY}.tgz \ ${THIS_DIR}/*/*.java ${THIS_DIR}/Makefile ${THIS_DIR}/00-README \ ${THIS_DIR}/data/*.{png,jpg} \ )