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

  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. # 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. CFLAGS=-g #-DBROKEN_SPOOLER
  27. OLDCC=gcc
  28. OLDCFLAGS=-g
  29. MLIBS=-lm
  30. INCLUDES=-I../driver -I../lib
  31. DEFINES=
  32. LDFLAGS=-g
  33. OBJECTS=ps.o
  34. SOURCES=ps.c
  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
  41.  
  42. .c.o:
  43.     $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $<
  44.  
  45. all: grops psbb devps
  46.  
  47. grops: $(OBJECTS) ../driver/libdriver.a ../lib/libgroff.a
  48.     $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \
  49.     ../driver/libdriver.a ../lib/libgroff.a $(MLIBS)
  50.  
  51. ps.o: ../driver/printer.h ../driver/driver.h ../lib/font.h \
  52.       ../lib/stringclass.h ../lib/cset.h
  53.  
  54. psbb: psbb.o
  55.     $(OLDCC) $(LDFLAGS) -o $@ psbb.o
  56.  
  57. psbb.o: psbb.c
  58.     $(OLDCC) $(OLDCFLAGS) -c psbb.c
  59.  
  60. install.bin: grops psbb
  61.     -[ -d $(BINDIR) ] || mkdir $(BINDIR)
  62.     cp grops psbb $(BINDIR)
  63.     @cd devps; \
  64.     $(MAKE) \
  65.     "FONTDIR=$(FONTDIR)" "PAGE=$(PAGE)" "BINDIR=$(BINDIR)" install.bin
  66.  
  67. install.nobin:
  68.     -[ -d $(MACRODIR) ] || mkdir $(MACRODIR)
  69.     cp tmac.ps $(MACRODIR)
  70.     @echo Making install.nobin in devps
  71.     @cd devps; \
  72.     $(MAKE) \
  73.     "FONTDIR=$(FONTDIR)" "PAGE=$(PAGE)" "BINDIR=$(BINDIR)" install.nobin
  74.  
  75. install: install.bin install.nobin
  76.  
  77.  
  78. TAGS : $(SOURCES)
  79.     $(ETAGS) $(ETAGSFLAGS) $(SOURCES)
  80.  
  81. clean:
  82.     -rm -f *.o psbb core grops
  83.  
  84. distclean: clean
  85.     -rm -f TAGS
  86.  
  87. realclean: distclean
  88.  
  89. devps: FORCE
  90.     @echo Making all in devps
  91.     @cd devps; $(MAKE) "FONTDIR=$(FONTDIR)" "PAGE=$(PAGE)" all
  92.  
  93. FORCE:
  94.