1# Makefile for the "fax" subtree 2# of mgetty+sendfax 3# 4# SCCS: $Id: Makefile,v 4.9 2006/02/22 17:25:30 gert Exp $ Copyright (c) Gert Doering 5# 6 7CC=gcc 8CFLAGS=-O2 -I.. -Wall 9INSTALL_PROGRAM=install -s -c 10 11FAX_SCRIPTS=faxspool faxrunq faxq faxrm 12 13zigzag: 14 cd .. ; $(MAKE) subdirs 15 16all: $(FAX_SCRIPTS) faxrunqd faxheader faxq-helper 17 18faxspool: faxspool.in ../sedscript 19 ../sedscript <faxspool.in >faxspool 20 21faxrunq: faxrunq.in ../sedscript 22 ../sedscript <faxrunq.in >faxrunq 23 24faxrunqd: faxrunqd.in ../sedscript 25 ../sedscript <faxrunqd.in >faxrunqd 26 27faxq: faxq.in ../sedscript 28 ../sedscript <faxq.in >faxq 29 30faxrm: faxrm.in ../sedscript 31 ../sedscript <faxrm.in >faxrm 32 33faxheader: faxheader.in ../sedscript 34 ../sedscript <faxheader.in >faxheader 35 36../sedscript: ../policy.h ../Makefile ../mksed.c 37 @cd .. ; $(MAKE) sedscript 38 39faxq-helper: faxq-helper.o 40 $(CC) $(CFLAGS) -o faxq-helper faxq-helper.o 41 42faxq-helper.o: faxq-helper.c ../sedscript 43 $(CC) $(CFLAGS) -DFAX_SPOOL_OUT=\"$(FAX_SPOOL_OUT)\" \ 44 -DFAX_OUT_USER=\"$(FAX_OUT_USER)\" \ 45 -DFAX_ALLOW=\"$(CONFDIR)/fax.allow\" \ 46 -DFAX_DENY=\"$(CONFDIR)/fax.deny\" \ 47 -c faxq-helper.c 48 49clean: 50 -rm -f $(FAX_SCRIPTS) faxrunqd faxheader faxq-helper *.o 51 52install: all 53# 54# programs / scripts 55# 56 -for i in $(FAX_SCRIPTS); do \ 57 $(INSTALL) -m 755 $$i $(STAGEDIR)$(BINDIR) ; \ 58 done 59 $(INSTALL) -m 755 faxrunqd $(STAGEDIR)$(SBINDIR) 60 $(INSTALL_PROGRAM) faxq-helper $(STAGEDIR)$(LIBDIR) 61# 62# data files 63# 64 $(INSTALL) -m 644 cour25.pbm $(STAGEDIR)$(LIBDIR) 65 $(INSTALL) -m 644 cour25n.pbm $(STAGEDIR)$(LIBDIR) 66 $(INSTALL) -m 644 faxheader $(STAGEDIR)$(CONFDIR) 67# 68# /etc/magic 69# 70 -@test -r /etc/magic && \ 71 if grep "string.*P1" /etc/magic >/dev/null ; then : ; \ 72 else \ 73 echo "WARNING: no PBM magic (string P1) found in /etc/magic" ; \ 74 echo " maybe you should append the definitions in \`\`fax/etc-magic''." ; \ 75 fi 76# 77# faxspool.rules sample file 78# 79 $(INSTALL) -m 644 faxspool.rules $(STAGEDIR)$(CONFDIR)/faxspool.rules.sample 80