home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / usr.bin / groff / eqn / Makefile.gnu < prev    next >
Encoding:
Makefile  |  1991-04-30  |  2.2 KB  |  84 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. BINDIR=/usr/local/bin
  21. # default device
  22. DEVICE=ps
  23. CFLAGS=-g -O -Wall
  24. CC=g++
  25. INCLUDES=-I../lib
  26. DEFINES=-DDEVICE=\"$(DEVICE)\"
  27. YACC=bison -y
  28. YACCFLAGS=-v
  29. ETAGS=etags
  30. ETAGSFLAGS=-p
  31. OBJECTS=eqn.tab.o main.o lex.o  box.o limit.o list.o over.o text.o \
  32.     script.o mark.o other.o delim.o sqrt.o pile.o
  33. SOURCES=main.c lex.c eqn.y box.c limit.c list.c over.c text.c \
  34.     script.c mark.c other.c delim.c sqrt.c pile.c \
  35.     eqn.h box.h pbox.h
  36.  
  37. .c.o:
  38.     $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $<
  39.  
  40. all: eqn
  41.  
  42. eqn: $(OBJECTS) ../lib/libgroff.a
  43.     $(CC) $(LDFLAGS) -o $@ $(OBJECTS) ../lib/libgroff.a $(LIBS)
  44.  
  45. eqn.tab.c: eqn.y
  46.     $(YACC) $(YACCFLAGS) -d eqn.y
  47.     mv y.tab.c eqn.tab.c
  48.     mv y.tab.h eqn.tab.h
  49.  
  50. eqn.tab.o: eqn.h box.h
  51. box.o: eqn.h box.h pbox.h
  52. limit.o: eqn.h box.h pbox.h
  53. text.o: eqn.h box.h pbox.h
  54. over.o: eqn.h box.h pbox.h
  55. list.o: eqn.h box.h pbox.h
  56. script.o: eqn.h box.h pbox.h
  57. mark.o: eqn.h box.h pbox.h
  58. other.o: eqn.h box.h pbox.h
  59. delim.o: eqn.h box.h pbox.h
  60. sqrt.o: eqn.h box.h pbox.h
  61. pile.o: eqn.h box.h pbox.h
  62. main.o: eqn.h  box.h  ../lib/stringclass.h
  63. lex.o: eqn.h eqn.tab.c box.h ../lib/stringclass.h
  64.  
  65. install.bin: eqn
  66.     -[ -d $(BINDIR) ] || mkdir $(BINDIR)
  67.     cp eqn $(BINDIR)/geqn
  68.  
  69. install.nobin:
  70.  
  71. install: install.bin install.nobin
  72.  
  73. TAGS: $(SOURCES)
  74.     $(ETAGS) $(ETAGSFLAGS) $(SOURCES)
  75.  
  76. clean:
  77.     -rm -f *.o core eqn gmon.out
  78.  
  79. distclean: clean
  80.     -rm -f TAGS eqn.output y.output
  81.  
  82. realclean: distclean
  83.     -rm -f eqn.tab.c eqn.tab.h
  84.