# This is a generic makefile for peps-2.0 # You may need to edit GSPATH or set it in # your environment before running this makefile. # Set it to wherever Ghostscript is on your system. # # Similarly, set GZPATH to wherever gzip is. # # If you do NOT want the gzip compression to be the # CGI default, set GZIPIT = 0. If you want it to be # the default, CGI or not, set GZIPIT = 1. If you # want it to be the CGI default except for PNG # output, set GZIPIT = 2. # # If you want PNM to be the default output format # (as it was in peps-1.0), define PNMDEFAULT = 1 # (or any non-zero integer). # # I believe that HTTP_ACCEPT_ENCODING is used by # all major web servers to inform CGI software what # encoding a browser accepts. If your web server uses # a different environment variable for this purpose, # define HAE to it. # # If you want peps.mime somewhere ther than /etc, # define ETC to a different path (with no trailing slash). # # The BINEXT variable is for cygwin users who should # set it to .exe as in: # env BINEXT=.exe make install clean # ##################################################################### # # The same source code is used for xpeps as for peps. # Two additional variables are definied for xpeps and may # need to be changed: # # XBINDIR tells us where to install the xpeps executable. # XGRAY tells us what Ghostscript device to use for grayscale # output. XCOLOR tells us what Ghostscript device to use # for color output. # # EVAPORATIONDELAY is the default value for the -e switch # of xpeps (has no meaning in peps). If used, the -e switch # determines how long to keep the bitmap displayed on the screen # (if not used, it is displayed until the user presses ENTER). # The default value in the source code is (((unsigned)(-1))>>1), # which is a rather large value (68 years on a 32-bit machine). # If you redefine it here to a non-0 value, you will define # the new delay in seconds. CC ?= gcc CFLAGS ?= -O3 -s PREFIX ?= /usr MAN1DIR ?= ${PREFIX}/share/man/man1 DOCDIR ?= /usr/share/doc BINDIR ?= ${PREFIX}/bin XBINDIR ?= /usr/X11R6/bin XGRAY ?= x11gray4 XCOLOR ?= x11 EVAPORATIONDELAY ?= 0 HAE ?= HTTP_ACCEPT_ENCODING BINEXT ?= GSPATH ?= `which gs` GZPATH ?= `which gzip` GZIPIT ?= 3 PNMDEFAULT ?= 0 ETC ?= /etc PROJECT = peps-2.0 DOCS = ${DOCDIR}/${PROJECT} all: peps xpeps peps: peps.c ${CC} ${CFLAGS} -DGSPATH=\"${GSPATH}\" -DPNMDEFAULT=${PNMDEFAULT} \ -DGZPATH=\"${GZPATH}\" -DGZIP=${GZIPIT} -DETC=\"${ETC}\" \ -DHAE=\"${HAE}\" -o peps peps.c touch -r peps.c peps${BINEXT} xpeps: peps.c ${CC} ${CFLAGS} -DGSPATH=\"${GSPATH}\" -DX \ -DXCOLOR=\"${XCOLOR}\" -DXGRAY=\"${XGRAY}\" \ -DEVAPORATIONDELAY=${EVAPORATIONDELAY} -o xpeps peps.c touch -r peps.c xpeps${BINEXT} install: peps install -p -m 755 peps${BINEXT} ${BINDIR} install -p -m 444 peps.1 ${MAN1DIR} install -p -m 644 peps.mime ${ETC} mkdir -m 755 -p ${DOCS} install -p -m 444 peps.pdf ${DOCS} touch -r peps.c ${DOCS} xinstall: xpeps install -p -m 755 xpeps${BINEXT} ${XBINDIR} clean: rm -f peps${BINEXT} rm -f xpeps${BINEXT}