# Last edited on 2011-05-07 07:57:18 by stolfi SHELL := /bin/bash ####################################################################### # Makefile to render a single frame # Caller must define # ${OUT_DIR} = output directory. # ${NAME} = name of image to render minus "${OUT_DIR}/" and ".png". # ${WIDTH} = width of image(s). # ${HEIGHT} = height of image(s). # ${NRAYS} = subsampling order (1,2,...). # ${CLOCK} = Clock value, in the proper format. # ${SHOWOPT} = POV-Ray's '+D' or '-D' flag. ifneq "/${OUT_DIR}" "/" ifneq "/${NAME}" "/" ifneq "/${WIDTH}" "/" ifneq "/${HEIGHT}" "/" ifneq "/${NRAYS}" "/" ifneq "/${CLOCK}" "/" ifneq "/${SHOWOPT}" "/" ifneq "@${wildcard ${HOME}/pkg/povray-3.50c-1}" "@" # For private installation e.g. manaus.ic.unicamp.br POVRAY := ${HOME}/bin/${PLATFORM}/povray POVINC := ${HOME}/pkg/povray-3.50c-1/povray-3.50c/include endif ifneq "@${wildcard /usr/bin/povray}" "@" # For HP laptop POVINC := /usr/share/povray/include POVRAY := /usr/bin/povray endif ifneq "@${wildcard /usr/local/bin/povray}" "@" # For cratera.ic.unicamp.br POVINC := /usr/local/share/povray-3.6/include POVRAY := /usr/local/bin/povray endif POVTTF := tt-fonts .PHONY:: render-frame clean-frame # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # "make render-frame" creates the frame with given ${CLOCK} value. FRAME_NAME := ${NAME}-${CLOCK} FRAME_PNG := ${OUT_DIR}/${FRAME_NAME}.png INC_IMG_FILES := ${wildcard *.inc texmaps/*.png} render-frame: ${FRAME_PNG} ${FRAME_PNG}: ${NAME}.pov ${INC_IMG_FILES} -/bin/rm -f ${FRAME_PNG} ${POVRAY} +K${CLOCK} \ +FN +Q9 +MB1 \ +W${WIDTH} +H${HEIGHT} \ +AM1 +A0.0 +R${NRAYS} \ ${SHOWOPT} +SP32 +EP4 \ +L${POVINC} \ +L${POVTTF} \ +I${NAME}.pov \ +O${FRAME_PNG} \ 2>&1 | ./povray-output-filter.gawk # End ${OUT_DIR}, ${NAME}, ${WIDTH}, ${HEIGHT}, ${NRAYS}, ${CLOCK}, ${SHOWOPT} section ###################################################################### endif endif endif endif endif endif endif