# Makefile for atomic structure # Last edited on 2022-07-24 11:35:56 by stolfi STRUC_NAME := trisodium_pentaborate SHELL := /bin/bash # Runs POV-Ray on file "main.pov" to produce # image "main.png". # Image size: WIDTH := 1000 HEIGHT := 750 # Should images be displayed automatically? SHOW := YES # Should filter error messages (0 or 1): FILTER := 1 # Will cast {NRAYS^2} rays per pixel: NRAYS := 2 # Directories where POV-Ray is installed: POVRAY := /usr/bin/povray POVINC := \ +L/usr/share/povray-3.7/include \ +L../tools/ttf\ +L../tools # ---------------------------------------------------------------------- NAME := main MAIN := main all: -/bin/rm -f ${NAME}.png out/* ${MAKE} image clean:: -/bin/rm -f ${NAME}.png out/* -/bin/rm -f ${NAME}-*.png ${NAME}-*.log ${NAME}.log # ---------------------------------------------------------------------- # Auxiliary source files should be named "*.inc". # Image fiels used for textures etc. shoud be named "pic-*.png" or "pic-*.jpg". STRUC_INC := ${STRUC_NAME}.inc STRUC_COORDS := ${STRUC_NAME}_coords.txt STRUC_bo_anion := 1 # If 1, shows only the B-O anion only. STRUC_one_sheet := 1 # If 1, shows a single sheet only. STRUC_x_cells := 1 # If 1, shows copies of the structure in adjacent {x} cells. STRUC_y_cells := 0 # If 1, shows copies of the structure in adjacent {y} cells. STRUC_z_cells := 1 # If 1, shows copies of the structure in adjacent {z} cells. ${STRUC_INC}: Makefile ${STRUC_COORDS} atom_coords_to_pov.gawk atom_coords_to_pov.gawk \ -v bo_anion=${STRUC_bo_anion} \ -v one_sheet=${STRUC_one_sheet} \ -v x_cells=${STRUC_x_cells} \ -v y_cells=${STRUC_y_cells} \ -v z_cells=${STRUC_z_cells} \ < ${STRUC_COORDS} \ > ${STRUC_INC} # Input files except "main.pov": OTHERINPUTS := \ Makefile STATIC.make MOVIE.make \ ${STRUC_INC} \ ${wildcard {,../tools/}*.inc pic-*.{png,jpg,JPG} } # These are defined with "=" rather than ":=" in order to defer expansion DIRTAIL = ${shell pwd | sed -e 's:^.*/::'} # Full name of POV-ray executable: POVRAY := povray # Command to display resultin image: IMVIEW := display -title '%d/%f' include MOVIE.make # include STATIC.make