groff before CVS: release 1.05
[s-roff.git] / pic / Makefile
blob31c26cd8c46745b0f93adeb9e38299af1577c7bf
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 BINDIR=/usr/local/bin
21 CC=g++
22 CFLAGS=-g -O -Wall
23 INCLUDES=-I../lib
24 MLIBS=-lm
25 YACCFLAGS=-v
26 YACC=bison -y
27 ETAGS=etags
28 ETAGSFLAGS=-p
30 OBJECTS=pic.tab.o lex.o main.o object.o common.o troff.o tex.o # fig.o
31 SOURCES=pic.tab.c lex.c main.c object.c common.c troff.c tex.c
32 HEADERS=pic.h text.h output.h object.h common.h position.h
34 .c.o:
35 $(CC) -c $(INCLUDES) $(CFLAGS) $<
37 all: pic
39 pic: $(OBJECTS) ../lib/libgroff.a
40 $(CC) $(LDFLAGS) -o $@ $(OBJECTS) ../lib/libgroff.a $(MLIBS)
42 pic.tab.c: pic.y
43 $(YACC) $(YACCFLAGS) -d pic.y
44 mv y.tab.c pic.tab.c
45 mv y.tab.h pic.tab.h
47 PIC_H= pic.h text.h output.h position.h \
48 ../lib/lib.h ../lib/errarg.h ../lib/error.h ../lib/assert.h \
49 ../lib/stringclass.h ../lib/cset.h
51 pic.tab.o: $(PIC_H) object.h
52 object.o: $(PIC_H) object.h
53 troff.o: $(PIC_H) common.h
54 tex.o: $(PIC_H) common.h
55 # fig.o: $(PIC_H)
56 common.o: $(PIC_H) common.h
57 main.o: $(PIC_H)
58 lex.o: $(PIC_H) pic.tab.c object.h
60 saber_pic:
61 @#load $(INCLUDES) $(CFLAGS) $(SOURCES) ../lib/libgroff.a -lm
63 TAGS : $(SOURCES)
64 $(ETAGS) $(ETAGSFLAGS) $(SOURCES) $(HEADERS)
66 clean:
67 -rm -f *.o core pic
69 distclean: clean
70 -rm -f pic.output y.output TAGS
72 realclean: distclean
73 -rm -f pic.tab.c pic.tab.h
75 install.bin: pic
76 -[ -d $(BINDIR) ] || mkdir $(BINDIR)
77 -rm -f $(BINDIR)/gpic
78 cp pic $(BINDIR)/gpic
80 install.nobin:
82 install: install.bin install.nobin