BSD 4_3_Net_2 development
[unix-history] / usr / src / usr.bin / groff / libgroff / Makefile.gnu
CommitLineData
af2a502e
C
1#Copyright (C) 1989, 1990, 1991 Free Software Foundation, Inc.
2# Written by James Clark (jjc@jclark.uucp)
3#
4#This file is part of groff.
5#
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.
10#
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.
15#
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.
19
20# FONTPATH says where to look for dev*/*
21FONTPATH=.:/usr/local/lib/groff/font:/usr/local/lib/font:/usr/lib/font
22OLDCC=gcc
23CC=g++
24AR=ar
25RANLIB=/bin/ranlib
26INCLUDES=-I.
27DEFINES=-DFONTPATH=\"$(FONTPATH)\"
28MALLOC=malloc.o
29MALLOCFLAGS=
30FMOD=#fmod.o
31STRTOL=#strtol.o
32OBJECTS=$(MALLOC) new.o itoa.o strerror.o error.o errarg.o fatal.o \
33 strsave.o matherr.o assert.o iftoa.o string.o cset.o cmap.o \
34 ptable.o font.o fontfile.o nametoindex.o filename.o lineno.o \
35 progname.o lf.o change_lf.o version.o $(FMOD) $(STRTOL)
36SOURCES=new.c itoa.c strerror.c error.c errarg.c fatal.c \
37 strsave.c matherr.c fmod.c assert.c iftoa.c \
38 string.c cset.c cmap.c ptable.c font.c fontfile.c nametoindex.c \
39 filename.c lineno.c progname.c lf.c change_lf.c version.c \
40 assert.h cset.h cmap.h errarg.h error.h font.h getpagesize.h \
41 lib.h ptable.h stringclass.h
42
43.c.o:
44 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $<
45
46all: libgroff.a
47
48libgroff.a: $(OBJECTS)
49 $(AR) r libgroff.a $?
50 if test "$(RANLIB)" ; then $(RANLIB) libgroff.a ;fi
51
52version.c: ../VERSION
53 @echo Making version.c
54 @echo const char \*version_string = \"`cat ../VERSION`\"\; >$@
55
56malloc.o: malloc.c getpagesize.h
57 $(OLDCC) $(OLDCFLAGS) $(MALLOCFLAGS) -c malloc.c
58
59itoa.o: itoa.c
60 $(OLDCC) $(OLDCFLAGS) -c itoa.c
61
62iftoa.o: iftoa.c
63 $(OLDCC) $(OLDCFLAGS) -c iftoa.c
64
65strerror.o: strerror.c
66 $(OLDCC) $(OLDCFLAGS) -c strerror.c
67
68matherr.o: matherr.c
69 $(OLDCC) $(OLDCFLAGS) -c matherr.c
70
71fmod.o: fmod.c
72 $(OLDCC) $(OLDCFLAGS) -c fmod.c
73
74strtol.o: strtol.c
75 $(OLDCC) $(OLDCFLAGS) -c strtol.c
76
77string.o: stringclass.h
78lf.o: stringclass.h
79
80TAGS : $(SOURCES)
81 etags $(ETAGSFLAGS) $(SOURCES)
82
83clean:
84 -rm -f *.o core libgroff.a version.c
85
86distclean: clean
87 -rm -f TAGS
88
89realclean: distclean
90
91install:
92install.bin:
93install.nobin: