home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / usr.bin / groff / grotty / Makefile.gnu < prev    next >
Encoding:
Makefile  |  1991-04-30  |  2.1 KB  |  82 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. BINDIR=/usr/local/bin
  21. CC=g++
  22. CFLAGS=-g -O -Wall -Wcast-qual -Wwrite-strings
  23. LDFLAGS=-g
  24. OLDCC=gcc
  25. OLDCFLAGS=-g
  26. MLIBS=-lm
  27. INCLUDES=-I../driver -I../lib
  28. DEFINES=
  29. BINDIR=/usr/local/bin
  30. FONTDIR=/usr/local/lib/groff/font
  31. MACRODIR=/usr/local/lib/groff/tmac
  32. ETAGS=etags
  33. ETAGSFLAGS=-p
  34. DEVICES=devascii devlatin1
  35.  
  36. .c.o:
  37.     $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $<
  38.  
  39. all: grotty $(DEVICES)
  40.  
  41. grotty: tty.o ../driver/libdriver.a ../lib/libgroff.a
  42.     $(CC) $(LDFLAGS) -o $@ tty.o \
  43.     ../driver/libdriver.a ../lib/libgroff.a $(MLIBS)
  44.  
  45. tty.o : ../driver/printer.h ../driver/driver.h ../lib/font.h
  46.  
  47. install.bin: grotty
  48.     -[ -d $(BINDIR) ] || mkdir $(BINDIR)
  49.     cp grotty $(BINDIR)
  50.     @for dir in $(DEVICES); do \
  51.     echo Making install.bin in $$dir; \
  52.     (cd $$dir; $(MAKE) "FONTDIR=$(FONTDIR)" install.bin); done
  53.  
  54. install.nobin:
  55.     -[ -d $(MACRODIR) ] || mkdir $(MACRODIR)
  56.     cp tmac.tty $(MACRODIR)
  57.     @for dir in $(DEVICES); do \
  58.     echo Making install.nobin in $$dir; \
  59.     (cd $$dir; $(MAKE) "FONTDIR=$(FONTDIR)" install.nobin); done
  60.  
  61. install: install.bin install.nobin
  62.  
  63. clean:
  64.     -rm -f *.o core grotty
  65.     @for dir in $(DEVICES); do \
  66.     echo Making clean in $$dir; \
  67.     (cd $$dir; $(MAKE) clean); done
  68.     
  69.  
  70. distclean: clean
  71.     -rm -f TAGS
  72.  
  73. realclean: distclean
  74.  
  75. TAGS: tty.c
  76.     $(ETAGS) $(ETAGSFLAGS) tty.c
  77.  
  78. $(DEVICES): FORCE
  79.     @echo Making all in $@
  80.     @cd $@; $(MAKE) all
  81. FORCE:
  82.