home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / usr.bin / groff / pic / Makefile.gnu < prev    next >
Encoding:
Makefile  |  1991-04-30  |  2.3 KB  |  87 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. CC=g++
  22. CFLAGS=-g -O -Wall
  23. DEFINES=-DTEX_SUPPORT # -DFIG_SUPPORT 
  24. INCLUDES=-I../lib 
  25. MLIBS=-lm
  26. YACCFLAGS=-v
  27. YACC=bison -y
  28. ETAGS=etags
  29. ETAGSFLAGS=-p
  30. GPERF=gperf
  31. GPERFFLAGS=-p -a -t -k 1,3,4 -c -C -N lookup_keyword -T
  32.  
  33. OBJECTS=pic.tab.o lex.o main.o object.o common.o troff.o tex.o key.o # fig.o 
  34. SOURCES=pic.y lex.c main.c object.c common.c troff.c tex.c key.c \
  35.     pic.h text.h output.h object.h common.h key.h position.h
  36. MISC=Makefile TODO pic.gperf
  37.  
  38. .c.o:
  39.     $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $<
  40.  
  41. all: pic
  42.  
  43. pic: $(OBJECTS) ../lib/libgroff.a
  44.     $(CC) $(LDFLAGS) -o $@ $(OBJECTS) ../lib/libgroff.a $(MLIBS)
  45.  
  46. pic.tab.c: pic.y
  47.     $(YACC) $(YACCFLAGS) -d pic.y
  48.     mv y.tab.c pic.tab.c
  49.     mv y.tab.h pic.tab.h
  50.  
  51. PIC_H= pic.h text.h output.h position.h \
  52.        ../lib/lib.h ../lib/errarg.h ../lib/error.h ../lib/assert.h \
  53.        ../lib/stringclass.h ../lib/cset.h 
  54.  
  55. pic.tab.o: $(PIC_H) object.h
  56. object.o: $(PIC_H) object.h
  57. troff.o: $(PIC_H) common.h
  58. tex.o: $(PIC_H) common.h
  59. # fig.o: $(PIC_H)
  60. common.o: $(PIC_H) common.h
  61. main.o: $(PIC_H)
  62. lex.o: $(PIC_H) pic.tab.c object.h key.h
  63. key.o: $(PIC_H) key.h pic.tab.c object.h 
  64.  
  65. key.c: pic.gperf
  66.     $(GPERF) $(GPERFFLAGS) pic.gperf >$@
  67.  
  68. TAGS : $(SOURCES)
  69.     $(ETAGS) $(ETAGSFLAGS) $(SOURCES)
  70.  
  71. clean:
  72.     -rm -f *.o core pic
  73.  
  74. distclean: clean
  75.     -rm -f pic.output y.output TAGS
  76.  
  77. realclean: distclean
  78.     -rm -f pic.tab.c pic.tab.h key.c
  79.  
  80. install.bin: pic
  81.     -[ -d $(BINDIR) ] || mkdir $(BINDIR)
  82.     cp pic $(BINDIR)/gpic
  83.  
  84. install.nobin:
  85.  
  86. install: install.bin install.nobin
  87.