home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / usr.bin / groff / troff / Makefile.gnu < prev    next >
Encoding:
Makefile  |  1991-04-30  |  3.1 KB  |  101 lines

  1. #Copyright (C) 1989, 1990 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. MACROPATH=.:/usr/local/lib/groff/tmac:/usr/lib/tmac
  21. # DEVICE is the default device
  22. DEVICE=ps
  23. HYPHENFILE=/usr/local/lib/groff/hyphen
  24. BINDIR=/usr/local/bin
  25. INCLUDES=-I../lib
  26. CC=g++
  27. MLIBS=-lm
  28. CFLAGS=-g -O -Wall
  29. LDFLAGS=-g
  30. DEFINES=-DMACROPATH=\"$(MACROPATH)\" -DDEVICE=\"$(DEVICE)\" \
  31.     -DHYPHENFILE=\"$(HYPHENFILE)\" \
  32.     -DSTORE_WIDTH # -DCOLUMN -DWIDOW_CONTROL -DDUMP
  33. ETAGS=etags
  34. ETAGSFLAGS=-p
  35. OBJECTS=env.o node.o input.o div.o column.o symbol.o dictionary.o \
  36.     reg.o number.o majorminor.o # dump.o unexec.o
  37.  
  38. SOURCES=env.c node.c input.c div.c column.c symbol.c dictionary.c number.c \
  39.     reg.c groff.h hvunits.h symbol.h dictionary.h env.h reg.h  \
  40.     token.h charinfo.h div.h node.h request.h
  41.  
  42. GROFF_H=groff.h ../lib/errarg.h ../lib/error.h ../lib/cset.h ../lib/lib.h
  43.  
  44. .c.o:
  45.     $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $<
  46.  
  47. all: troff
  48.  
  49. troff: $(OBJECTS) ../lib/libgroff.a
  50.     $(CC) $(LDFLAGS) -o $@ $(OBJECTS) ../lib/libgroff.a $(MLIBS)
  51.  
  52. majorminor.c: ../VERSION
  53.     @echo Making $@
  54.     @-rm -f $@
  55.     @echo const char \*major_version = \
  56.     \"`sed -e 's/^\(.*\)\..*$$/\1/' ../VERSION`\"\; >$@
  57.     @echo const char \*minor_version = \
  58.     \"`sed -e 's/^.*\.\(.*\)$$/\1/' ../VERSION`\"\; >>$@
  59.  
  60. dictionary.o: dictionary.h $(GROFF_H) symbol.h
  61. symbol.o: $(GROFF_H) symbol.h
  62. number.o: div.h env.h $(GROFF_H) hvunits.h symbol.h token.h
  63. reg.o : $(GROFF_H) symbol.h dictionary.h token.h request.h reg.h
  64. div.o: dictionary.h div.h env.h $(GROFF_H) hvunits.h \
  65.     node.h reg.h request.h symbol.h token.h
  66. env.o:  charinfo.h dictionary.h div.h env.h $(GROFF_H) \
  67.     hvunits.h node.h reg.h request.h symbol.h token.h
  68. input.o: charinfo.h dictionary.h div.h env.h $(GROFF_H) \
  69.     hvunits.h node.h reg.h request.h symbol.h token.h
  70. node.o: charinfo.h dictionary.h env.h reg.h \
  71.     $(GROFF_H) hvunits.h node.h request.h symbol.h \
  72.     token.h ../lib/font.h
  73. column.o: dictionary.h div.h env.h $(GROFF_H) hvunits.h \
  74.     node.h reg.h request.h symbol.h token.h ../lib/stringclass.h
  75.  
  76. TAGS : $(SOURCES)
  77.     $(ETAGS) $(ETAGSFLAGS) $(SOURCES)
  78.  
  79. clean:
  80.     -rm -f *.o core troff gmon.out mon.out majorminor.c
  81.  
  82. distclean: clean
  83.     -rm -f TAGS
  84.  
  85. realclean: distclean
  86.  
  87. install.bin : troff
  88.     -[ -d $(BINDIR) ] || mkdir $(BINDIR)
  89.     cp troff $(BINDIR)/gtroff
  90.  
  91. install.nobin:  hyphen
  92.     cp hyphen $(HYPHENFILE)
  93.  
  94. install: install.bin install.nobin
  95.  
  96. # dump.o: dump.c config.h
  97. #    cc -g $(DUMPFLAG) -c dump.c
  98. #
  99. # unexec.o: unexec.c config.h
  100. #    cc -g $(DUMPFLAG) -I../lib -c unexec.c
  101.