# Makefile to process POV-Ray lab hand-in files - ANIMATIONS # Last edited on 2019-04-17 03:51:52 by stolfilocal ###################################################################### # Creates a strip of still images. # Caller must define ${NAME}, ${TAG}, ${WIDTH}, ${HEIGHT}. # The root source file will be ${NAME}.pov. # The output strip image will be ${NAME}-${TAG}.png. # NAME := NAME.IS.UNDEFINED ifneq "${NAME}" "NAME.IS.UNDEFINED" TAG := TAG.IS.UNDEFINED ifneq "${TAG}" "TAG.IS.UNDEFINED" WIDTH := WIDTH.IS.UNDEFINED ifneq "${WIDTH}" "WIDTH.IS.UNDEFINED" HEIGHT := HEIGHT.IS.UNDEFINED ifneq "${HEIGHT}" "HEIGHT.IS.UNDEFINED" STRIPNAME := ${NAME}-${TAG} STRIPPNG := ${STRIPNAME}.png POVFILE := ${NAME}.pov OTHERINPUTS := ${filter-out ${NAME}-%, ${wildcard *.inc pic-*.png }} STRIPRAYS := 1 STRIPCLOCKS := \ 0.0000 0.0714 0.1429 0.2143 0.2857 \ 0.3571 0.4286 0.5000 0.5714 0.6429 \ 0.7143 0.7857 0.8571 0.9286 1.0000 STRIPFRAMES := ${addprefix ${STRIPNAME}-,${addsuffix .png,${STRIPCLOCKS}}} all: ${STRIPPNG} ${STRIPPNG}: ${POVFILE} ${OTHERINPUTS} -/bin/rm -f ${STRIPPNG} for clock in ${STRIPCLOCKS} ; do \ ${MAKE} -f FRAME.make \ NAME=${NAME} TAG=${TAG} \ WIDTH=${WIDTH} HEIGHT=${HEIGHT} NRAYS=${STRIPRAYS} \ CLOCK=$$clock SHOW=NO \ all; \ done ./tile-movie-frames.sh \ -ncols 5 \ ${STRIPPNG} \ ${STRIPFRAMES} if [[ -s ${STRIPPNG} ]]; then ${IMVIEW} ${STRIPPNG} ; fi endif # ${HEIGHT} endif # ${WIDTH} endif # ${TAG} endif # ${NAME} # End ######################################################################