Old Makefile.OS2.old
1 #
2 # mpage: A program to reduce pages of print so that several pages
3 # of output appear on one sheet of paper.
4 #
5 # Copyright (c) 1988 Mark P. Hahn, Herndon, Virginia
6 # Copyright (c) 1994-1997 Marcel J.E. Mol, The Netherlands
7 # marcel@mesa.nl
8 #
9 # Written by:
10 # ...!uunet!\ Mark Hahn, Sr Systems Engineer
11 # >pyrdc!mark Pyramid Technology Corporation
12 # ...!pyramid!/ Vienna, Va (703)848-2050
13 #
14 #
15 # Permission is granted to anyone to make or distribute verbatim
16 # copies of this document as received, in any medium, provided
17 # that this copyright notice is preserved, and that the
18 # distributor grants the recipient permission for further
19 # redistribution as permitted by this notice.
20 #
21 #
22 # Marcel Mol MESA Consulting
23 # Hogeveenseweg 12 P.o. box 9
24 # 2631 PH Nootdorp 2270 AA Voorburg
25 # The Netherlands The Netherlands
26 # phone: 015-3101310 phone: +31-6-54724868
27 # marcel@mesa.nl info@mesa.nl
28 #
29
30 # Set this to an ANSI compatible C compiler (preferably gcc)
31 # See also system specific settings below
32 #CC=cc
33 CC=gcc
34
35 ############################################################################
36 #
37 # MPAGE Configuration
38 #
39 ############################################################################
40
41 #
42 # Define your favorite page size:
43 # PAGE_LETTER for US letter
44 # PAGE_LEGAL for legal
45 # PAGE_A4 for European A4
46 #
47 # PAGESIZE=PAGE_LETTER
48 PAGESIZE=PAGE_A4
49
50 #
51 # Define your spooler type
52 # ATT_SPOOLER for 'lp ...' type printing
53 # BSD_SPOOLER for 'lpr ..' tpye printing
54 #
55 SPOOL_TYPE=BSD_SPOOLER
56
57 # PREFIX=e:/usr # OS/2 type
58 PREFIX=/usr/local
59 BINDIR=$(PREFIX)/bin
60 LIBDIR=$(PREFIX)/lib
61 MANDIR=$(PREFIX)/man/man1
62
63 #
64 # A default encoding is given in encoding.h. Setting ENCODING=1 will
65 # activate this encoding by default. 0 switches default off.
66 # The -C option (without subargument) can be used to switch.
67 #
68 ENCODING=1
69
70 #
71 # Set the default sheet margin in 1/72 inches.
72 #
73 SHEETMARGIN=20
74
75
76 DEFS = -DPAGE_DEF=${PAGESIZE} -DLIBDIR=\"${LIBDIR}/mpage\" -DDEFAULT_ENCODING=${ENCODING} -DDEFAULTSMARGIN=${SHEETMARGIN} -DSPOOLER=${SPOOL_TYPE}
77
78 ############################################################################
79 #
80 # OPERATING SYSTEM SETUP
81 #
82 ############################################################################
83
84 # Unix extensions
85 E =
86 O = .o
87 DEF_FILE =
88
89 # OS/2:
90 # CFLAGS = -O2 -s -DOS2 $(DEFS) -Wall
91 # LIBS = -Zomf -Zcrtdll
92 # DEF_FILE = mpage.defM
93
94 # E = .exe
95 # O = .o
96 # pattern rules (OS/2)
97 # %$(O): %.c
98 # $(CC) $(CFLAGS) -c -o $@ $<
99
100 # MSDOS extensions
101 # E = .exe
102 # O = .obj
103
104 ############################################################################
105 #
106 # UNIXEN SPECIFICS
107 #
108 ############################################################################
109
110 # Choose one of the following CFLAGS/CC definitions:
111 # If you are using gcc, you probably don't need to change anything here.
112
113 # Linux:
114 CFLAGS = -O2 -s $(DEFS) -Wall
115
116 # AIX (xlC on aix 4):
117 #CFLAGS = -O2 -s $(DEFS)
118
119 # SunOS 4.1.3_U1 1 sun4m (gcc 2.7.2)
120 #CFLAGS = -O2 -s $(DEFS) -D__USE_FIXED_PROTOTYPES__ -Wall
121
122 # SunOS 4.1.3_U1 1 sun4m (standard C-compiler (NOTE: sample.c will not
123 # compile, since the standard cc is not ANSI-standard)
124 #CFLAGS = -O2 -s $(DEFS)
125
126 # HP-UX A.09.01 A 9000/735 (standard cc)
127 #CFLAGS = -Aa +O3 -s $(DEFS) -D_INCLUDE_POSIX_SOURCE -Wall
128
129 # BeOS
130 #CFLAGS= -O2 $(DEFS)
131
132 ############################################################################
133 #
134 # END OF CONFIGURATION OPTIONS
135 #
136
137
138 HEAD = mpage.h
139 DENC = encoding.h
140 SRCS = mpage.c glob.c text.c post.c file.c page.c args.c
141 MOBJ = mpage$(O) glob$(O) text$(O) post$(O) file$(O) page$(O) args$(O)
142 SMPL = sample.c page.c glob.c args.c
143 SOBJ = sample$(O) page$(O) glob$(O) args$(O)
144
145 default: mpage$(E) msample$(E)
146 @echo Done!
147
148 mpage$(E): $(MOBJ)
149 $(CC) $(CFLAGS) -o mpage$(E) $(MOBJ) $(LIBS) $(DEF_FILE)
150
151 msample$(E): $(SOBJ)
152 $(CC) $(CFLAGS) -o msample$(E) $(SOBJ) $(LIBS) $(DEF_FILE)
153
154 clean:
155 rm -rf $(MOBJ) mpage$(E) mpage.ps $(SOBJ) msample$(E) make.log core
156
157 mpage$(O): $(HEAD) $(DENC) mpage.c
158 glob$(O): $(HEAD) glob.c
159 text$(O): $(HEAD) text.c
160 post$(O): $(HEAD) post.c
161 file$(O): $(HEAD) file.c
162 page$(O): $(HEAD) page.c
163 args$(O): $(HEAD) args.c
164 sample$(O): $(HEAD) sample.c
165
166 mpage.ps: mpage.1
167 psroff -t -man mpage.1 > mpage.ps
168
169
170 #
171 # add your proper install stuff
172 #
173 install:
174 if [ ! -d $(LIBDIR)/mpage ] ; then mkdir -p $(LIBDIR)/mpage ; fi
175 if [ ! -d $(BINDIR) ] ; then mkdir -p $(BINDIR) ; fi
176 if [ ! -d $(MANDIR) ] ; then mkdir -p $(MANDIR) ; fi
177 cp mpage$(E) $(BINDIR)
178 cp mpage.1 $(MANDIR)
179 -cp Encodings/* $(LIBDIR)/mpage
180 -chmod 644 $(LIBDIR)/mpage/*
181 -chmod 644