# Last edited on 2016-08-19 22:27:11 by stolfilocal EXDIR := $${STOLFIHOME}/bureau/ic-3/palco-2007-05/fig # DO_FIGS = ${SPEC_FIGS} DO_FIGS := \ 800:600:fig_216_room_5 LATER_FIGS := \ fig_220_room_5_t.pov \ fig_910_test_chair.pov \ fig_930_test_human.pov \ fig_960_test_basics.pov SPEC_FIGS := TEST_FIGS := ALL_FIGS := \ \ ${TEST_FIGS} \ \ ${SPEC_FIGS} DONT_DO_FIGS := JUNK_FIGS := INCLUDES := .PHONY: all single cleanup image showimage export all: for fig in ${DO_FIGS} ; do \ ${MAKE} FIGARGS=$$fig single showimage ; \ done export: ${EXDIR} for fig in ${DO_FIGS} ; do \ ${MAKE} FIGARGS=$$fig export-single ; \ done ###################################################################### # Sub-makefile - caller must define ${FIGARGS} FIGARGS := FIGARGS.IS.UNDEFINED ifneq "/${FIGARGS}" "/FIGARGS.IS.UNDEFINED" FIELDS := ${subst :, ,${FIGARGS}} WIDTH := ${word 1,${FIELDS}} HEIGHT := ${word 2,${FIELDS}} FIG := ${word 3,${FIELDS}} ICONFIG = ${FIG}-i POVPUB = /usr POVRAY = ${POVPUB}/bin/povray POVINC = ${POVPUB}/share/povray-3.7/include POVTTF = $${STOLFIHOME}/ttf IMVIEW = display -title '%d/%f' CONVERT = convert # single: image showimage single: image @echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" cleanup: -/bin/rm -f ${FIG}.png image: ${FIG}.png showimage: ${FIG}.png -${IMVIEW} ${FIG}.png NRAYS := 1 ${FIG}.png: ${FIG}.pov ${INCLUDES} @echo "@@@ ${FIG} @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" -/bin/rm -f ${FIG}.png nice ${POVRAY} \ +FN +Q9 \ +W${WIDTH} +H${HEIGHT} \ +AM1 +A0.0 +R${NRAYS} \ +D +SP32 +EP4 \ +L${POVINC} \ +L${POVTTF} \ +I${FIG}.pov \ +O${FIG}.png ICONHEIGHT := 100 ${ICONFIG}.jpg: ${FIG}.png convert ${FIG}.png \ -quality 99 \ -resize 'x${ICONHEIGHT}' \ ${ICONFIG}.jpg export-single: ${FIG}.png ${ICONFIG}.jpg cp -av ${FIG}.png ${ICONFIG}.jpg ${EXDIR} endif # End ${FIGARGS} sub-makefile. ###################################################################### ALL_PNGS := ${addsuffix .png,${patsubst %:,,${patsubst %:,,${ALL_FIGS}}}} debug: @echo "${ALL_PNGS}"