1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
#
# Makefile for the lpr/lpd magic filter
#
# Copyright 1995 Yggdrasil Computing, Inc
#
#
# Define the following to suit your taste
#
srcdir = @srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = ${exec_prefix}/bin
mansec=8
mandir = ${prefix}/man/man${mansec}
CC = @CC@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
RM = rm -f
SED = sed
INSTALL = @INSTALL@
INSTALL_EXEC = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
#
# These defines control the sending of mail notices to people who submit
# bad jobs (PostScript to non-PS printers, or trying to print binaries.)
#
# This may not work if the hostname lpd knows about is not necessary a
# valid mail address (for example, if you can submit print jobs from
# non-mailer machines without MX records). If so, define -DNOMAIL.
#
# -DNOMAIL Disable sending of rejection mail notices
# -DSENDMAIL="path" Where is your mail transport agent?
# -DBANG_ADDRESS To send to "host!user" instead of "user@host"
#
# If <paths.h> exist and contains _PATH_SENDMAIL, it will be used unless
# overridden here
#
SYSOPT=
.c.o:
${CC} ${CFLAGS} ${SYSOPT} -c $<
.PHONY: all filters clean distclean install install_filters
OBJS = magicfilter.o parseconfig.o loadconfig.o
all: magicfilter magicfilter.man filters
filters:
cd filters; make
install: magicfilter magicfilter.man
${INSTALL_EXEC} magicfilter ${bindir}/magicfilter
${INSTALL_DATA} magicfilter.man ${mandir}/magicfilter.${mansec}
install_filters:
cd filters; make install
clean:
-cd filters; make clean
-${RM} magicfilter magicfilter.man *.o
distclean: clean
-cd filters; make distclean
-${RM} *~ Makefile config.cache config.log config.status config.h
magicfilter: ${OBJS}
${CC} ${LDFLAGS} -o magicfilter ${OBJS} ${LIBS}
magicfilter.o: magicfilter.c magicfilter.h
parseconfig.o: parseconfig.c magicfilter.h
loadconfig.o: loadconfig.c magicfilter.h
magicfilter.man: magicfilter.man.in
${SED} -e "s:XXX_BINDIR_XXX:${bindir}:g" < magicfilter.man.in | \
${SED} -e "s:///*:/:g" > magicfilter.man
|