groff before CVS: release 1.05
[s-roff.git] / ps / Makefile
blob599389f7be582fd7a5b76ac9effe29b643144bb3
1 #Copyright (C) 1989, 1990, 1991 Free Software Foundation, Inc.
2 # Written by James Clark (jjc@jclark.uucp)
4 #This file is part of groff.
6 #groff is free software; you can redistribute it and/or modify it under
7 #the terms of the GNU General Public License as published by the Free
8 #Software Foundation; either version 1, or (at your option) any later
9 #version.
11 #groff is distributed in the hope that it will be useful, but WITHOUT ANY
12 #WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 #FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 #for more details.
16 #You should have received a copy of the GNU General Public License along
17 #with groff; see the file LICENSE. If not, write to the Free Software
18 #Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
20 # define PAGE to be letter if your PostScript printer uses 8.5x11 paper (USA)
21 # and define it to be A4, if it uses A4 paper (rest of the world)
22 PAGE=A4
23 #PAGE=letter
24 BINDIR=/usr/local/bin
25 CC=g++
26 BROKEN_SPOOLER_FLAGS=0
27 CFLAGS=-g
28 OLDCC=gcc
29 OLDCFLAGS=-g
30 MLIBS=-lm
31 INCLUDES=-I../driver -I../lib
32 LDFLAGS=-g
33 OBJECTS=ps.o psrm.o
34 SOURCES=ps.c psrm.c ps.h
35 MISC=Makefile devgps
36 BINDIR=/usr/local/bin
37 FONTDIR=/usr/local/lib/groff/font
38 MACRODIR=/usr/local/lib/groff/tmac
39 ETAGS=etags
40 ETAGSFLAGS=-p
42 .c.o:
43 $(CC) -c $(INCLUDES) $(CFLAGS) $<
45 all: grops psbb pfbtops devps
47 grops: $(OBJECTS) ../driver/libdriver.a ../lib/libgroff.a
48 $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \
49 ../driver/libdriver.a ../lib/libgroff.a $(MLIBS)
51 ps.o: broken.h ps.h ../driver/printer.h ../driver/driver.h ../lib/font.h \
52 ../lib/stringclass.h ../lib/cset.h
54 psrm.o: ps.h ../driver/printer.h ../driver/driver.h ../lib/font.h \
55 ../lib/stringclass.h ../lib/cset.h
57 broken.h: FORCE
58 @$(SHELL) ../gendef $@ "BROKEN_SPOOLER_FLAGS=$(BROKEN_SPOOLER_FLAGS)"
60 psbb: psbb.o
61 $(OLDCC) $(LDFLAGS) -o $@ psbb.o
63 psbb.o: psbb.c
64 $(OLDCC) $(OLDCFLAGS) -c psbb.c
66 pfbtops: pfbtops.o ../lib/libgroff.a
67 $(OLDCC) $(LDFLAGS) -o $@ pfbtops.o ../lib/libgroff.a
69 pfbtops.o: pfbtops.c
70 $(OLDCC) $(OLDCFLAGS) -c pfbtops.c
72 saber_grops:
73 #load $(INCLUDES) $(CFLAGS) $(DEFINES) psrm.c ps.c \
74 -L../driver -ldriver -L../lib -lgroff -lm
76 install.bin: grops psbb pfbtops
77 -[ -d $(BINDIR) ] || mkdir $(BINDIR)
78 -rm -f $(BINDIR)/grops $(BINDIR)/psbb
79 cp grops psbb pfbtops $(BINDIR)
80 @cd devps; \
81 $(MAKE) \
82 "FONTDIR=$(FONTDIR)" "PAGE=$(PAGE)" "BINDIR=$(BINDIR)" install.bin
84 install.nobin:
85 -[ -d $(MACRODIR) ] || mkdir $(MACRODIR)
86 -rm -f $(MACRODIR)/tmac.ps
87 cp tmac.ps $(MACRODIR)
88 -rm -f $(MACRODIR)/tmac.pspic
89 cp tmac.pspic $(MACRODIR)
90 -rm -f $(MACRODIR)/tmac.psatk
91 cp tmac.psatk $(MACRODIR)
92 @echo Making install.nobin in devps
93 @cd devps; \
94 $(MAKE) \
95 "FONTDIR=$(FONTDIR)" "PAGE=$(PAGE)" "BINDIR=$(BINDIR)" install.nobin
97 install: install.bin install.nobin
100 TAGS : $(SOURCES)
101 $(ETAGS) $(ETAGSFLAGS) $(SOURCES)
103 clean:
104 -rm -f *.o psbb pfbtops core grops broken.h
106 distclean: clean
107 -rm -f TAGS
109 realclean: distclean
111 devps: FORCE
112 @echo Making all in devps
113 @cd devps; $(MAKE) "FONTDIR=$(FONTDIR)" "PAGE=$(PAGE)" all
115 FORCE: