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 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183
|
#
# mpage: A program to reduce pages of print so that several pages
# of output appear on one sheet of paper.
#
# Copyright (c) 1994-2004 Marcel J.E. Mol, The Netherlands
# Copyright (c) 1988 Mark P. Hahn, Herndon, Virginia
#
# Permission is granted to anyone to make or distribute verbatim
# copies of this document as received, in any medium, provided
# that this copyright notice is preserved, and that the
# distributor grants the recipient permission for further
# redistribution as permitted by this notice.
#
# Marcel Mol MESA Consulting
# Hogeveenseweg 12 P.o. box 112
# 2631 PH Nootdorp 2630 AC Nootdorp
# The Netherlands The Netherlands
# phone: 015-3101310 phone: +31-6-54724868
# marcel@mesa.nl info@mesa.nl
# http://www.mesa.nl/pub/mpage
# ftp://ftp.mesa.nl/pub/mpage
#
# Amiga SAS/C adjustments by Andreas R. Kleinert <info@ar-kleinert.de> 1999
# Set this to an ANSI compatible C compiler (preferably gcc)
# See also system specific settings below
#CC=cc
CC=gcc
############################################################################
#
# MPAGE Configuration
#
############################################################################
#
# Define your favorite page size:
# Letter for US letter
# Legal for legal
# A4 for European A4
# See glob.c for all possibilities
#
# PAGESIZE=Letter
PAGESIZE=A4
#
# Define your spooler type
# ATT_SPOOLER for 'lp ...' type printing
# BSD_SPOOLER for 'lpr ..' tpye printing
#
SPOOL_TYPE=BSD_SPOOLER
# PREFIX=e:/usr # OS/2 type
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
LIBDIR=$(PREFIX)/lib
MANDIR=$(PREFIX)/man/man1
#
# A default encoding is given in encoding.h. Setting ENCODING=1 will
# activate this encoding by default. 0 switches default off.
# The -C option (without subargument) can be used to switch.
#
ENCODING=1
#
# Set the default sheet margin in 1/72 inches.
#
SHEETMARGIN=20
DEFS = -DPAGE_DEF=\"${PAGESIZE}\" -DLIBDIR=\"${LIBDIR}/mpage\" -DDEFAULT_ENCODING=${ENCODING} -DDEFAULTSMARGIN=${SHEETMARGIN} -DSPOOLER=${SPOOL_TYPE}
############################################################################
#
# OPERATING SYSTEM SETUP
#
############################################################################
# Unix extensions
E =
O = .o
# OS/2:
# CFLAGS = -O2 $(DEFS) -Wall
# LIBS = -Zcrtdll -s
# DEF_FILE = mpage.defM
# E = .exe
# O = .o
# MSDOS extensions
# E = .exe
# O = .obj
# AMIGA 68k
CC=scppc
CFLAGS =
############################################################################
#
# UNIXEN SPECIFICS
#
############################################################################
# Choose one of the following CFLAGS/CC definitions:
# If you are using gcc, you probably don't need to change anything here.
# Linux:
#CFLAGS = -O2 -s $(DEFS) -Wall
# AIX (xlC on aix 4):
#CFLAGS = -O2 -s $(DEFS)
# SunOS 4.1.3_U1 1 sun4m (gcc 2.7.2)
#CFLAGS = -O2 -s $(DEFS) -D__USE_FIXED_PROTOTYPES__ -Wall
# SunOS 4.1.3_U1 1 sun4m (standard C-compiler (NOTE: sample.c will not
# compile, since the standard cc is not ANSI-standard)
#CFLAGS = -O2 -s $(DEFS)
# HP-UX A.09.01 A 9000/735 (standard cc)
#CFLAGS = -Aa +O3 -s $(DEFS) -D_INCLUDE_POSIX_SOURCE -Wall
# BeOS
#CFLAGS= -O2 $(DEFS)
############################################################################
#
# END OF CONFIGURATION OPTIONS
#
# pattern rules. Should we define these?
%$(O): %.c
$(CC) $(CFLAGS) -c -o $@ $<
HEAD = mpage.h
DENC = encoding.h
SRCS = mpage.c glob.c text.c post.c file.c page.c args.c
MOBJ = mpage$(O) glob$(O) text$(O) post$(O) file$(O) page$(O) args$(O)
SMPL = sample.c page.c glob.c args.c
SOBJ = sample$(O) page$(O) glob$(O) args$(O)
default: mpage$(E) msample$(E)
@echo Done!
mpage$(E): $(MOBJ)
ppc-amigaos-ld -r lib:c_ppc.o $(MOBJ) LIB:scppc.a lib:end.o -o mpage.elf
Protect mpage.elf +e
msample$(E): $(SOBJ)
ppc-amigaos-ld -r lib:c_ppc.o $(SOBJ) LIB:scppc.a lib:end.o -o msample.elf
Protect msample.elf +e
clean:
rm -rf $(MOBJ) mpage$(E) mpage.ps $(SOBJ) msample$(E) make.log core
mpage$(O): $(HEAD) $(DENC) mpage.c
glob$(O): $(HEAD) glob.c
text$(O): $(HEAD) text.c
post$(O): $(HEAD) post.c
file$(O): $(HEAD) file.c
page$(O): $(HEAD) page.c
args$(O): $(HEAD) args.c
sample$(O): $(HEAD) sample.c
mpage.ps: mpage.1
psroff -t -man mpage.1 > mpage.ps
#
# add your proper install stuff
#
install:
if [ ! -d $(LIBDIR)/mpage ] ; then mkdir -p $(LIBDIR)/mpage ; fi
if [ ! -d $(BINDIR) ] ; then mkdir -p $(BINDIR) ; fi
if [ ! -d $(MANDIR) ] ; then mkdir -p $(MANDIR) ; fi
cp mpage$(E) $(BINDIR)
cp mpage.1 $(MANDIR)
-cp Encodings/* $(LIBDIR)/mpage
-chmod 644 $(LIBDIR)/mpage/*
|